	public MassMoverDialog(MagicCollection col,MagicEdition ed) {
		setSize(new Dimension(640, 370));
		setTitle(MTGControler.getInstance().getLangService().getCapitalize("MASS_MOVEMENTS") + " : "+col);
		setModal(true);
		getContentPane().setLayout(new BorderLayout(0, 0));
		setLocationRelativeTo(null);

		dao = MTGControler.getInstance().getEnabledDAO();
		this.toSaveCol=col;
		this.toSaveEd=ed;

		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.SOUTH);

		btnMove = new JButton(MTGControler.getInstance().getLangService().getCapitalize("MOVE_TO"));

		panel.add(btnMove);

		cboCollections = null;
		try {
			cboCollections = new JComboBox<>(dao.getCollections().toArray(new MagicCollection[dao.getCollections().size()]));
		} catch (SQLException e) {
			logger.error(e);
		}
		panel.add(cboCollections);

		lblWaiting = new JLabel("");
		lblWaiting.setVisible(false);
		lblWaiting.setIcon(MTGConstants.ICON_LOADING);
		panel.add(lblWaiting);

		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);

		model = new MagicCardTableModel();
		try {
			if(ed==null)
				model.init(dao.getCardsFromCollection(col));
			else
				model.init(dao.getCardsFromCollection(col,ed));
		} catch (SQLException e) {
			logger.error(e);
		}

		tableCards = new JTable(model);
		tableCards.getColumnModel().getColumn(2).setCellRenderer(new ManaCellRenderer());

		scrollPane.setViewportView(tableCards);

		TableFilterHeader filterHeader = new TableFilterHeader(tableCards, AutoChoices.ENABLED);
		filterHeader.setSelectionBackground(Color.LIGHT_GRAY);
		//filterHeader.setTable(tableCards);
		//pack();

		btnMove.addActionListener(e->{
				lblWaiting.setVisible(true);
				btnMove.setEnabled(false);

				if(tableCards.getSelectedRowCount()>0)
				{
					ThreadManager.getInstance().execute(()->{

							for (int i = 0; i < tableCards.getSelectedRowCount(); i++)
							{
								int viewRow = tableCards.getSelectedRows()[i];
								int modelRow = tableCards.convertRowIndexToModel(viewRow);
								MagicCard mc = (MagicCard)tableCards.getModel().getValueAt(modelRow, 0);
								try {
									dao.removeCard(mc, toSaveCol);
									dao.saveCard(mc, (MagicCollection)cboCollections.getSelectedItem() );
									logger.info("moving " + mc +" to "  + cboCollections.getSelectedItem() );
									change=true;
									lblWaiting.setText("moving " + mc);
								}
								catch (SQLException e1)
								{
									logger.error(e1);
									JOptionPane.showMessageDialog(null, e1,"ERROR",JOptionPane.ERROR_MESSAGE);
									lblWaiting.setVisible(false);
									btnMove.setEnabled(true);

								}
							}

							try {
								lblWaiting.setText(MTGControler.getInstance().getLangService().getCapitalize("UPDATE"));
								if(toSaveEd==null)
									model.init(dao.getCardsFromCollection(toSaveCol));
								else
									model.init(dao.getCardsFromCollection(toSaveCol,toSaveEd));
							} catch (SQLException ex) {
								logger.error(ex);
								JOptionPane.showMessageDialog(null, ex,MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
							}

							model.fireTableDataChanged();
							lblWaiting.setVisible(false);
							btnMove.setEnabled(true);

					}, "mass movement");

			}
		});

	}

	public MassMoverDialog(MagicCollection col,MagicEdition ed) {
		setSize(new Dimension(640, 370));
		setTitle(MTGControler.getInstance().getLangService().getCapitalize("MASS_MOVEMENTS") + " : "+col);
		setModal(true);
		getContentPane().setLayout(new BorderLayout(0, 0));
		setLocationRelativeTo(null);

		dao = MTGControler.getInstance().getEnabledDAO();
		this.toSaveCol=col;
		this.toSaveEd=ed;

		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.SOUTH);

		btnMove = new JButton(MTGControler.getInstance().getLangService().getCapitalize("MOVE_TO"));

		panel.add(btnMove);

		cboCollections = null;
		try {
			cboCollections = new JComboBox(dao.getCollections().toArray(new MagicCollection[dao.getCollections().size()]));
		} catch (SQLException e) {
			logger.error(e);
		}
		panel.add(cboCollections);

		lblWaiting = new JLabel("");
		lblWaiting.setVisible(false);
		lblWaiting.setIcon(MTGConstants.ICON_LOADING);
		panel.add(lblWaiting);

		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);

		model = new MagicCardTableModel();
		try {
			if(ed==null)
				model.init(dao.getCardsFromCollection(col));
			else
				model.init(dao.getCardsFromCollection(col,ed));
		} catch (SQLException e) {
			logger.error(e);
		}

		tableCards = new JTable(model);
		tableCards.getColumnModel().getColumn(2).setCellRenderer(new ManaCellRenderer());

		scrollPane.setViewportView(tableCards);

		TableFilterHeader filterHeader = new TableFilterHeader(tableCards, AutoChoices.ENABLED);
		filterHeader.setSelectionBackground(Color.LIGHT_GRAY);
		//filterHeader.setTable(tableCards);
		//pack();

		btnMove.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				lblWaiting.setVisible(true);
				btnMove.setEnabled(false);

				if(tableCards.getSelectedRowCount()>0)
				{
					ThreadManager.getInstance().execute(new Runnable() {

						public void run() {

							for (int i = 0; i < tableCards.getSelectedRowCount(); i++)
							{
								int viewRow = tableCards.getSelectedRows()[i];
								int modelRow = tableCards.convertRowIndexToModel(viewRow);
								MagicCard mc = (MagicCard)tableCards.getModel().getValueAt(modelRow, 0);
								try {
									dao.removeCard(mc, toSaveCol);
									dao.saveCard(mc, (MagicCollection)cboCollections.getSelectedItem() );
								//	dao.moveCards(toSaveCol, (MagicCollection)cboCollections.getSelectedItem(), mc);

									logger.info("moving " + mc +" to "  + cboCollections.getSelectedItem() );
									change=true;
									lblWaiting.setText("moving " + mc);
								}
								catch (SQLException e1)
								{
									logger.error(e1);
									JOptionPane.showMessageDialog(null, e1,"ERROR",JOptionPane.ERROR_MESSAGE);
									lblWaiting.setVisible(false);
									btnMove.setEnabled(true);

								}
							}

							try {
								lblWaiting.setText(MTGControler.getInstance().getLangService().getCapitalize("UPDATE"));
								if(toSaveEd==null)
									model.init(dao.getCardsFromCollection(toSaveCol));
								else
									model.init(dao.getCardsFromCollection(toSaveCol,toSaveEd));
							} catch (SQLException e) {
								logger.error(e);
								JOptionPane.showMessageDialog(null, e,MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
							}

							model.fireTableDataChanged();
							lblWaiting.setVisible(false);
							btnMove.setEnabled(true);
						}
					}, "mass movement");

				}
			}
		});

	}

Replace Anonymous With Lambda org.magic.gui.components.dialog.MassMoverDialog.MassMoverDialog.addActionListener.new ActionListener with e -> {lblWaiting.setVisible(true); in method public MassMoverDialog(col MagicCollection, ed MagicEdition) from class org.magic.gui.components.dialog.MassMoverDialog


	public PriceCatalogExportDialog(MagicCollection selectedcol) {
		setSize(new Dimension(420, 170));
		setModal(true);
		setTitle("Price Catalog Export : " + selectedcol.getName());
		getContentPane().setLayout(new BorderLayout(0, 0));

		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);

		txtDest = new JTextField(new File(MTGControler.CONF_DIR,selectedcol.getName()+".csv").getAbsolutePath());

		panel.add(txtDest);
		txtDest.setColumns(20);

		JButton btnDestChoose = new JButton("...");

		panel.add(btnDestChoose);

		JPanel panneauBas = new JPanel();
		getContentPane().add(panneauBas, BorderLayout.SOUTH);

		JButton btnGenerate = new JButton(MTGControler.getInstance().getLangService().getCapitalize("EXPORT"));

		panneauBas.add(btnGenerate);
		lstProviders = new JComboBox<>(MTGControler.getInstance().getEnabledPricers().toArray(new MagicPricesProvider[MTGControler.getInstance().getEnabledPricers().size() ]));

		JScrollPane scrollProviders = new JScrollPane();
		getContentPane().add(scrollProviders, BorderLayout.CENTER);

		scrollProviders.setViewportView(lstProviders);

		btnDestChoose.addActionListener(e->{
				JFileChooser choose = new JFileChooser(txtDest.getText());
				choose.setFileSelectionMode(JFileChooser.FILES_ONLY);
				choose.showSaveDialog(null);
				File dest = choose.getSelectedFile();

				if(dest==null)
					dest=new File(".");

				txtDest.setText(dest.getAbsolutePath());
		});

		btnGenerate.addActionListener(e->{
				value=true;
				setVisible(false);
		});
		setLocationRelativeTo(null);
	}

	public PriceCatalogExportDialog(MagicCollection selectedcol) {
		setSize(new Dimension(420, 170));
		setModal(true);
		setTitle("Price Catalog Export : " + selectedcol.getName());
		getContentPane().setLayout(new BorderLayout(0, 0));

		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);

		txtDest = new JTextField(new File(MTGControler.CONF_DIR,selectedcol.getName()+".csv").getAbsolutePath());

		panel.add(txtDest);
		txtDest.setColumns(20);

		JButton btnDestChoose = new JButton("...");

		panel.add(btnDestChoose);

		JPanel panneauBas = new JPanel();
		getContentPane().add(panneauBas, BorderLayout.SOUTH);

		JButton btnGenerate = new JButton(MTGControler.getInstance().getLangService().getCapitalize("EXPORT"));

		panneauBas.add(btnGenerate);
		lstProviders = new JComboBox<MagicPricesProvider>(MTGControler.getInstance().getEnabledPricers().toArray(new MagicPricesProvider[MTGControler.getInstance().getEnabledPricers().size() ]));

		JScrollPane scrollProviders = new JScrollPane();
		getContentPane().add(scrollProviders, BorderLayout.CENTER);

		scrollProviders.setViewportView(lstProviders);

		btnDestChoose.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				JFileChooser choose = new JFileChooser(txtDest.getText());
				choose.setFileSelectionMode(JFileChooser.FILES_ONLY);
				choose.showSaveDialog(null);
				File dest = choose.getSelectedFile();

				if(dest==null)
					dest=new File(".");

				txtDest.setText(dest.getAbsolutePath());
			}
		});

		btnGenerate.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				value=true;
				setVisible(false);

			}
		});
		setLocationRelativeTo(null);
	}

Replace Anonymous With Lambda org.magic.gui.components.dialog.PriceCatalogExportDialog.PriceCatalogExportDialog.addActionListener.new ActionListener with e -> {JFileChooser choose=new JFileChooser(txtDest.getText()); in method public PriceCatalogExportDialog(selectedcol MagicCollection) from class org.magic.gui.components.dialog.PriceCatalogExportDialog


	public CardStockLinePanel(MagicCard selectedCard, MagicCollection selectedCol) {

		setBorder(new LineBorder(Color.BLACK, 1, true));
		setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);

		state= new MagicCardStock();
		state.setMagicCard(selectedCard);
		state.setMagicCollection(selectedCol);
		setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));

		JLabel lblQuantity = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("QTY")+" :");
		add(lblQuantity);

		txtQte = new JSpinner();
		txtQte.setModel(new SpinnerNumberModel(0, 0, null, 1));
		add(txtQte);

		cboState = new JComboBox(EnumCondition.values());
		add(cboState);

		cboLanguage = new JComboBox(MTGControler.getInstance().getEnabledProviders().getLanguages());
		add(cboLanguage);

		JLabel lblComment = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("COMMENTS") +" :");
		add(lblComment);

		txtComment = new JTextField();
		add(txtComment);
		txtComment.setColumns(20);

		cboFoil = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("FOIL"));
		add(cboFoil);

		cboSigned = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("SIGNED"));
		add(cboSigned);

		JButton btnNewButton = new JButton("");

		Image img = MTGConstants.ICON_DELETE.getImage() ;
		Image newimg = img.getScaledInstance( 25, 25,  java.awt.Image.SCALE_SMOOTH ) ;

		btnNewButton.setIcon(new ImageIcon(newimg));
		btnNewButton.addActionListener(e->
				delete()
		);

		JButton btnSave = new JButton("");

		Image img2 = MTGConstants.ICON_CHECK.getImage() ;
		Image newimg2 = img2.getScaledInstance( 25, 25,  java.awt.Image.SCALE_SMOOTH ) ;

		btnSave.setIcon(new ImageIcon(newimg2));

		btnSave.addActionListener(ae->{

				try {
					generateState();
					MTGControler.getInstance().getEnabledDAO().saveOrUpdateStock(state);
				} catch (SQLException e) {
					MTGLogger.printStackTrace(e);
				}
		});

		cboAltered = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("ALTERED"));
		add(cboAltered);
		add(btnSave);
		add(btnNewButton);
	}

	public CardStockLinePanel(MagicCard selectedCard, MagicCollection selectedCol) {

		setBorder(new LineBorder(Color.BLACK, 1, true));
		setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);

		state= new MagicCardStock();
		state.setMagicCard(selectedCard);
		state.setMagicCollection(selectedCol);
		setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));

		JLabel lblQuantity = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("QTY")+" :");
		add(lblQuantity);

		txtQte = new JSpinner();
		txtQte.setModel(new SpinnerNumberModel(0, 0, null, 1));
		add(txtQte);

		cboState = new JComboBox(EnumCondition.values());
		add(cboState);

		cboLanguage = new JComboBox(MTGControler.getInstance().getEnabledProviders().getLanguages());
		add(cboLanguage);

		JLabel lblComment = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("COMMENTS") +" :");
		add(lblComment);

		txtComment = new JTextField();
		add(txtComment);
		txtComment.setColumns(20);

		cboFoil = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("FOIL"));
		add(cboFoil);

		cboSigned = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("SIGNED"));
		add(cboSigned);

		JButton btnNewButton = new JButton("");

		Image img = MTGConstants.ICON_DELETE.getImage() ;
		Image newimg = img.getScaledInstance( 25, 25,  java.awt.Image.SCALE_SMOOTH ) ;

		btnNewButton.setIcon(new ImageIcon(newimg));
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				delete();
			}
		});

		JButton btnSave = new JButton("");

		Image img2 = MTGConstants.ICON_CHECK.getImage() ;
		Image newimg2 = img2.getScaledInstance( 25, 25,  java.awt.Image.SCALE_SMOOTH ) ;

		btnSave.setIcon(new ImageIcon(newimg2));

		btnSave.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent ae) {

				try {
					generateState();
					MTGControler.getInstance().getEnabledDAO().saveOrUpdateStock(state);
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					MTGLogger.printStackTrace(e);
				}
			}
		});

		cboAltered = new JCheckBox(MTGControler.getInstance().getLangService().getCapitalize("ALTERED"));
		add(cboAltered);
		add(btnSave);
		add(btnNewButton);
	}

Replace Anonymous With Lambda org.magic.gui.components.editor.CardStockLinePanel.CardStockLinePanel.addActionListener.new ActionListener with ae -> {trygenerateState(); in method public CardStockLinePanel(selectedCard MagicCard, selectedCol MagicCollection) from class org.magic.gui.components.editor.CardStockLinePanel


	public JTagsPanel() {
		initGUI();
		tags=new ArrayList<>();
		isEditable=true;
	}

	public JTagsPanel() {
		initGUI();
		tags=new ArrayList<String>();
		isEditable=true;
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public JTagsPanel() from class org.magic.gui.components.editor.JTagsPanel


			@Override
			public void actionPerformed(ActionEvent arg0) {
				JTextField field = new JTextField(10);
				panelTags.add(field);
				field.requestFocus();
				panelTags.revalidate();
				btnAdd.setEnabled(false);
				field.addActionListener(e->{
						String s = field.getText();
						panelTags.remove(field);
						if(!s.equals(""))
							addTag(s);

						btnAdd.setEnabled(true);
						btnAdd.requestFocus();
				});

			}

			@Override
			public void actionPerformed(ActionEvent arg0) {
				JTextField field = new JTextField(10);
				panelTags.add(field);
				field.requestFocus();
				panelTags.revalidate();
				btnAdd.setEnabled(false);
				field.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) {
						String s = field.getText();
						panelTags.remove(field);
						if(!s.equals(""))
							addTag(s);

						btnAdd.setEnabled(true);
						btnAdd.requestFocus();
					}
				});

			}

Replace Anonymous With Lambda org.magic.gui.components.editor.JTagsPanel.initGUI.action.new AbstractAction.actionPerformed.addActionListener.new ActionListener with e -> {String s=field.getText(); in method public actionPerformed(arg0 ActionEvent) : void from class org.magic.gui.components.editor.JTagsPanel.initGUI.action.new AbstractAction


					@Override
					public void mouseClicked(MouseEvent e) {
						final JDialog g = new JDialog();
						g.getContentPane().setLayout(new FlowLayout());
						g.setModal(true);

						String[] data = {"0","1","2","3","4","5","6","7","8","9","10"};
						final JComboBox<String> cboW = new JComboBox<>(data);
						final JComboBox<String> cboU = new JComboBox<>(data);
						final JComboBox<String> cboB = new JComboBox<>(data);
						final JComboBox<String> cboR = new JComboBox<>(data);
						final JComboBox<String> cboG = new JComboBox<>(data);
						final JComboBox<String> cboC = new JComboBox<>(data);
						final JComboBox<String> cboUn = new JComboBox<>(data);
						cboUn.addItem("X");

						JButton btn = new JButton(MTGControler.getInstance().getLangService().getCapitalize("SET_COST")+":");
						btn.addActionListener(ev->{
								StringBuilder cost=new StringBuilder();
								int cmc=0;
								HashSet<String> colors = new HashSet<>();

								if(!cboUn.getSelectedItem().equals("X"))
								{
									if(cboUn.getSelectedIndex()>0)
									{
										cost.append("{").append(cboUn.getSelectedIndex()).append("}");
										cmc+=cboUn.getSelectedIndex();
									}
								}
								else
								{
									cost.append("{X}");
								}

								for(int i=0;i<cboC.getSelectedIndex();i++)
								{
									cost.append("{C}");
									cmc+=1;
								}

								for(int i=0;i<cboW.getSelectedIndex();i++)
								{
									cost.append("{W}");
									cmc+=1;
									colors.add("White");
								}

								for(int i=0;i<cboU.getSelectedIndex();i++)
								{
									cost.append("{U}");
									cmc+=1;
									colors.add("Blue");
								}

								for(int i=0;i<cboB.getSelectedIndex();i++)
								{
									cost.append("{B}");
									cmc+=1;
									colors.add("Black");
								}

								for(int i=0;i<cboR.getSelectedIndex();i++)
								{
									cost.append("{R}");
									cmc+=1;
									colors.add("Red");
								}

								for(int i=0;i<cboG.getSelectedIndex();i++)
								{
									cost.append("{G}");
									cmc+=1;
									colors.add("Green");
								}

								magicCard.setCmc(cmc);
								magicCard.setColors(new ArrayList<String>(colors));
								magicCard.setColorIdentity(new ArrayList<String>(colors));
								costJTextField.setText(cost.toString());
								g.dispose();
						});

						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("1").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboUn);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("W").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboW);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("U").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboU);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("B").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboB);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("R").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboR);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("G").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboG);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("C").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboC);
						g.getContentPane().add(btn);
						g.setLocationRelativeTo(null);
						g.pack();
						g.setVisible(true);

					}

					@Override
					public void mouseClicked(MouseEvent e) {
						final JDialog g = new JDialog();
						g.getContentPane().setLayout(new FlowLayout());
						g.setModal(true);

						String[] data = {"0","1","2","3","4","5","6","7","8","9","10"};
						final JComboBox<String> cboW = new JComboBox<>(data);
						final JComboBox<String> cboU = new JComboBox<>(data);
						final JComboBox<String> cboB = new JComboBox<>(data);
						final JComboBox<String> cboR = new JComboBox<>(data);
						final JComboBox<String> cboG = new JComboBox<>(data);
						final JComboBox<String> cboC = new JComboBox<>(data);
						final JComboBox<String> cboUn = new JComboBox<>(data);
						cboUn.addItem("X");

						JButton btn = new JButton(MTGControler.getInstance().getLangService().getCapitalize("SET_COST")+":");
						btn.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								StringBuilder cost=new StringBuilder();
								int cmc=0;
								HashSet<String> colors = new HashSet<>();

								if(!cboUn.getSelectedItem().equals("X"))
								{
									if(cboUn.getSelectedIndex()>0)
									{
										cost.append("{").append(cboUn.getSelectedIndex()).append("}");
										cmc+=cboUn.getSelectedIndex();
									}
								}
								else
								{
									cost.append("{X}");
								}

								for(int i=0;i<cboC.getSelectedIndex();i++)
								{
									cost.append("{C}");
									cmc+=1;
								}

								for(int i=0;i<cboW.getSelectedIndex();i++)
								{
									cost.append("{W}");
									cmc+=1;
									colors.add("White");
								}

								for(int i=0;i<cboU.getSelectedIndex();i++)
								{
									cost.append("{U}");
									cmc+=1;
									colors.add("Blue");
								}

								for(int i=0;i<cboB.getSelectedIndex();i++)
								{
									cost.append("{B}");
									cmc+=1;
									colors.add("Black");
								}

								for(int i=0;i<cboR.getSelectedIndex();i++)
								{
									cost.append("{R}");
									cmc+=1;
									colors.add("Red");
								}

								for(int i=0;i<cboG.getSelectedIndex();i++)
								{
									cost.append("{G}");
									cmc+=1;
									colors.add("Green");
								}

								magicCard.setCmc(cmc);
								magicCard.setColors(new ArrayList<String>(colors));
								magicCard.setColorIdentity(new ArrayList<String>(colors));
								costJTextField.setText(cost.toString());
								g.dispose();

							}
						});

						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("1").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboUn);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("W").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboW);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("U").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboU);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("B").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboB);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("R").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboR);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("G").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboG);
						g.getContentPane().add(new JLabel(new ImageIcon(pan.getManaSymbol("C").getScaledInstance(10, 10, Image.SCALE_SMOOTH))));
						g.getContentPane().add(cboC);
						g.getContentPane().add(btn);
						g.setLocationRelativeTo(null);
						g.pack();
						g.setVisible(true);

					}

Replace Anonymous With Lambda org.magic.gui.components.editor.MagicCardEditorPanel.MagicCardEditorPanel.addMouseListener.new MouseAdapter.mouseClicked.addActionListener.new ActionListener with ev -> {StringBuilder cost=new StringBuilder(); in method public mouseClicked(e MouseEvent) : void from class org.magic.gui.components.editor.MagicCardEditorPanel.MagicCardEditorPanel.addMouseListener.new MouseAdapter


	@Override
	public void initGUI() {
		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);
		model = new CardAlertTableModel();
		table = new JTable(model);
		scrollPane.setViewportView(table);

		historyPricesPanel = new HistoryPricesPanel();
		historyPricesPanel.setMaximumSize(new Dimension(2147483647, 200));
		historyPricesPanel.setPreferredSize(new Dimension(119, 200));
		getContentPane().add(historyPricesPanel, BorderLayout.SOUTH);

		table.getSelectionModel().addListSelectionListener(event->{

	        	if(!event.getValueIsAdjusting())
	        	{
	        		int row = table.getSelectedRow();
	        		MagicCardAlert alt =(MagicCardAlert)table.getValueAt(row,0);
	        		historyPricesPanel.init(alt.getCard(), alt.getCard().getEditions().get(0), alt.getCard().toString());
	        		historyPricesPanel.revalidate();

				}
		});

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));
			setBounds(r);
			}

		setVisible(true);

	}

	@Override
	public void initGUI() {
		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);
		model = new CardAlertTableModel();
		table = new JTable(model);
		scrollPane.setViewportView(table);

		historyPricesPanel = new HistoryPricesPanel();
		historyPricesPanel.setMaximumSize(new Dimension(2147483647, 200));
		historyPricesPanel.setPreferredSize(new Dimension(119, 200));
		getContentPane().add(historyPricesPanel, BorderLayout.SOUTH);

		table.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
	        public void valueChanged(ListSelectionEvent event) {

	        	if(!event.getValueIsAdjusting())
	        	{
	        		int row = table.getSelectedRow();
	        		MagicCardAlert alt =(MagicCardAlert)table.getValueAt(row,0);
	        		historyPricesPanel.init(alt.getCard(), alt.getCard().getEditions().get(0), alt.getCard().toString());
	        		//historyPricesPanel.zoom(new Date());
	        		historyPricesPanel.revalidate();

				}
		    }
		});

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));
			setBounds(r);
			}

		setVisible(true);

	}

Replace Anonymous With Lambda org.magic.gui.dashlet.AlertedCardsTrendingDashlet.initGUI.addListSelectionListener.new ListSelectionListener with event -> {if(!event.getValueIsAdjusting()){int row=table.getSelectedRow(); in method public initGUI() : void from class org.magic.gui.dashlet.AlertedCardsTrendingDashlet


	@Override
	public void init() {
			ThreadManager.getInstance().execute(()->{
					lblLoading.setVisible(true);
					models.init((FORMAT)cboFormat.getSelectedItem(),cboFilter.getSelectedItem().toString());
					models.fireTableDataChanged();
					table.packAll();
					table.setRowSorter(new TableRowSorter(models) );
					save("FORMAT",cboFormat.getSelectedItem().toString());
					save("FILTER",cboFilter.getSelectedItem().toString());
					lblLoading.setVisible(false);
			}, "init BestCardsDashlet");
	}

	@Override
	public void init() {
			ThreadManager.getInstance().execute(new Runnable() {
				@Override
				public void run() {
					lblLoading.setVisible(true);
					models.init((FORMAT)cboFormat.getSelectedItem(),cboFilter.getSelectedItem().toString());
					models.fireTableDataChanged();
					table.packAll();
					table.setRowSorter(new TableRowSorter(models) );
					save("FORMAT",cboFormat.getSelectedItem().toString());
					save("FILTER",cboFilter.getSelectedItem().toString());
					lblLoading.setVisible(false);
				}
			}, "init BestCardsDashlet");
	}

Replace Anonymous With Lambda org.magic.gui.dashlet.BestCardsDashlet.init.execute.new Runnable with () -> {lblLoading.setVisible(true); in method public init() : void from class org.magic.gui.dashlet.BestCardsDashlet


	@Override
	public void init() {
		ThreadManager.getInstance().execute(()->{

				try {
					List<CardShake> shakes = new ArrayList<>();

					if(boxM.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.modern.toString()));
					if(boxS.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.standard.toString()));
					if(boxL.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.legacy.toString()));
					if(boxV.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.vintage.toString()));

					Collections.sort(shakes,new Comparator<CardShake>() {
						public int compare(CardShake o1, CardShake o2) {
							if(o1.getPriceDayChange()>o2.getPriceDayChange())
									return -1;

							if(o1.getPriceDayChange()<o2.getPriceDayChange())
									return 1;

							return 0;

						}
					});

					int val = (Integer)spinner.getValue();
					save("LIMIT", String.valueOf(val));
					save("STD",String.valueOf(boxS.isSelected()));
					save("MDN",String.valueOf(boxM.isSelected()));
					save("LEG",String.valueOf(boxL.isSelected()));
					save("VIN",String.valueOf(boxV.isSelected()));

					List<CardShake> ret = new ArrayList<>();
					ret.addAll(shakes.subList(0, val));//X first
					ret.addAll(shakes.subList(shakes.size()-(val+1), shakes.size())); //x last

					modStandard.init(ret);
				} catch (IOException e) {
					MTGLogger.printStackTrace(e);
				}

				table.setModel(modStandard);
				table.setRowSorter(new TableRowSorter(modStandard) );
				table.packAll();
				table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());
				modStandard.fireTableDataChanged();
		}, "Init best Dashlet");

	}

	@Override
	public void init() {
		ThreadManager.getInstance().execute(new Runnable() {

			@Override
			public void run() {

				try {
					List<CardShake> shakes = new ArrayList<>();

					if(boxM.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.modern.toString()));
					if(boxS.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.standard.toString()));
					if(boxL.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.legacy.toString()));
					if(boxV.isSelected())
						shakes.addAll(MTGControler.getInstance().getEnabledDashBoard().getShakerFor(FORMAT.vintage.toString()));

					Collections.sort(shakes,new Comparator<CardShake>() {
						public int compare(CardShake o1, CardShake o2) {
							if(o1.getPriceDayChange()>o2.getPriceDayChange())
									return -1;

							if(o1.getPriceDayChange()<o2.getPriceDayChange())
									return 1;

							return 0;

						}
					});

					int val = (Integer)spinner.getValue();
					save("LIMIT", String.valueOf(val));
					save("STD",String.valueOf(boxS.isSelected()));
					save("MDN",String.valueOf(boxM.isSelected()));
					save("LEG",String.valueOf(boxL.isSelected()));
					save("VIN",String.valueOf(boxV.isSelected()));

					List<CardShake> ret = new ArrayList<>();
					ret.addAll(shakes.subList(0, val));//X first
					ret.addAll(shakes.subList(shakes.size()-(val+1), shakes.size())); //x last

					modStandard.init(ret);
				} catch (IOException e) {
					MTGLogger.printStackTrace(e);
				}

				table.setModel(modStandard);
				table.setRowSorter(new TableRowSorter(modStandard) );
				table.packAll();
				table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());
				modStandard.fireTableDataChanged();

			}
		}, "Init best Dashlet");

	}

Replace Anonymous With Lambda org.magic.gui.dashlet.BestTrendingDashlet.init.execute.new Runnable with () -> {tryList<CardShake> shakes=new ArrayList<>(); in method public init() : void from class org.magic.gui.dashlet.BestTrendingDashlet


	@Override
	public void initGUI() {
		JPanel panneauHaut = new JPanel();
		getContentPane().add(panneauHaut, BorderLayout.NORTH);

		Action a = new AbstractAction() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				init();

			}
		};

		boxS= new JCheckBox();
		boxS.setAction(a);
		boxS.setText("STD");
		boxM= new JCheckBox();
		boxM.setAction(a);
		boxM.setText("MDN");
		boxL= new JCheckBox();
		boxL.setAction(a);
		boxL.setText("LEG");
		boxV= new JCheckBox("V");
		boxV.setAction(a);
		boxV.setText("VIN");

		spinner = new JSpinner();
		spinner.addChangeListener(ce->init());

		spinner.setModel(new SpinnerNumberModel(5, 1, null, 1));
		panneauHaut.add(spinner);
		panneauHaut.add(boxS);
		panneauHaut.add(boxM);
		panneauHaut.add(boxL);
		panneauHaut.add(boxV);
		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);
		modStandard = new CardsShakerTableModel();
		table = new JXTable(modStandard);
		scrollPane.setViewportView(table);
		initToolTip(table,0,1);

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));

			try {
				spinner.setValue(Integer.parseInt(props.getProperty("LIMIT","5")));
			} catch (Exception e) {
				logger.error("can't get LIMIT value",e);
			}

			try {
				boxS.setSelected(Boolean.parseBoolean(props.getProperty("STD","false")));
				boxM.setSelected(Boolean.parseBoolean(props.getProperty("MDN","true")));
				boxL.setSelected(Boolean.parseBoolean(props.getProperty("LEG","false")));
				boxV.setSelected(Boolean.parseBoolean(props.getProperty("VIN","false")));
			} catch (Exception e) {
				logger.error("can't get LIMIT value",e);
			}

			setBounds(r);
			}

		setVisible(true);
	}

	@Override
	public void initGUI() {
		JPanel panneauHaut = new JPanel();
		getContentPane().add(panneauHaut, BorderLayout.NORTH);

		Action a = new AbstractAction() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				init();

			}
		};

		boxS= new JCheckBox();
		boxS.setAction(a);
		boxS.setText("STD");
		boxM= new JCheckBox();
		boxM.setAction(a);
		boxM.setText("MDN");
		boxL= new JCheckBox();
		boxL.setAction(a);
		boxL.setText("LEG");
		boxV= new JCheckBox("V");
		boxV.setAction(a);
		boxV.setText("VIN");

		spinner = new JSpinner();
		spinner.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent arg0) {
				init();
			}
		});

		spinner.setModel(new SpinnerNumberModel(5, 1, null, 1));
		panneauHaut.add(spinner);
		panneauHaut.add(boxS);
		panneauHaut.add(boxM);
		panneauHaut.add(boxL);
		panneauHaut.add(boxV);
		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);
		modStandard = new CardsShakerTableModel();
		table = new JXTable(modStandard);
		scrollPane.setViewportView(table);
		initToolTip(table,0,1);

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));

			try {
				spinner.setValue(Integer.parseInt(props.getProperty("LIMIT","5")));
			} catch (Exception e) {
				logger.error("can't get LIMIT value",e);
			}

			try {
				boxS.setSelected(Boolean.parseBoolean(props.getProperty("STD","false")));
				boxM.setSelected(Boolean.parseBoolean(props.getProperty("MDN","true")));
				boxL.setSelected(Boolean.parseBoolean(props.getProperty("LEG","false")));
				boxV.setSelected(Boolean.parseBoolean(props.getProperty("VIN","false")));
			} catch (Exception e) {
				logger.error("can't get LIMIT value",e);
			}

			setBounds(r);
			}

		setVisible(true);
	}

Replace Anonymous With Lambda org.magic.gui.dashlet.BestTrendingDashlet.initGUI.addChangeListener.new ChangeListener with ce -> init() in method public initGUI() : void from class org.magic.gui.dashlet.BestTrendingDashlet


	@Override
	public void initGUI() {
		JPanel panneauHaut = new JPanel();
		getContentPane().add(panneauHaut, BorderLayout.NORTH);

		List<MagicEdition> eds= new ArrayList<>();
		try {
			eds.addAll(MTGControler.getInstance().getEnabledProviders().loadEditions());
			Collections.sort(eds);
			eds.add(0,null);
		} catch (Exception e) {
			MTGLogger.printStackTrace(e);
		}

		cboEditions = new JComboBox<>(new DefaultComboBoxModel<MagicEdition>(eds.toArray(new MagicEdition[eds.size()])));
		cboEditions.setRenderer(new MagicEditionListRenderer());

		panneauHaut.add(cboEditions);

		JLabel lblBoxSize = new JLabel("Box size: ");
		panneauHaut.add(lblBoxSize);

		boxSizeSpinner = new JSpinner();
		boxSizeSpinner.setModel(new SpinnerNumberModel(36, 0, null, 1));
		panneauHaut.add(boxSizeSpinner);

		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);

		boostersModel = new BoostersTableModel();
		cardsModel = new DefaultListModel<>();

		table = new JXTable(boostersModel);

		scrollPane.setViewportView(table);

		JPanel panneauBas = new JPanel();
		getContentPane().add(panneauBas, BorderLayout.SOUTH);

		JButton btnCalculate = new JButton("Open");
		panneauBas.add(btnCalculate);

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		getContentPane().add(tabbedPane, BorderLayout.EAST);

		txtDetailBox = new JTextPane();
		txtDetailBox.setEditable(false);
		tabbedPane.addTab("Box", null, txtDetailBox, null);

		JScrollPane scrollPane1 = new JScrollPane();
		tabbedPane.addTab("Booster", null, scrollPane1, null);

		JList<MagicCard> list1 = new JList<>();
		list1.setModel(cardsModel);
		list1.setCellRenderer(new MagicCardListRenderer());
		scrollPane1.setViewportView(list1);

		btnCalculate.addActionListener(e->
				ThreadManager.getInstance().execute(()->{
						try {
							List<CardShake> prices = MTGControler.getInstance().getEnabledDashBoard().getShakeForEdition((MagicEdition)cboEditions.getSelectedItem());
							boostersModel.clear();
							double total=0;
							Map<String,Double> priceRarity=new HashMap<>();

							for(int i=0;i<(int)boxSizeSpinner.getValue();i++)
							{
								Booster booster =MTGControler.getInstance().getEnabledProviders().generateBooster((MagicEdition) cboEditions.getSelectedItem());
								Collections.reverse(booster.getCards());
								booster.setBoosterNumber(String.valueOf(i+1));

								double price = 0;
								for(MagicCard mc : booster.getCards())
								{
									for(CardShake cs : prices)
										if(cs.getName().equalsIgnoreCase(mc.getName()))
										{
											price += cs.getPrice();
											booster.setPrice(price);
											cs.setCard(mc);

											String rarity=mc.getEditions().get(0).getRarity();

											if(priceRarity.get(rarity)!=null)
												priceRarity.put(rarity,priceRarity.get(rarity)+cs.getPrice());
											else
												priceRarity.put(rarity,cs.getPrice());
										}
								}
								boostersModel.addLine(booster);
								total = total+booster.getPrice();

								StringBuilder temp = new StringBuilder();
								temp.append("TOTAL: ").append(doubleFormat.format(total)).append("\n");

								for(String s : priceRarity.keySet())
									temp.append(s).append(": ").append(doubleFormat.format(priceRarity.get(s))).append("\n");

								txtDetailBox.setText(temp.toString());
							}

						} catch (Exception e1) {
							logger.error(e1);
						}
				}, "Open Box")
		);

		table.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
	        public void valueChanged(ListSelectionEvent event) {
	        	if(!event.getValueIsAdjusting())
	        	{

	        			int viewRow = table.getSelectedRow();
			        	if(viewRow>-1)
			        	{
			        		int modelRow = table.convertRowIndexToModel(viewRow);
			        		List<MagicCard> list = ((Booster)table.getModel().getValueAt(modelRow, 0)).getCards();
			        		cardsModel.clear();

			        		for(MagicCard mc : list)
			        			cardsModel.addElement(mc);

			        	}
	        	}
	        }
	    });

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));
			setBounds(r);
			}

		setVisible(true);
	}

	@Override
	public void initGUI() {
		JPanel panneauHaut = new JPanel();
		getContentPane().add(panneauHaut, BorderLayout.NORTH);

		List<MagicEdition> eds= new ArrayList<>();
		try {
			eds.addAll(MTGControler.getInstance().getEnabledProviders().loadEditions());
			Collections.sort(eds);
			eds.add(0,null);
		} catch (Exception e) {
			MTGLogger.printStackTrace(e);
		}

		cboEditions = new JComboBox<>(new DefaultComboBoxModel<MagicEdition>(eds.toArray(new MagicEdition[eds.size()])));
		cboEditions.setRenderer(new MagicEditionListRenderer());

		panneauHaut.add(cboEditions);

		JLabel lblBoxSize = new JLabel("Box size: ");
		panneauHaut.add(lblBoxSize);

		boxSizeSpinner = new JSpinner();
		boxSizeSpinner.setModel(new SpinnerNumberModel(36, 0, null, 1));
		panneauHaut.add(boxSizeSpinner);

		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.CENTER);

		boostersModel = new BoostersTableModel();
		cardsModel = new DefaultListModel<>();

		table = new JXTable(boostersModel);

		scrollPane.setViewportView(table);

		JPanel panneauBas = new JPanel();
		getContentPane().add(panneauBas, BorderLayout.SOUTH);

		JButton btnCalculate = new JButton("Open");
		panneauBas.add(btnCalculate);

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		getContentPane().add(tabbedPane, BorderLayout.EAST);

		txtDetailBox = new JTextPane();
		txtDetailBox.setEditable(false);
		tabbedPane.addTab("Box", null, txtDetailBox, null);

		JScrollPane scrollPane_1 = new JScrollPane();
		tabbedPane.addTab("Booster", null, scrollPane_1, null);

		JList<MagicCard> list_1 = new JList<>();
		list_1.setModel(cardsModel);
		list_1.setCellRenderer(new MagicCardListRenderer());
		scrollPane_1.setViewportView(list_1);

		btnCalculate.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {

				ThreadManager.getInstance().execute(new Runnable() {

					@Override
					public void run() {
						try {
							List<CardShake> prices = MTGControler.getInstance().getEnabledDashBoard().getShakeForEdition((MagicEdition)cboEditions.getSelectedItem());
							boostersModel.clear();
							double total=0;
							Map<String,Double> priceRarity=new HashMap<>();

							for(int i=0;i<(int)boxSizeSpinner.getValue();i++)
							{
								Booster booster =MTGControler.getInstance().getEnabledProviders().generateBooster((MagicEdition) cboEditions.getSelectedItem());
								Collections.reverse(booster.getCards());
								booster.setBoosterNumber(String.valueOf(i+1));

								double price = 0;
								for(MagicCard mc : booster.getCards())
								{
									for(CardShake cs : prices)
										if(cs.getName().equalsIgnoreCase(mc.getName()))
										{
											price += cs.getPrice();
											booster.setPrice(price);
											cs.setCard(mc);

											String rarity=mc.getEditions().get(0).getRarity();

											if(priceRarity.get(rarity)!=null)
												priceRarity.put(rarity,priceRarity.get(rarity)+cs.getPrice());
											else
												priceRarity.put(rarity,cs.getPrice());
										}
								}
								boostersModel.addLine(booster);
								total = total+booster.getPrice();

								StringBuilder temp = new StringBuilder();
								temp.append("TOTAL: ").append(doubleFormat.format(total)).append("\n");

								for(String s : priceRarity.keySet())
									temp.append(s).append(": ").append(doubleFormat.format(priceRarity.get(s))).append("\n");

								txtDetailBox.setText(temp.toString());
							}

						} catch (Exception e1) {
							logger.error(e1);
						}

					}
				}, "Open Box");

			}
		});

		table.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
	        public void valueChanged(ListSelectionEvent event) {
	        	if(!event.getValueIsAdjusting())
	        	{

	        			int viewRow = table.getSelectedRow();
			        	if(viewRow>-1)
			        	{
			        		int modelRow = table.convertRowIndexToModel(viewRow);
			        		List<MagicCard> list = ((Booster)table.getModel().getValueAt(modelRow, 0)).getCards();
			        		cardsModel.clear();

			        		for(MagicCard mc : list)
			        			cardsModel.addElement(mc);

			        	}
	        	}
	        }
	    });

		if(props.size()>0) {
			Rectangle r = new Rectangle((int)Double.parseDouble(props.getProperty("x")),
										(int)Double.parseDouble(props.getProperty("y")),
										(int)Double.parseDouble(props.getProperty("w")),
										(int)Double.parseDouble(props.getProperty("h")));
			setBounds(r);
			}

		setVisible(true);
	}

Replace Anonymous With Lambda org.magic.gui.dashlet.BoosterBoxDashlet.initGUI.addActionListener.new ActionListener with e -> ThreadManager.getInstance().execute(() -> { in method public initGUI() : void from class org.magic.gui.dashlet.BoosterBoxDashlet


	public void init()
	{
		ThreadManager.getInstance().execute(()->{
				lblLoading.setVisible(true);
				modStandard.init((FORMAT)cboFormats.getSelectedItem());

				try {
				table.setModel(modStandard);
				}
				catch(Exception e)
				{
					MTGLogger.printStackTrace(e);
				}
				props.put("FORMAT",((FORMAT)cboFormats.getSelectedItem()).toString());
				lblLoading.setVisible(false);
				table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());

				lblInfoUpdate.setText(MTGControler.getInstance().getEnabledDashBoard().getName() + "(updated : " + new SimpleDateFormat("dd/MM/yyyy HH:mm").format(MTGControler.getInstance().getEnabledDashBoard().getUpdatedDate())+")");

				List<SortKey> keys = new ArrayList<>();
				SortKey sortKey = new SortKey(3, SortOrder.DESCENDING);//column index 2
				keys.add(sortKey);
				try{
					table.setRowSorter(new TableRowSorter(modStandard) );
					((TableRowSorter)table.getRowSorter()).setSortKeys(keys);
					((TableRowSorter)table.getRowSorter()).sort();
					modStandard.fireTableDataChanged();
					table.packAll();
				}
				catch(Exception e)
				{
					MTGLogger.printStackTrace(e);
				}
		}, "Init Formats Dashlet");
	}

	public void init()
	{
		ThreadManager.getInstance().execute(new Runnable() {

			@Override
			public void run() {
				lblLoading.setVisible(true);
				modStandard.init((FORMAT)cboFormats.getSelectedItem());

				try {
				table.setModel(modStandard);
				}
				catch(Exception e)
				{
					//logger.error("Erreur models " , e);
				}
				props.put("FORMAT",((FORMAT)cboFormats.getSelectedItem()).toString());
				lblLoading.setVisible(false);
				table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());

				lblInfoUpdate.setText(MTGControler.getInstance().getEnabledDashBoard().getName() + "(updated : " + new SimpleDateFormat("dd/MM/yyyy HH:mm").format(MTGControler.getInstance().getEnabledDashBoard().getUpdatedDate())+")");

				List<SortKey> keys = new ArrayList<SortKey>();
				SortKey sortKey = new SortKey(3, SortOrder.DESCENDING);//column index 2
				keys.add(sortKey);
				try{
					table.setRowSorter(new TableRowSorter(modStandard) );
					((TableRowSorter)table.getRowSorter()).setSortKeys(keys);
					((TableRowSorter)table.getRowSorter()).sort();
					modStandard.fireTableDataChanged();
					table.packAll();
				}
				catch(Exception e)
				{

				}

			}
		}, "Init Formats Dashlet");
	}

Replace Anonymous With Lambda org.magic.gui.dashlet.TrendingDashlet.init.execute.new Runnable with () -> {lblLoading.setVisible(true); in method public init() : void from class org.magic.gui.dashlet.TrendingDashlet


	@Override
	public List<ShopItem> search(String search) {
		List<ShopItem> list = new ArrayList<>();
		try
		{

		DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
		DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
		StringBuilder url = new StringBuilder();

			url.append(props.getProperty("URL"))
			   .append("&login=").append(props.getProperty("LOGIN"))
			   .append("&pwd=").append(props.getProperty("PASS"))
			   .append("&version=").append(props.getProperty("VERSION"))
			   .append("&scope=").append(props.getProperty("SCOPE"))
			   .append("&nbproductsperpage=").append(props.getProperty("NB_PRODUCT_PAGE"))
			   .append("&kw=").append(URLEncoder.encode(search,props.getProperty("ENCODING")))
			   .append("&nav=").append(props.getProperty("CATEGORIE"));

		 logger.debug(getName() + " parsing item from " + url) ;

		 Document doc = dBuilder.parse(url.toString());
		 doc.getDocumentElement().normalize();

				NodeList lst =  doc.getElementsByTagName("product");
				for (int temp = 0; temp < lst.getLength(); temp++) {
					 Node nNode = lst.item(temp);
					 if (nNode.getNodeType() == Node.ELEMENT_NODE) {
			             Element e = (Element)nNode;
			             ShopItem it = new ShopItem();
			             it.setId(e.getElementsByTagName("productid").item(0).getTextContent());
						 it.setType(e.getElementsByTagName("topic").item(0).getTextContent());
						 it.setUrl(new URL(e.getElementsByTagName("url").item(0).getTextContent()));

						 it.setImage(new URL(e.getElementsByTagName("image").item(0).getTextContent()));
						 it.setName(e.getElementsByTagName("headline").item(0).getTextContent());
						 it.setShopName(getName());
						 it.setPrice(Double.parseDouble(parsePrice((Element)e.getElementsByTagName("global").item(0))));
						 list.add(it);

					}

				}
		logger.debug(getName() +" found " + list.size() +" items") ;

		return list;

		}
		catch(Exception e)
		{
			logger.error("error in search " + search,e);
		}

		return list;
	}

	@Override
	public List<ShopItem> search(String search) {
		List<ShopItem> list = new ArrayList<ShopItem>();
		try
		{

		DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
		DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
		StringBuilder url = new StringBuilder();

			url.append(props.getProperty("URL"))
			   .append("&login=").append(props.getProperty("LOGIN"))
			   .append("&pwd=").append(props.getProperty("PASS"))
			   .append("&version=").append(props.getProperty("VERSION"))
			   .append("&scope=").append(props.getProperty("SCOPE"))
			   .append("&nbproductsperpage=").append(props.getProperty("NB_PRODUCT_PAGE"))
			   .append("&kw=").append(URLEncoder.encode(search,props.getProperty("ENCODING")))
			   .append("&nav=").append(props.getProperty("CATEGORIE"));

		 logger.debug(getName() + " parsing item from " + url) ;

		 Document doc = dBuilder.parse(url.toString());
		 doc.getDocumentElement().normalize();

				NodeList lst =  doc.getElementsByTagName("product");
				for (int temp = 0; temp < lst.getLength(); temp++) {
					 Node nNode = lst.item(temp);
					 if (nNode.getNodeType() == Node.ELEMENT_NODE) {
			             Element e = (Element)nNode;
			             ShopItem it = new ShopItem();
			             it.setId(e.getElementsByTagName("productid").item(0).getTextContent());
						 it.setType(e.getElementsByTagName("topic").item(0).getTextContent());
						 it.setUrl(new URL(e.getElementsByTagName("url").item(0).getTextContent()));

						 it.setImage(new URL(e.getElementsByTagName("image").item(0).getTextContent()));
						 it.setName(e.getElementsByTagName("headline").item(0).getTextContent());
						 it.setShopName(getName());
						 it.setPrice(Double.parseDouble(parsePrice((Element)e.getElementsByTagName("global").item(0))));
						 list.add(it);

					}

				}
		logger.debug(getName() +" found " + list.size() +" items") ;

		return list;

		}
		catch(Exception e)
		{
			logger.error("error in search " + search,e);
		}

		return list;
	}

Replace Generic With Diamond ArrayList<ShopItem> with ArrayList<> in method public search(search String) : List<ShopItem> from class org.magic.api.shopping.impl.PriceMinisterShopper


	public CardStockTableModel() {
			list=new ArrayList<>();

	}

	public CardStockTableModel() {
			list=new ArrayList<MagicCardStock>();

	}

Replace Generic With Diamond ArrayList<MagicCardStock> with ArrayList<> in method public CardStockTableModel() from class org.magic.gui.models.CardStockTableModel


	public CardsShakerTableModel() {
		list=new ArrayList<>();
	}

	public CardsShakerTableModel() {
		list=new ArrayList<CardShake>();
	}

Replace Generic With Diamond ArrayList<CardShake> with ArrayList<> in method public CardsShakerTableModel() from class org.magic.gui.models.CardsShakerTableModel


	public DeckSelectionModel()
	{

		decks = new ArrayList<>();
		ThreadManager.getInstance().execute(()->{
				for(File f : new File(MTGControler.CONF_DIR,"decks").listFiles() )
				{
					try {
						MagicDeck deck = new MTGDesktopCompanionExport().importDeck(f);
						decks.add(deck);
						fireTableDataChanged();
					} catch (Exception e) {
						MTGLogger.printStackTrace(e);
					}
				}
		}, "loading decks");
	}

	public DeckSelectionModel() {

		decks = new ArrayList<MagicDeck>();

		ThreadManager.getInstance().execute(new Runnable() {

			@Override
			public void run() {
				for(File f : new File(MTGControler.CONF_DIR,"decks").listFiles() )
				{
					try {
						MagicDeck deck = new MTGDesktopCompanionExport().importDeck(f);
						decks.add(deck);
						fireTableDataChanged();
					} catch (Exception e) {
					}
				}

			}
		}, "loading decks");

	}

Replace Anonymous With Lambda org.magic.gui.models.DeckSelectionModel.DeckSelectionModel.execute.new Runnable with () -> {for(File f: new File(MTGControler.CONF_DIR,"decks").listFiles()){tryMagicDeck deck=new MTGDesktopCompanionExport().importDeck(f); in method public DeckSelectionModel() from class org.magic.gui.models.DeckSelectionModel


	public DeckSnifferModel() {
		decks=new ArrayList<>();
	}

	public DeckSnifferModel() {
		decks=new ArrayList<RetrievableDeck>();
	}

Replace Generic With Diamond ArrayList<RetrievableDeck> with ArrayList<> in method public DeckSnifferModel() from class org.magic.gui.models.DeckSnifferModel


	public MagicCardTableModel() {
		cards = new ArrayList<>();

	}

	public MagicCardTableModel() {
		cards = new ArrayList<MagicCard>();

	}

Replace Generic With Diamond ArrayList<MagicCard> with ArrayList<> in method public MagicCardTableModel() from class org.magic.gui.models.MagicCardTableModel


	public void init(List<MagicEdition> editions ){
		this.list=editions;
		mapCount=new TreeMap<>();

		try {
			calculate();
		} catch (Exception e) {
			MTGLogger.printStackTrace(e);
		}

	}

	public void init(List<MagicEdition> editions ){
		this.list=editions;
		mapCount=new TreeMap<MagicEdition,Integer>();

		try {
			calculate();
		} catch (Exception e) {
			MTGLogger.printStackTrace(e);
		}

	}

Replace Generic With Diamond TreeMap<MagicEdition,Integer> with TreeMap<> in method public init(editions List<MagicEdition>) : void from class org.magic.gui.models.MagicEditionsTableModel


	public MagicEditionsTableModel() {
		list = new ArrayList<>();

	}

	public MagicEditionsTableModel() {
		list = new ArrayList<MagicEdition>();

	}

Replace Generic With Diamond ArrayList<MagicEdition> with ArrayList<> in method public MagicEditionsTableModel() from class org.magic.gui.models.MagicEditionsTableModel


	public ShopItemTableModel() {
		items=new ArrayList<>();
	}

	public ShopItemTableModel() {
		items=new ArrayList<ShopItem>();
	}

Replace Generic With Diamond ArrayList<ShopItem> with ArrayList<> in method public ShopItemTableModel() from class org.magic.gui.models.ShopItemTableModel


	private GamePanelGUI() {

		setLayout(new BorderLayout(0, 0));

		panneauDroit = new JPanel();

		tokenGenerator= new CockatriceTokenProvider();

		add(panneauDroit, BorderLayout.CENTER);
		panneauDroit.setLayout(new BorderLayout(0, 0));

						panelInfo = new JPanel();
						panneauDroit.add(panelInfo, BorderLayout.WEST);
						panelInfo.setLayout(new BorderLayout(0, 0));

						JPanel panelActions = new JPanel();
						panelActions.setAlignmentY(Component.TOP_ALIGNMENT);
						panelInfo.add(panelActions, BorderLayout.SOUTH);
						GridBagLayout gbl_panelActions = new GridBagLayout();
						gbl_panelActions.columnWidths = new int[]{30, 20, 0};
						gbl_panelActions.rowHeights = new int[]{23, 0, 23, 0, 0, 0};
						gbl_panelActions.columnWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
						gbl_panelActions.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
						panelActions.setLayout(gbl_panelActions);

						JButton btnNewGame = new JButton(MTGControler.getInstance().getLangService().getCapitalize("CHOOSE_DECK"));
						btnNewGame.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent ae) {
								JDeckChooserDialog choose = new JDeckChooserDialog();
								choose.setVisible(true);
								try {
									MagicDeck deck = choose.getSelectedDeck();
									if(deck!=null){

										Player p1 = MTGControler.getInstance().getProfilPlayer();
										p1.setDeck(deck);
										setPlayer(p1);
									}
								} catch (Exception e) {
									MTGLogger.printStackTrace(e);
								}
							}
						});
						GridBagConstraints gbc_btnNewGame = new GridBagConstraints();
						gbc_btnNewGame.fill = GridBagConstraints.BOTH;
						gbc_btnNewGame.insets = new Insets(0, 0, 5, 5);
						gbc_btnNewGame.gridx = 0;
						gbc_btnNewGame.gridy = 0;
						panelActions.add(btnNewGame, gbc_btnNewGame);

						JButton btnSideboard = new JButton(MTGControler.getInstance().getLangService().getCapitalize("SIDEBOARD"));
						btnSideboard.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								DeckSideBoardSwitcherDialog gui = new DeckSideBoardSwitcherDialog(player.getDeck());
								gui.setVisible(true);
								player.setDeck(gui.getDeck());
							}
						});
						GridBagConstraints gbc_btnSideboard = new GridBagConstraints();
						gbc_btnSideboard.fill = GridBagConstraints.HORIZONTAL;
						gbc_btnSideboard.insets = new Insets(0, 0, 5, 5);
						gbc_btnSideboard.gridx = 0;
						gbc_btnSideboard.gridy = 1;
						panelActions.add(btnSideboard, gbc_btnSideboard);

						JButton btnStart = new JButton(MTGControler.getInstance().getLangService().getCapitalize("START"));
						btnStart.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent ae) {
								GameManager.getInstance().removePlayers();
								GameManager.getInstance().addPlayer(player);
								GameManager.getInstance().addPlayer(new Player(MTGControler.getInstance().getLangService().getCapitalize("PLAYER")+" 2",20));

								GameManager.getInstance().initGame();
								manaPoolPanel.init(player.getManaPool());
								((DefaultListModel)listActions.getModel()).removeAllElements();
								player.shuffleLibrary();
								turnsPanel.initTurn();
								new DrawHandActions().actionPerformed(ae);
								clean();
							}
						});
						GridBagConstraints gbc_btnStart = new GridBagConstraints();
						gbc_btnStart.fill = GridBagConstraints.HORIZONTAL;
						gbc_btnStart.insets = new Insets(0, 0, 5, 0);
						gbc_btnStart.gridx = 1;
						gbc_btnStart.gridy = 1;
						panelActions.add(btnStart, gbc_btnStart);

						JPanel panel_1 = new JPanel();
						GridBagConstraints gbc_panel_1 = new GridBagConstraints();
						gbc_panel_1.gridheight = 2;
						gbc_panel_1.gridwidth = 2;
						gbc_panel_1.insets = new Insets(0, 0, 5, 0);
						gbc_panel_1.fill = GridBagConstraints.BOTH;
						gbc_panel_1.gridx = 0;
						gbc_panel_1.gridy = 2;
						panelActions.add(panel_1, gbc_panel_1);
						panel_1.setLayout(new BorderLayout(0, 0));

						txtChat = new JTextField(MTGControler.getInstance().getLangService().getCapitalize("SAY_SOMETHING"));
						panel_1.add(txtChat);
						txtChat.addMouseListener(new MouseAdapter() {

							@Override
							public void mouseClicked(MouseEvent e) {
								txtChat.setText("");
							}
						});

						txtChat.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent arg0) {
								player.say(txtChat.getText());
								txtChat.setText("");
							}
						});
						txtChat.setColumns(10);

						JPanel panelPoolandDescribes = new JPanel();
						panelInfo.add(panelPoolandDescribes, BorderLayout.CENTER);

						panelPoolandDescribes.setLayout(new BorderLayout(0, 0));

						JPanel panelPoolandHandsLib = new JPanel();
						panelPoolandDescribes.add(panelPoolandHandsLib, BorderLayout.NORTH);
						panelPoolandHandsLib.setLayout(new BorderLayout(0, 0));

						manaPoolPanel = new ManaPoolPanel();
						manaPoolPanel.setMinimumSize(new Dimension(0, 0));
						panelPoolandHandsLib.add(manaPoolPanel, BorderLayout.CENTER);

						JPanel panelHandLib = new JPanel();
						panelPoolandHandsLib.add(panelHandLib, BorderLayout.SOUTH);
						panelHandLib.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

						lblHandCount = new JLabel("0");
						lblHandCount.setFont(new Font("Tahoma", Font.BOLD, 18));
						lblHandCount.setHorizontalTextPosition(JLabel.CENTER);
						lblHandCount.setIcon(MTGConstants.ICON_GAME_HAND);
						panelHandLib.add(lblHandCount);

						lblLibraryCount = new JLabel("");
						lblLibraryCount.setHorizontalTextPosition(SwingConstants.CENTER);
						lblLibraryCount.setHorizontalAlignment(SwingConstants.CENTER);
						lblLibraryCount.setFont(new Font("Tahoma", Font.BOLD, 18));
						lblLibraryCount.setIcon(MTGConstants.ICON_GAME_LIBRARY);
						panelHandLib.add(lblLibraryCount);

						JPanel lifePanel = new JPanel();
						panelPoolandHandsLib.add(lifePanel, BorderLayout.WEST);
						lifePanel.setAlignmentY(Component.TOP_ALIGNMENT);
						GridBagLayout gbl_lifePanel = new GridBagLayout();
						gbl_lifePanel.columnWidths = new int[]{60, 0};
						gbl_lifePanel.rowHeights = new int[]{64, 0, 0};
						gbl_lifePanel.columnWeights = new double[]{0.0, Double.MIN_VALUE};
						gbl_lifePanel.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
						lifePanel.setLayout(gbl_lifePanel);

						lblPlayer = new JLabel("");
						lblPlayer.setVerticalAlignment(SwingConstants.BOTTOM);
						lblPlayer.setIcon(MTGConstants.ICON_GAME_PLANESWALKER);
						GridBagConstraints gbc_lblPlayer = new GridBagConstraints();
						gbc_lblPlayer.anchor = GridBagConstraints.WEST;
						gbc_lblPlayer.insets = new Insets(0, 0, 5, 0);
						gbc_lblPlayer.gridx = 0;
						gbc_lblPlayer.gridy = 0;
						lifePanel.add(lblPlayer, gbc_lblPlayer);

								JPanel panel = new JPanel();
								GridBagConstraints gbc_panel = new GridBagConstraints();
								gbc_panel.anchor = GridBagConstraints.NORTHWEST;
								gbc_panel.gridx = 0;
								gbc_panel.gridy = 1;
								lifePanel.add(panel, gbc_panel);
								panel.setLayout(new GridLayout(2, 2, 0, 0));

										JLabel lblLife = new JLabel("");
										panel.add(lblLife);
										lblLife.setHorizontalAlignment(SwingConstants.CENTER);
										lblLife.setIcon(MTGConstants.ICON_GAME_LIFE);

										spinLife = new JSpinner();
										panel.add(spinLife);
										spinLife.setFont(new Font("Tahoma", Font.BOLD, 17));

										JLabel lblPoison = new JLabel("");
										panel.add(lblPoison);
										lblPoison.setHorizontalAlignment(SwingConstants.CENTER);
										lblPoison.setIcon(MTGConstants.ICON_GAME_POISON);

										spinPoison = new JSpinner();
										panel.add(spinPoison);
										spinPoison.setFont(new Font("Tahoma", Font.BOLD, 15));

								spinPoison.addChangeListener(new ChangeListener() {

									public void stateChanged(ChangeEvent e) {
										if(player !=null)
											player.setPoisonCounter((int)spinPoison.getValue());

									}
								});
								spinLife.addChangeListener(new ChangeListener() {

									public void stateChanged(ChangeEvent e) {
										if(player !=null)
											player.setLife((int)spinLife.getValue());

									}
								});

								JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
								panelPoolandDescribes.add(tabbedPane, BorderLayout.CENTER);

								JScrollPane scrollActions = new JScrollPane();

								scrollActions.setPreferredSize(new Dimension((int)MTGControler.getInstance().getCardsDimension().getWidth(), 0));
								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("EVENTS"), null, scrollActions, null);

								listActions = new JList<>();
								listActions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
								listActions.setModel(new DefaultListModel<AbstractAction>());
								scrollActions.setViewportView(listActions);

								JPanel pane = new JPanel();
								pane.setLayout(new BorderLayout());

								panneauHaut = new LightDescribeCardPanel();
								pane.add(panneauHaut, BorderLayout.CENTER);

								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DESCRIPTION"), null, pane, null);

								JPanel panelPics = new JPanel();
								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PICTURES"), null, panelPics, null);
								panelPics.setLayout(new BorderLayout(0, 0));

								lblThumbnailPics = new JLabel("");
								lblThumbnailPics.setHorizontalTextPosition(SwingConstants.CENTER);
								lblThumbnailPics.setHorizontalAlignment(SwingConstants.CENTER);
								panelPics.add(lblThumbnailPics);

								JPanel panelLibraryAndGrave = new JPanel();
								panneauDroit.add(panelLibraryAndGrave, BorderLayout.EAST);
								panelLibraryAndGrave.setLayout(new BorderLayout(0, 0));

								JPanel panelDeck = new JPanel();
								panelLibraryAndGrave.add(panelDeck, BorderLayout.NORTH);

								panelLibrary = new LibraryPanel();
								panelLibrary.setPreferredSize(new Dimension(170, 215));
								panelLibrary.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

										panelDeck.setLayout(new BoxLayout(panelDeck, BoxLayout.Y_AXIS));
										panelDeck.add(panelLibrary);

										exilPanel = new ExilPanel();
										exilPanel.setPreferredSize(new Dimension(0, 50));

										panelDeck.add(exilPanel);

										panelLibrary.addMouseListener(new MouseAdapter() {
											@Override
											public void mouseClicked(MouseEvent me) {

												if(SwingUtilities.isLeftMouseButton(me))
												{
													new DrawActions().actionPerformed( new ActionEvent(me.getSource(), me.getID(), me.paramString()));
												}

											}
										});
										JScrollPane js = new JScrollPane();
										panelGrave = new GraveyardPanel();
										js.setViewportView(panelGrave);
										panelLibraryAndGrave.add(js);

										panelBattleField = new BattleFieldPanel();
										panneauDroit.add(panelBattleField, BorderLayout.CENTER);
										panelBattleField.setLayout(null);

										JPanel panelBottom = new JPanel();
										panneauDroit.add(panelBottom, BorderLayout.SOUTH);

										handPanel = new HandPanel();
										handPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
										handPanel.enableDragging(true);
										handPanel.setThumbnailSize(MTGControler.getInstance().getCardsDimension());
										panelBottom.setLayout(new BorderLayout(0, 0));
										handPanel.setRupture(7);

										JScrollPane scrollPane = new JScrollPane();
										panelBottom.add(scrollPane);
										scrollPane.setPreferredSize(new Dimension(2, handPanel.getCardHeight()));

										scrollPane.setViewportView(handPanel);

										turnsPanel = new TurnsPanel();
										panelBottom.add(turnsPanel, BorderLayout.NORTH);

	}

	private GamePanelGUI() {

		setLayout(new BorderLayout(0, 0));

		panneauDroit = new JPanel();

		tokenGenerator= new CockatriceTokenProvider();

		add(panneauDroit, BorderLayout.CENTER);
		panneauDroit.setLayout(new BorderLayout(0, 0));

						panelInfo = new JPanel();
						panneauDroit.add(panelInfo, BorderLayout.WEST);
						panelInfo.setLayout(new BorderLayout(0, 0));

						JPanel panelActions = new JPanel();
						panelActions.setAlignmentY(Component.TOP_ALIGNMENT);
						panelInfo.add(panelActions, BorderLayout.SOUTH);
						GridBagLayout gbl_panelActions = new GridBagLayout();
						gbl_panelActions.columnWidths = new int[]{30, 20, 0};
						gbl_panelActions.rowHeights = new int[]{23, 0, 23, 0, 0, 0};
						gbl_panelActions.columnWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
						gbl_panelActions.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
						panelActions.setLayout(gbl_panelActions);

						JButton btnNewGame = new JButton(MTGControler.getInstance().getLangService().getCapitalize("CHOOSE_DECK"));
						btnNewGame.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent ae) {
								JDeckChooserDialog choose = new JDeckChooserDialog();
								choose.setVisible(true);
								try {
									MagicDeck deck = choose.getSelectedDeck();
									if(deck!=null){

										Player p1 = MTGControler.getInstance().getProfilPlayer();
										p1.setDeck(deck);
										setPlayer(p1);
									}
								} catch (Exception e) {
									MTGLogger.printStackTrace(e);
								}
							}
						});
						GridBagConstraints gbc_btnNewGame = new GridBagConstraints();
						gbc_btnNewGame.fill = GridBagConstraints.BOTH;
						gbc_btnNewGame.insets = new Insets(0, 0, 5, 5);
						gbc_btnNewGame.gridx = 0;
						gbc_btnNewGame.gridy = 0;
						panelActions.add(btnNewGame, gbc_btnNewGame);

						JButton btnSideboard = new JButton(MTGControler.getInstance().getLangService().getCapitalize("SIDEBOARD"));
						btnSideboard.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent e) {
								DeckSideBoardSwitcherDialog gui = new DeckSideBoardSwitcherDialog(player.getDeck());
								gui.setVisible(true);
								player.setDeck(gui.getDeck());
							}
						});
						GridBagConstraints gbc_btnSideboard = new GridBagConstraints();
						gbc_btnSideboard.fill = GridBagConstraints.HORIZONTAL;
						gbc_btnSideboard.insets = new Insets(0, 0, 5, 5);
						gbc_btnSideboard.gridx = 0;
						gbc_btnSideboard.gridy = 1;
						panelActions.add(btnSideboard, gbc_btnSideboard);

						JButton btnStart = new JButton(MTGControler.getInstance().getLangService().getCapitalize("START"));
						btnStart.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent ae) {
								GameManager.getInstance().removePlayers();
								GameManager.getInstance().addPlayer(player);
								GameManager.getInstance().addPlayer(new Player(MTGControler.getInstance().getLangService().getCapitalize("PLAYER")+" 2",20));

								GameManager.getInstance().initGame();
								manaPoolPanel.init(player.getManaPool());
								((DefaultListModel)listActions.getModel()).removeAllElements();
								player.shuffleLibrary();
								turnsPanel.initTurn();
								new DrawHandActions().actionPerformed(ae);
								clean();
							}
						});
						GridBagConstraints gbc_btnStart = new GridBagConstraints();
						gbc_btnStart.fill = GridBagConstraints.HORIZONTAL;
						gbc_btnStart.insets = new Insets(0, 0, 5, 0);
						gbc_btnStart.gridx = 1;
						gbc_btnStart.gridy = 1;
						panelActions.add(btnStart, gbc_btnStart);

						JPanel panel_1 = new JPanel();
						GridBagConstraints gbc_panel_1 = new GridBagConstraints();
						gbc_panel_1.gridheight = 2;
						gbc_panel_1.gridwidth = 2;
						gbc_panel_1.insets = new Insets(0, 0, 5, 0);
						gbc_panel_1.fill = GridBagConstraints.BOTH;
						gbc_panel_1.gridx = 0;
						gbc_panel_1.gridy = 2;
						panelActions.add(panel_1, gbc_panel_1);
						panel_1.setLayout(new BorderLayout(0, 0));

						txtChat = new JTextField(MTGControler.getInstance().getLangService().getCapitalize("SAY_SOMETHING"));
						panel_1.add(txtChat);
						txtChat.addMouseListener(new MouseAdapter() {

							@Override
							public void mouseClicked(MouseEvent e) {
								txtChat.setText("");
							}
						});

						txtChat.addActionListener(new ActionListener() {
							public void actionPerformed(ActionEvent arg0) {
								player.say(txtChat.getText());
								txtChat.setText("");
							}
						});
						txtChat.setColumns(10);

						JPanel panelPoolandDescribes = new JPanel();
						panelInfo.add(panelPoolandDescribes, BorderLayout.CENTER);

						panelPoolandDescribes.setLayout(new BorderLayout(0, 0));

						JPanel panelPoolandHandsLib = new JPanel();
						panelPoolandDescribes.add(panelPoolandHandsLib, BorderLayout.NORTH);
						panelPoolandHandsLib.setLayout(new BorderLayout(0, 0));

						manaPoolPanel = new ManaPoolPanel();
						manaPoolPanel.setMinimumSize(new Dimension(0, 0));
						panelPoolandHandsLib.add(manaPoolPanel, BorderLayout.CENTER);

						JPanel panelHandLib = new JPanel();
						panelPoolandHandsLib.add(panelHandLib, BorderLayout.SOUTH);
						panelHandLib.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

						lblHandCount = new JLabel("0");
						lblHandCount.setFont(new Font("Tahoma", Font.BOLD, 18));
						lblHandCount.setHorizontalTextPosition(JLabel.CENTER);
						lblHandCount.setIcon(MTGConstants.ICON_GAME_HAND);
						panelHandLib.add(lblHandCount);

						lblLibraryCount = new JLabel("");
						lblLibraryCount.setHorizontalTextPosition(SwingConstants.CENTER);
						lblLibraryCount.setHorizontalAlignment(SwingConstants.CENTER);
						lblLibraryCount.setFont(new Font("Tahoma", Font.BOLD, 18));
						lblLibraryCount.setIcon(MTGConstants.ICON_GAME_LIBRARY);
						panelHandLib.add(lblLibraryCount);

						JPanel lifePanel = new JPanel();
						panelPoolandHandsLib.add(lifePanel, BorderLayout.WEST);
						lifePanel.setAlignmentY(Component.TOP_ALIGNMENT);
						GridBagLayout gbl_lifePanel = new GridBagLayout();
						gbl_lifePanel.columnWidths = new int[]{60, 0};
						gbl_lifePanel.rowHeights = new int[]{64, 0, 0};
						gbl_lifePanel.columnWeights = new double[]{0.0, Double.MIN_VALUE};
						gbl_lifePanel.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
						lifePanel.setLayout(gbl_lifePanel);

						lblPlayer = new JLabel("");
						lblPlayer.setVerticalAlignment(SwingConstants.BOTTOM);
						lblPlayer.setIcon(MTGConstants.ICON_GAME_PLANESWALKER);
						GridBagConstraints gbc_lblPlayer = new GridBagConstraints();
						gbc_lblPlayer.anchor = GridBagConstraints.WEST;
						gbc_lblPlayer.insets = new Insets(0, 0, 5, 0);
						gbc_lblPlayer.gridx = 0;
						gbc_lblPlayer.gridy = 0;
						lifePanel.add(lblPlayer, gbc_lblPlayer);

								JPanel panel = new JPanel();
								GridBagConstraints gbc_panel = new GridBagConstraints();
								gbc_panel.anchor = GridBagConstraints.NORTHWEST;
								gbc_panel.gridx = 0;
								gbc_panel.gridy = 1;
								lifePanel.add(panel, gbc_panel);
								panel.setLayout(new GridLayout(2, 2, 0, 0));

										JLabel lblLife = new JLabel("");
										panel.add(lblLife);
										lblLife.setHorizontalAlignment(SwingConstants.CENTER);
										lblLife.setIcon(MTGConstants.ICON_GAME_LIFE);

										spinLife = new JSpinner();
										panel.add(spinLife);
										spinLife.setFont(new Font("Tahoma", Font.BOLD, 17));

										JLabel lblPoison = new JLabel("");
										panel.add(lblPoison);
										lblPoison.setHorizontalAlignment(SwingConstants.CENTER);
										lblPoison.setIcon(MTGConstants.ICON_GAME_POISON);

										spinPoison = new JSpinner();
										panel.add(spinPoison);
										spinPoison.setFont(new Font("Tahoma", Font.BOLD, 15));

								spinPoison.addChangeListener(new ChangeListener() {

									public void stateChanged(ChangeEvent e) {
										if(player !=null)
											player.setPoisonCounter((int)spinPoison.getValue());

									}
								});
								spinLife.addChangeListener(new ChangeListener() {

									public void stateChanged(ChangeEvent e) {
										if(player !=null)
											player.setLife((int)spinLife.getValue());

									}
								});

								JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
								panelPoolandDescribes.add(tabbedPane, BorderLayout.CENTER);

								JScrollPane scrollActions = new JScrollPane();

								scrollActions.setPreferredSize(new Dimension((int)MTGControler.getInstance().getCardsDimension().getWidth(), 0));
								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("EVENTS"), null, scrollActions, null);

								listActions = new JList<AbstractAction>();
								listActions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
								listActions.setModel(new DefaultListModel<AbstractAction>());
								scrollActions.setViewportView(listActions);

								JPanel pane = new JPanel();
								pane.setLayout(new BorderLayout());

								panneauHaut = new LightDescribeCardPanel();
								pane.add(panneauHaut, BorderLayout.CENTER);

								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DESCRIPTION"), null, pane, null);

								JPanel panelPics = new JPanel();
								tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PICTURES"), null, panelPics, null);
								panelPics.setLayout(new BorderLayout(0, 0));

								lblThumbnailPics = new JLabel("");
								lblThumbnailPics.setHorizontalTextPosition(SwingConstants.CENTER);
								lblThumbnailPics.setHorizontalAlignment(SwingConstants.CENTER);
								panelPics.add(lblThumbnailPics);

								JPanel panelLibraryAndGrave = new JPanel();
								panneauDroit.add(panelLibraryAndGrave, BorderLayout.EAST);
								panelLibraryAndGrave.setLayout(new BorderLayout(0, 0));

								JPanel panelDeck = new JPanel();
								panelLibraryAndGrave.add(panelDeck, BorderLayout.NORTH);

								panelLibrary = new LibraryPanel();
								panelLibrary.setPreferredSize(new Dimension(170, 215));
								panelLibrary.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

										panelDeck.setLayout(new BoxLayout(panelDeck, BoxLayout.Y_AXIS));
										panelDeck.add(panelLibrary);

										exilPanel = new ExilPanel();
										exilPanel.setPreferredSize(new Dimension(0, 50));

										panelDeck.add(exilPanel);

										panelLibrary.addMouseListener(new MouseAdapter() {
											@Override
											public void mouseClicked(MouseEvent me) {

												if(SwingUtilities.isLeftMouseButton(me))
												{
													new DrawActions().actionPerformed( new ActionEvent(me.getSource(), me.getID(), me.paramString()));
												}

											}
										});
										JScrollPane js = new JScrollPane();
										panelGrave = new GraveyardPanel();
										js.setViewportView(panelGrave);
										panelLibraryAndGrave.add(js);

										panelBattleField = new BattleFieldPanel();
										panneauDroit.add(panelBattleField, BorderLayout.CENTER);
										panelBattleField.setLayout(null);

										JPanel panelBottom = new JPanel();
										panneauDroit.add(panelBottom, BorderLayout.SOUTH);

										handPanel = new HandPanel();
										handPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
										handPanel.enableDragging(true);
										handPanel.setThumbnailSize(MTGControler.getInstance().getCardsDimension());
										panelBottom.setLayout(new BorderLayout(0, 0));
										handPanel.setRupture(7);

										JScrollPane scrollPane = new JScrollPane();
										panelBottom.add(scrollPane);
										scrollPane.setPreferredSize(new Dimension(2, handPanel.getCardHeight()));

										scrollPane.setViewportView(handPanel);

										turnsPanel = new TurnsPanel();
										panelBottom.add(turnsPanel, BorderLayout.NORTH);

	}

Replace Generic With Diamond JList<AbstractAction> with JList<> in method private GamePanelGUI() from class org.magic.game.gui.components.GamePanelGUI


	public EditionsShakerTableModel() {
		provider=MTGControler.getInstance().getEnabledDashBoard();
		list=new ArrayList<>();
	}

	public EditionsShakerTableModel() {
		provider=MTGControler.getInstance().getEnabledDashBoard();
		list=new ArrayList<CardShake>();
	}

Replace Generic With Diamond ArrayList<CardShake> with ArrayList<> in method public EditionsShakerTableModel() from class org.magic.gui.models.EditionsShakerTableModel


	protected void importDeckFromString(final String stringDeck) {
		ThreadManager.getInstance().execute(()-> {
				String[] line = stringDeck.split("\n");
				for (String l : line) {
					int nb = Integer.parseInt(l.substring(0, l.indexOf(' ')));
					String name = l.substring(l.indexOf(' '), l.length());
					try {
						MagicCard mc;
						if (name.trim().equalsIgnoreCase("Plains") || name.trim().equalsIgnoreCase("Island")
								|| name.trim().equalsIgnoreCase("Swamp") || name.trim().equalsIgnoreCase("Mountain")
								|| name.trim().equalsIgnoreCase("Forest")) {
							MagicEdition ed = new MagicEdition();
							ed.setId(MTGControler.getInstance().get("default-land-deck"));
							mc = MTGControler.getInstance().getEnabledProviders()
									.searchCardByCriteria("name", name.trim(), ed,true).get(0);
						} else {
							mc = MTGControler.getInstance().getEnabledProviders()
									.searchCardByCriteria("name", name.trim(), null,true).get(0);
						}

						if (mc != null) {
							getSelectedMap().put(mc, nb);
							setDeck(deck);
							updatePanels();
							deckmodel.fireTableDataChanged();
							deckSidemodel.fireTableDataChanged();
						}
					} catch (Exception e) {
						logger.error(e);
					}
			}
		}, "importDeckFromString");

	}

	protected void importDeckFromString(final String stringDeck) {
		ThreadManager.getInstance().execute(new Runnable() {

			@Override
			public void run() {
				String[] line = stringDeck.split("\n");
				for (String l : line) {
					int nb = Integer.parseInt(l.substring(0, l.indexOf(' ')));
					String name = l.substring(l.indexOf(' '), l.length());
					// Scanner s = new Scanner(input).useDelimiter("\\s*\\s*");
					try {
						MagicCard mc;
						if (name.trim().equalsIgnoreCase("Plains") || name.trim().equalsIgnoreCase("Island")
								|| name.trim().equalsIgnoreCase("Swamp") || name.trim().equalsIgnoreCase("Mountain")
								|| name.trim().equalsIgnoreCase("Forest")) {
							MagicEdition ed = new MagicEdition();
							ed.setId(MTGControler.getInstance().get("default-land-deck"));
							mc = MTGControler.getInstance().getEnabledProviders()
									.searchCardByCriteria("name", name.trim(), ed,true).get(0);
						} else {
							mc = MTGControler.getInstance().getEnabledProviders()
									.searchCardByCriteria("name", name.trim(), null,true).get(0);
						}

						if (mc != null) {
							getSelectedMap().put(mc, nb);
							setDeck(deck);
							updatePanels();
							deckmodel.fireTableDataChanged();
							deckSidemodel.fireTableDataChanged();
						}
					} catch (Exception e) {
						logger.error(e);
					}

				}

			}
		}, "importDeckFromString");

	}

Replace Anonymous With Lambda org.magic.gui.DeckBuilderGUI.importDeckFromString.execute.new Runnable with () -> {String[] line=stringDeck.split("\n"); in method protected importDeckFromString(stringDeck String) : void from class org.magic.gui.DeckBuilderGUI


	public MtgDesktopCompanion() {

		launch= new MTGSplashScreen();
		MTGLogger.getMTGAppender().addObserver(launch);
		launch.start();

		try {
			boolean updated = MTGControler.getInstance().updateConfigMods();

			logger.debug("result config updated : " + updated);

			if(updated)
				JOptionPane.showMessageDialog(null, MTGControler.getInstance().getLangService().getCapitalize("NEW_MODULE_INSTALLED"));

				MTGLogger.changeLevel(MTGControler.getInstance().get("loglevel"));
				MTGControler.getInstance().getEnabledProviders().init();
				MTGControler.getInstance().getEnabledDAO().init();

				logger.info("Init MTG Desktop Companion GUI");
		}catch (Exception e) {
			logger.error("Error initialisation",e);
			JOptionPane.showMessageDialog(null, e,MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
		}

		ThreadManager.getInstance().runInEdt(()-> {

				MagicGUI gui = new MagicGUI();
						 gui.setLookAndFeel(MTGControler.getInstance().get("lookAndFeel"));
						 gui.setExtendedState(JFrame.MAXIMIZED_BOTH);
						 gui.setVisible(true);

						 launch.stop();
				for(MTGServer serv : MTGControler.getInstance().getEnabledServers())
					if(serv.isAutostart())
						try {
								serv.start();
							} catch (Exception e)
							{
								logger.error(e);
							}
		});
	}

	public MtgDesktopCompanion() {

		launch= new MTGSplashScreen();
		MTGLogger.getMTGAppender().addObserver(launch);
		launch.start();

		try {
			boolean updated = MTGControler.getInstance().updateConfigMods();

			logger.debug("result config updated : " + updated);

			if(updated)
				JOptionPane.showMessageDialog(null, MTGControler.getInstance().getLangService().getCapitalize("NEW_MODULE_INSTALLED"));

				MTGLogger.changeLevel(MTGControler.getInstance().get("loglevel"));
				MTGControler.getInstance().getEnabledProviders().init();
				MTGControler.getInstance().getEnabledDAO().init();

				logger.info("Init MTG Desktop Companion GUI");
		}catch (Exception e) {
			logger.error("Error initialisation",e);
			JOptionPane.showMessageDialog(null, e,MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
		}

		ThreadManager.getInstance().runInEdt(new Runnable() {
			public void run() {

				MagicGUI gui = new MagicGUI();
						 gui.setLookAndFeel(MTGControler.getInstance().get("lookAndFeel"));
						 gui.setExtendedState(JFrame.MAXIMIZED_BOTH);
						 gui.setVisible(true);

						 launch.stop();
				for(MTGServer serv : MTGControler.getInstance().getEnabledServers())
					if(serv.isAutostart())
						try {
								serv.start();
							} catch (Exception e)
							{
								logger.error(e);
							}

			}
		});

	}

Replace Anonymous With Lambda org.magic.api.main.MtgDesktopCompanion.MtgDesktopCompanion.runInEdt.new Runnable with () -> {MagicGUI gui=new MagicGUI(); in method public MtgDesktopCompanion() from class org.magic.api.main.MtgDesktopCompanion


			public void actionPerformed(ActionEvent ae) {
				JPopupMenu menu = new JPopupMenu();

				JMenuItem mnuImportSearch = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("SEARCH_MODULE")));
				mnuImportSearch.setIcon(MTGConstants.ICON_SEARCH);

				mnuImportSearch.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent ae) {
						CardSearchImportDialog cdSearch = new CardSearchImportDialog();
						cdSearch.setVisible(true);
						if(cdSearch.getSelection()!=null)
						{
							for(MagicCard mc : cdSearch.getSelection())
								addCard(mc);
						}
					}
				});
				menu.add(mnuImportSearch);

				JMenuItem mnuCol = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("COLLECTION_MODULE")));
				mnuCol.setIcon(MTGConstants.ICON_COLLECTION);
				mnuCol.addActionListener(collEvent->{
						CollectionChooserDialog diag = new CollectionChooserDialog();
						diag.setVisible(true);
						final MagicCollection col = diag.getSelectedCollection();

						if(col!=null)
						{	ThreadManager.getInstance().execute(()->{
									lblLoading.setVisible(true);
									try {
										importFromCollection(col);
									} catch (SQLException e) {
										JOptionPane.showMessageDialog(null, e, MTGControler.getInstance().getLangService().getCapitalize("ERROR"), JOptionPane.ERROR_MESSAGE);

									}
									lblLoading.setVisible(false);
									updateCount();
							}, "Import stock from collection");
						}

				});
				menu.add(mnuCol);

				JMenuItem webSite = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("WEBSITE")));
				webSite.setIcon(MTGConstants.ICON_WEBSITE);
				webSite.addActionListener(siteEvent-> {
						DeckSnifferDialog diag = new DeckSnifferDialog();
						diag.setModal(true);
						diag.setVisible(true);

						if (diag.getSelectedDeck() != null) {
							lblLoading.setVisible(true);
							MagicDeck deck = diag.getSelectedDeck();
							importFromWebSite(deck);
							updateCount();
							lblLoading.setVisible(false);
						}
				});
				menu.add(webSite);

				for (final CardExporter exp : MTGControler.getInstance().getEnabledDeckExports()) {
					JMenuItem it = new JMenuItem();
					it.setIcon(exp.getIcon());
					it.setText(exp.getName());
					it.addActionListener(itemEvent-> {
							JFileChooser jf = new JFileChooser(".");
							jf.setFileFilter(new FileFilter() {

								@Override
								public String getDescription() {
									return exp.getName();
								}

								@Override
								public boolean accept(File f) {
									if (f.isDirectory())
										return true;

									if (f.getName().endsWith(exp.getFileExtension()))
										return true;

									return false;
								}
							});
							int res = jf.showOpenDialog(null);
							final File f = jf.getSelectedFile();

							if (res == JFileChooser.APPROVE_OPTION)
								ThreadManager.getInstance().execute(()->{
										try {
											lblLoading.setVisible(true);
											List<MagicCardStock> list = exp.importStock(f);
											for(MagicCardStock mc : list)
											{
												addStock(mc);
											}
											model.fireTableDataChanged();
											updateCount();
											lblLoading.setVisible(false);
											JOptionPane.showMessageDialog(null, MTGControler.getInstance().getLangService().combine("IMPORT","FINISHED"),exp.getName() + " "+MTGControler.getInstance().getLangService().getCapitalize("FINISHED"), JOptionPane.INFORMATION_MESSAGE);

										} catch (Exception e) {
											logger.error(e);
											lblLoading.setVisible(false);
											JOptionPane.showMessageDialog(null, e, MTGControler.getInstance().getLangService().getCapitalize("ERROR"), JOptionPane.ERROR_MESSAGE);
										}

								}, "import " + exp);
					});

					menu.add(it);
				}

				Component b = (Component) ae.getSource();
				Point p = b.getLocationOnScreen();
				menu.show(b, 0, 0);
				menu.setLocation(p.x, p.y + b.getHeight());
			}

			public void actionPerformed(ActionEvent ae) {
				JPopupMenu menu = new JPopupMenu();

				JMenuItem mnuImportSearch = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("SEARCH_MODULE")));
				mnuImportSearch.setIcon(MTGConstants.ICON_SEARCH);

				mnuImportSearch.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent ae) {
						CardSearchImportDialog cdSearch = new CardSearchImportDialog();
						cdSearch.setVisible(true);
						if(cdSearch.getSelection()!=null)
						{
							for(MagicCard mc : cdSearch.getSelection())
								addCard(mc);
						}
					}
				});
				menu.add(mnuImportSearch);

				JMenuItem mnuCol = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("COLLECTION_MODULE")));
				mnuCol.setIcon(MTGConstants.ICON_COLLECTION);
				mnuCol.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						CollectionChooserDialog diag = new CollectionChooserDialog();
						diag.setVisible(true);
						final MagicCollection col = diag.getSelectedCollection();

						if(col!=null)
						{	ThreadManager.getInstance().execute(new Runnable() {

								@Override
								public void run() {
									lblLoading.setVisible(true);
									try {
										importFromCollection(col);
									} catch (SQLException e) {
										JOptionPane.showMessageDialog(null, e, MTGControler.getInstance().getLangService().getCapitalize("ERROR"), JOptionPane.ERROR_MESSAGE);

									}
									lblLoading.setVisible(false);
									updateCount();
								}
							}, "Import stock from collection");
						}

					}
				});
				menu.add(mnuCol);

				JMenuItem webSite = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("IMPORT_FROM",MTGControler.getInstance().getLangService().get("WEBSITE")));
				webSite.setIcon(MTGConstants.ICON_WEBSITE);
				webSite.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent arg0) {
						DeckSnifferDialog diag = new DeckSnifferDialog();
						diag.setModal(true);
						diag.setVisible(true);

						if (diag.getSelectedDeck() != null) {
							lblLoading.setVisible(true);
							MagicDeck deck = diag.getSelectedDeck();
							importFromWebSite(deck);
							updateCount();
							lblLoading.setVisible(false);
						}
					}
				});
				menu.add(webSite);

				for (final CardExporter exp : MTGControler.getInstance().getEnabledDeckExports()) {
					JMenuItem it = new JMenuItem();
					it.setIcon(exp.getIcon());
					it.setText(exp.getName());
					it.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent arg0) {
							JFileChooser jf = new JFileChooser(".");
							jf.setFileFilter(new FileFilter() {

								@Override
								public String getDescription() {
									return exp.getName();
								}

								@Override
								public boolean accept(File f) {
									if (f.isDirectory())
										return true;

									if (f.getName().endsWith(exp.getFileExtension()))
										return true;

									return false;
								}
							});
							int res = jf.showOpenDialog(null);
							final File f = jf.getSelectedFile();

							if (res == JFileChooser.APPROVE_OPTION)
								ThreadManager.getInstance().execute(new Runnable() {

									@Override
									public void run() {
										try {
											lblLoading.setVisible(true);
											List<MagicCardStock> list = exp.importStock(f);
											for(MagicCardStock mc : list)
											{
												addStock(mc);
											}
											model.fireTableDataChanged();
											updateCount();
											lblLoading.setVisible(false);
											JOptionPane.showMessageDialog(null, MTGControler.getInstance().getLangService().combine("IMPORT","FINISHED"),exp.getName() + " "+MTGControler.getInstance().getLangService().getCapitalize("FINISHED"), JOptionPane.INFORMATION_MESSAGE);

										} catch (Exception e) {
											logger.error(e);
											lblLoading.setVisible(false);
											JOptionPane.showMessageDialog(null, e, MTGControler.getInstance().getLangService().getCapitalize("ERROR"), JOptionPane.ERROR_MESSAGE);
										}

									}
								}, "import " + exp);
						}
					});

					menu.add(it);
				}

				Component b = (Component) ae.getSource();
				Point p = b.getLocationOnScreen();
				menu.show(b, 0, 0);
				menu.setLocation(p.x, p.y + b.getHeight());
			}

Replace Anonymous With Lambda org.magic.gui.StockPanelGUI.StockPanelGUI.addActionListener.new ActionListener.actionPerformed.addActionListener.new ActionListener with collEvent -> {CollectionChooserDialog diag=new CollectionChooserDialog(); in method public actionPerformed(ae ActionEvent) : void from class org.magic.gui.StockPanelGUI.StockPanelGUI.addActionListener.new ActionListener