	public void initGUI() {

		boosterProvider = new BoosterPicturesProvider();

		setLayout(new BorderLayout(0, 0));

		splitPane = new JSplitPane();

		splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
		panneauHaut = new JPanel();

		this.add(splitPane);

		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[] { 104, 333, 0, 0 };
		gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0, 1.0E-4 };
		gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0,
				1.0E-4 };
		panneauHaut.setLayout(gridBagLayout);

						JLabel setLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION")+" :");
						GridBagConstraints labelgbc8 = new GridBagConstraints();
						labelgbc8.insets = new Insets(5, 5, 5, 5);
						labelgbc8.gridx = 0;
						labelgbc8.gridy = 0;
						panneauHaut.add(setLabel, labelgbc8);

						setJTextField = new JTextField();

						GridBagConstraints componentGbc8 = new GridBagConstraints();
						componentGbc8.insets = new Insets(5, 0, 5, 5);
						componentGbc8.fill = GridBagConstraints.HORIZONTAL;
						componentGbc8.gridx = 1;
						componentGbc8.gridy = 0;
						panneauHaut.add(setJTextField, componentGbc8);

						JLabel typeLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_TYPE")+" :");
						GridBagConstraints labelgbc11 = new GridBagConstraints();
						labelgbc11.insets = new Insets(5, 5, 5, 5);
						labelgbc11.gridx = 0;
						labelgbc11.gridy = 1;
						panneauHaut.add(typeLabel, labelgbc11);

						typeJTextField = new JTextField();
						GridBagConstraints componentGbc11 = new GridBagConstraints();
						componentGbc11.insets = new Insets(5, 0, 5, 5);
						componentGbc11.fill = GridBagConstraints.HORIZONTAL;
						componentGbc11.gridx = 1;
						componentGbc11.gridy = 1;
						panneauHaut.add(typeJTextField, componentGbc11);

		JLabel releaseDateLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("DATE_RELEASE")+" :");
		GridBagConstraints labelgbc7 = new GridBagConstraints();
		labelgbc7.insets = new Insets(5, 5, 5, 5);
		labelgbc7.gridx = 0;
		labelgbc7.gridy = 2;
		panneauHaut.add(releaseDateLabel, labelgbc7);

		releaseDateJTextField = new JTextField();

		GridBagConstraints componentGbc7 = new GridBagConstraints();
		componentGbc7.insets = new Insets(5, 0, 5, 5);
		componentGbc7.fill = GridBagConstraints.HORIZONTAL;
		componentGbc7.gridx = 1;
		componentGbc7.gridy = 2;
		panneauHaut.add(releaseDateJTextField, componentGbc7);

				JLabel borderLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_BORDER")+" :");
				GridBagConstraints labelgbc2 = new GridBagConstraints();
				labelgbc2.insets = new Insets(5, 5, 5, 5);
				labelgbc2.gridx = 0;
				labelgbc2.gridy = 3;
				panneauHaut.add(borderLabel, labelgbc2);

				borderJTextField = new JTextField();
				GridBagConstraints componentGbc2 = new GridBagConstraints();
				componentGbc2.fill = GridBagConstraints.HORIZONTAL;
				componentGbc2.insets = new Insets(5, 0, 5, 5);
				componentGbc2.gridx = 1;
				componentGbc2.gridy = 3;
				panneauHaut.add(borderJTextField, componentGbc2);

				JLabel cardCountLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_CARD_COUNT")+" :");
				GridBagConstraints labelgbc3 = new GridBagConstraints();
				labelgbc3.insets = new Insets(5, 5, 5, 5);
				labelgbc3.gridx = 0;
				labelgbc3.gridy = 4;
				panneauHaut.add(cardCountLabel, labelgbc3);

				cardCountTextField = new JTextField();

				GridBagConstraints componentGbc3 = new GridBagConstraints();
				componentGbc3.insets = new Insets(5, 0, 5, 5);
				componentGbc3.fill = GridBagConstraints.HORIZONTAL;
				componentGbc3.gridx = 1;
				componentGbc3.gridy = 4;
				panneauHaut.add(cardCountTextField, componentGbc3);

				lblBlock = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_BLOCK")+" :");
				GridBagConstraints gbclblBlock = new GridBagConstraints();
				gbclblBlock.insets = new Insets(0, 0, 5, 5);
				gbclblBlock.gridx = 0;
				gbclblBlock.gridy = 5;
				panneauHaut.add(lblBlock, gbclblBlock);

				blockJTextField = new JTextField();
				GridBagConstraints gbcblockJTextField = new GridBagConstraints();
				gbcblockJTextField.insets = new Insets(0, 0, 5, 5);
				gbcblockJTextField.fill = GridBagConstraints.HORIZONTAL;
				gbcblockJTextField.gridx = 1;
				gbcblockJTextField.gridy = 5;
				panneauHaut.add(blockJTextField, gbcblockJTextField);
				blockJTextField.setColumns(10);

				lblId = new JLabel("ID :");
				GridBagConstraints gbclblId = new GridBagConstraints();
				gbclblId.insets = new Insets(0, 0, 5, 5);
				gbclblId.gridx = 0;
				gbclblId.gridy = 6;
				panneauHaut.add(lblId, gbclblId);

				idJtextField = new JTextField();

				GridBagConstraints gbctxtID = new GridBagConstraints();
				gbctxtID.insets = new Insets(0, 0, 5, 5);
				gbctxtID.fill = GridBagConstraints.HORIZONTAL;
				gbctxtID.gridx = 1;
				gbctxtID.gridy = 6;
				panneauHaut.add(idJtextField, gbctxtID);
				idJtextField.setColumns(10);

				splitPane.setLeftComponent(panneauHaut);

				lblOnlineSet = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_ONLINE")+" :");
				GridBagConstraints gbclblOnlineSet = new GridBagConstraints();
				gbclblOnlineSet.insets = new Insets(0, 0, 5, 5);
				gbclblOnlineSet.gridx = 0;
				gbclblOnlineSet.gridy = 7;
				panneauHaut.add(lblOnlineSet, gbclblOnlineSet);

				chkOnline = new JCheckBox("");
				GridBagConstraints gbcchkOnline = new GridBagConstraints();
				gbcchkOnline.anchor = GridBagConstraints.WEST;
				gbcchkOnline.insets = new Insets(0, 0, 5, 5);
				gbcchkOnline.gridx = 1;
				gbcchkOnline.gridy = 7;
				panneauHaut.add(chkOnline, gbcchkOnline);

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

				if(openBooster)
				{
				  btnOpenBooster = new JButton(MTGControler.getInstance().getLangService().getCapitalize("OPEN_BOOSTER")+" :");
				  panneauBooster.add(btnOpenBooster, BorderLayout.NORTH);
				  btnOpenBooster.addActionListener(ae->{
							try {
								CardSearchPanel.getInst().thumbnail(MTGControler.getInstance().getEnabledProviders().generateBooster(magicEdition).getCards());
							} catch (Exception e) {
								logger.error("Error loading booster for " + magicEdition,e);
							}
					});

				}

				lblBoosterPic = new JLabel();
				panneauBooster.add(lblBoosterPic);

				if(showPrices)
				{
				scrollPane = new JScrollPane();
				mod= new EditionsShakerTableModel();
				table = new JTable(mod);
				table.setRowSorter(new TableRowSorter(mod));
				scrollPane.setViewportView(table);
				splitPane.setRightComponent(scrollPane);
				}
				else
				{
					splitPane.setRightComponent(null);
				}

		if (magicEdition != null) {
			mBindingGroup = initDataBindings();
		}

		setEditable(false);
	}

	public void initGUI() {

		boosterProvider = new BoosterPicturesProvider();

		setLayout(new BorderLayout(0, 0));

		splitPane = new JSplitPane();

		splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
		panneauHaut = new JPanel();

		this.add(splitPane);

		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[] { 104, 333, 0, 0 };
		gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0, 1.0E-4 };
		gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0,
				1.0E-4 };
		panneauHaut.setLayout(gridBagLayout);

						JLabel setLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION")+" :");
						GridBagConstraints labelgbc8 = new GridBagConstraints();
						labelgbc8.insets = new Insets(5, 5, 5, 5);
						labelgbc8.gridx = 0;
						labelgbc8.gridy = 0;
						panneauHaut.add(setLabel, labelgbc8);

						setJTextField = new JTextField();

						GridBagConstraints componentGbc8 = new GridBagConstraints();
						componentGbc8.insets = new Insets(5, 0, 5, 5);
						componentGbc8.fill = GridBagConstraints.HORIZONTAL;
						componentGbc8.gridx = 1;
						componentGbc8.gridy = 0;
						panneauHaut.add(setJTextField, componentGbc8);

						JLabel typeLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_TYPE")+" :");
						GridBagConstraints labelgbc11 = new GridBagConstraints();
						labelgbc11.insets = new Insets(5, 5, 5, 5);
						labelgbc11.gridx = 0;
						labelgbc11.gridy = 1;
						panneauHaut.add(typeLabel, labelgbc11);

						typeJTextField = new JTextField();
						GridBagConstraints componentGbc11 = new GridBagConstraints();
						componentGbc11.insets = new Insets(5, 0, 5, 5);
						componentGbc11.fill = GridBagConstraints.HORIZONTAL;
						componentGbc11.gridx = 1;
						componentGbc11.gridy = 1;
						panneauHaut.add(typeJTextField, componentGbc11);

		JLabel releaseDateLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("DATE_RELEASE")+" :");
		GridBagConstraints labelgbc7 = new GridBagConstraints();
		labelgbc7.insets = new Insets(5, 5, 5, 5);
		labelgbc7.gridx = 0;
		labelgbc7.gridy = 2;
		panneauHaut.add(releaseDateLabel, labelgbc7);

		releaseDateJTextField = new JTextField();

		GridBagConstraints componentGbc7 = new GridBagConstraints();
		componentGbc7.insets = new Insets(5, 0, 5, 5);
		componentGbc7.fill = GridBagConstraints.HORIZONTAL;
		componentGbc7.gridx = 1;
		componentGbc7.gridy = 2;
		panneauHaut.add(releaseDateJTextField, componentGbc7);

				JLabel borderLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_BORDER")+" :");
				GridBagConstraints labelgbc2 = new GridBagConstraints();
				labelgbc2.insets = new Insets(5, 5, 5, 5);
				labelgbc2.gridx = 0;
				labelgbc2.gridy = 3;
				panneauHaut.add(borderLabel, labelgbc2);

				borderJTextField = new JTextField();
				GridBagConstraints componentGbc2 = new GridBagConstraints();
				componentGbc2.fill = GridBagConstraints.HORIZONTAL;
				componentGbc2.insets = new Insets(5, 0, 5, 5);
				componentGbc2.gridx = 1;
				componentGbc2.gridy = 3;
				panneauHaut.add(borderJTextField, componentGbc2);

				JLabel cardCountLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_CARD_COUNT")+" :");
				GridBagConstraints labelgbc3 = new GridBagConstraints();
				labelgbc3.insets = new Insets(5, 5, 5, 5);
				labelgbc3.gridx = 0;
				labelgbc3.gridy = 4;
				panneauHaut.add(cardCountLabel, labelgbc3);

				cardCountTextField = new JTextField();

				GridBagConstraints componentGbc3 = new GridBagConstraints();
				componentGbc3.insets = new Insets(5, 0, 5, 5);
				componentGbc3.fill = GridBagConstraints.HORIZONTAL;
				componentGbc3.gridx = 1;
				componentGbc3.gridy = 4;
				panneauHaut.add(cardCountTextField, componentGbc3);

				lblBlock = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_BLOCK")+" :");
				GridBagConstraints gbclblBlock = new GridBagConstraints();
				gbclblBlock.insets = new Insets(0, 0, 5, 5);
				gbclblBlock.gridx = 0;
				gbclblBlock.gridy = 5;
				panneauHaut.add(lblBlock, gbclblBlock);

				blockJTextField = new JTextField();
				GridBagConstraints gbcblockJTextField = new GridBagConstraints();
				gbcblockJTextField.insets = new Insets(0, 0, 5, 5);
				gbcblockJTextField.fill = GridBagConstraints.HORIZONTAL;
				gbcblockJTextField.gridx = 1;
				gbcblockJTextField.gridy = 5;
				panneauHaut.add(blockJTextField, gbcblockJTextField);
				blockJTextField.setColumns(10);

				lblId = new JLabel("ID :");
				GridBagConstraints gbclblId = new GridBagConstraints();
				gbclblId.insets = new Insets(0, 0, 5, 5);
				gbclblId.gridx = 0;
				gbclblId.gridy = 6;
				panneauHaut.add(lblId, gbclblId);

				idJtextField = new JTextField();

				GridBagConstraints gbctxtID = new GridBagConstraints();
				gbctxtID.insets = new Insets(0, 0, 5, 5);
				gbctxtID.fill = GridBagConstraints.HORIZONTAL;
				gbctxtID.gridx = 1;
				gbctxtID.gridy = 6;
				panneauHaut.add(idJtextField, gbctxtID);
				idJtextField.setColumns(10);

				splitPane.setLeftComponent(panneauHaut);

				lblOnlineSet = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("EDITION_ONLINE")+" :");
				GridBagConstraints gbclblOnlineSet = new GridBagConstraints();
				gbclblOnlineSet.insets = new Insets(0, 0, 5, 5);
				gbclblOnlineSet.gridx = 0;
				gbclblOnlineSet.gridy = 7;
				panneauHaut.add(lblOnlineSet, gbclblOnlineSet);

				chkOnline = new JCheckBox("");
				GridBagConstraints gbcchkOnline = new GridBagConstraints();
				gbcchkOnline.anchor = GridBagConstraints.WEST;
				gbcchkOnline.insets = new Insets(0, 0, 5, 5);
				gbcchkOnline.gridx = 1;
				gbcchkOnline.gridy = 7;
				panneauHaut.add(chkOnline, gbcchkOnline);

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

				if(openBooster)
				{
				  btnOpenBooster = new JButton(MTGControler.getInstance().getLangService().getCapitalize("OPEN_BOOSTER")+" :");
				  panneauBooster.add(btnOpenBooster, BorderLayout.NORTH);
				  btnOpenBooster.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent arg0) {
							try {
								CardSearchPanel.getInst().thumbnail(MTGControler.getInstance().getEnabledProviders().generateBooster(magicEdition).getCards());
							} catch (Exception e) {
								logger.error("Error loading booster for " + magicEdition,e);
							}
						}
					});

				}

				lblBoosterPic = new JLabel();
				panneauBooster.add(lblBoosterPic);

				if(showPrices)
				{
				scrollPane = new JScrollPane();
				mod= new EditionsShakerTableModel();
				table = new JTable(mod);
				table.setRowSorter(new TableRowSorter(mod));
				scrollPane.setViewportView(table);
				splitPane.setRightComponent(scrollPane);
				}
				else
				{
					splitPane.setRightComponent(null);
				}

		if (magicEdition != null) {
			mBindingGroup = initDataBindings();
		}

		setEditable(false);
	}

Replace Anonymous With Lambda org.magic.gui.components.MagicEditionDetailPanel.initGUI.addActionListener.new ActionListener with ae -> {tryCardSearchPanel.getInst().thumbnail(MTGControler.getInstance().getEnabledProviders().generateBooster(magicEdition).getCards()); in method public initGUI() : void from class org.magic.gui.components.MagicEditionDetailPanel


	public ThreadMonitorPanel() {
		setLayout(new BorderLayout(0, 0));

		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		model = new ThreadModel();
		table = new JTable(model);
		//new TableFilterHeader(table, AutoChoices.ENABLED);
		scrollPane.setViewportView(table);
		sorterCards = new TableRowSorter<DefaultTableModel>(model);
		JPanel panel = new JPanel();
		add(panel, BorderLayout.NORTH);

		btnRefresh = new JButton("Pause");
		btnRefresh.addActionListener(ae->{
				if(t.isRunning())
					{
						t.stop();
						btnRefresh.setText(MTGControler.getInstance().getLangService().getCapitalize("START"));
					}
					else
					{
						t.start();
						btnRefresh.setText(MTGControler.getInstance().getLangService().getCapitalize("PAUSE"));
						lblThreads.setText(ThreadManager.getInstance().getInfo());

					}
		});
		table.setRowSorter(sorterCards);
		panel.add(btnRefresh);

		lblThreads = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
		panel.add(lblThreads);

		memoryPanel = new JVMemoryPanel();
		panel.add(memoryPanel);

		t = new Timer(1000, e->model.fireTableDataChanged() );
        t.start();

	}

	public ThreadMonitorPanel() {
		setLayout(new BorderLayout(0, 0));

		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		model = new ThreadModel();
		table = new JTable(model);
		//new TableFilterHeader(table, AutoChoices.ENABLED);
		scrollPane.setViewportView(table);
		sorterCards = new TableRowSorter<DefaultTableModel>(model);
		JPanel panel = new JPanel();
		add(panel, BorderLayout.NORTH);

		btnRefresh = new JButton("Pause");
		btnRefresh.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				if(t.isRunning())
					{
						t.stop();
						btnRefresh.setText(MTGControler.getInstance().getLangService().getCapitalize("START"));
					}
					else
					{
						t.start();
						btnRefresh.setText(MTGControler.getInstance().getLangService().getCapitalize("PAUSE"));
						lblThreads.setText(ThreadManager.getInstance().getInfo());

					}

			}

		});
		table.setRowSorter(sorterCards);
		panel.add(btnRefresh);

		lblThreads = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
		panel.add(lblThreads);

		memoryPanel = new JVMemoryPanel();
		panel.add(memoryPanel);
		//setSize(700, 400);

		t = new Timer(1000, new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
               model.fireTableDataChanged();
            }
        });
        t.start();

	}

Replace Anonymous With Lambda org.magic.gui.components.ThreadMonitorPanel.ThreadMonitorPanel.addActionListener.new ActionListener with ae -> {if(t.isRunning()){t.stop(); in method public ThreadMonitorPanel() from class org.magic.gui.components.ThreadMonitorPanel


	@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,(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(()->{

				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.sort.new Comparator<CardShake> with (o1, o2) -> {if(o1.getPriceDayChange() > o2.getPriceDayChange())return -1; in method public init() : void from class org.magic.gui.dashlet.BestTrendingDashlet


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

		modEdition=new EditionsShakerTableModel();

		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());

		panel.add(cboEditions);

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

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

		table = new JXTable(modEdition);
		initToolTip(table,0,1);

		table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());
		table.getColumnModel().getColumn(5).setCellRenderer(new CardShakeRenderer());

		scrollPane.setViewportView(table);
		setVisible(true);

		cboEditions.addActionListener(ae->init());

		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")));

		MagicEdition ed;
		try {
			ed = MTGControler.getInstance().getEnabledProviders().getSetById(getProperty("EDITION"));
			cboEditions.setSelectedItem(ed);
		} catch (Exception e) {
			logger.error("Error retrieve editions",e);
		}

		setBounds(r);
		}

		try {
			table.packAll();
		}
		catch(Exception e)
		{}

		new TableFilterHeader(table, AutoChoices.ENABLED);

	}

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

		modEdition=new EditionsShakerTableModel();

		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());

		panel.add(cboEditions);

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

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

		table = new JXTable(modEdition);
		initToolTip(table,0,1);

		table.getColumnModel().getColumn(3).setCellRenderer(new CardShakeRenderer());
		table.getColumnModel().getColumn(5).setCellRenderer(new CardShakeRenderer());

		scrollPane.setViewportView(table);
		setVisible(true);

		cboEditions.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				init();
			}
		});

		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")));

		MagicEdition ed;
		try {
			ed = MTGControler.getInstance().getEnabledProviders().getSetById(getProperty("EDITION"));
			cboEditions.setSelectedItem(ed);
		} catch (Exception e) {
			logger.error("Error retrieve editions",e);
		}

		setBounds(r);
		}

		try {
			table.packAll();
		}
		catch(Exception e)
		{}

		new TableFilterHeader(table, AutoChoices.ENABLED);

	}

Replace Anonymous With Lambda org.magic.gui.dashlet.EditionsDashlet.initGUI.addActionListener.new ActionListener with ae -> init() in method public initGUI() : void from class org.magic.gui.dashlet.EditionsDashlet


	@Override
	public void init() {

		if(cboEditions.getSelectedItem()!=null)
			ThreadManager.getInstance().execute(()->{
					lblLoading.setVisible(true);
					MagicEdition ed = (MagicEdition)cboEditions.getSelectedItem();
					modEdition.init(ed);
					try{
						modEdition.fireTableDataChanged();
						table.packAll();
						table.setRowSorter(new TableRowSorter(modEdition) );
					}
					catch(Exception e)
					{
						MTGLogger.printStackTrace(e);
					}
					save("EDITION",ed.getId());
					lblLoading.setVisible(false);
			}, "init EditionDashLet");

	}

	@Override
	public void init() {

		if(cboEditions.getSelectedItem()!=null)
			ThreadManager.getInstance().execute(new Runnable() {
				@Override
				public void run() {
					lblLoading.setVisible(true);
					MagicEdition ed = (MagicEdition)cboEditions.getSelectedItem();
					modEdition.init(ed);
					try{
						modEdition.fireTableDataChanged();
						table.packAll();
						table.setRowSorter(new TableRowSorter(modEdition) );
					}
					catch(Exception e)
					{
						MTGLogger.printStackTrace(e);
					}
					save("EDITION",ed.getId());
					lblLoading.setVisible(false);
				}
			}, "init EditionDashLet");

	}

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


	public MagicWebSiteGenerator(String template,String dest) throws IOException {
		cfg = new Configuration(Configuration.VERSION_2_3_27);
		cfg.setDirectoryForTemplateLoading(new File(MTGConstants.MTG_TEMPLATES_DIR,template));
		cfg.setDefaultEncoding("UTF-8");
		cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER );
		cfg.setObjectWrapper( new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_27).build());
		dao=MTGControler.getInstance().getEnabledDAO();
		this.dest = dest;
		FileUtils.copyDirectory(new File(MTGConstants.MTG_TEMPLATES_DIR,template), new File(dest),pathname->{
				if(pathname.isDirectory())
					return true;
				return pathname.getName().endsWith(".html");
		});
	}

	public MagicWebSiteGenerator(String template,String dest) throws IOException {
		cfg = new Configuration(Configuration.VERSION_2_3_27);
		cfg.setDirectoryForTemplateLoading(new File(MTGConstants.MTG_TEMPLATES_DIR,template));
		cfg.setDefaultEncoding("UTF-8");
		cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER );
		cfg.setObjectWrapper( new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_27).build());
		dao=MTGControler.getInstance().getEnabledDAO();
		this.dest = dest;
		FileUtils.copyDirectory(new File(MTGConstants.MTG_TEMPLATES_DIR,template), new File(dest),new FileFilter() {
			public boolean accept(File pathname) {
				if(pathname.isDirectory())
					return true;

				if(pathname.getName().endsWith(".html"))
					return false;

				return true;
			}
		});
	}

Replace Anonymous With Lambda org.magic.services.MagicWebSiteGenerator.MagicWebSiteGenerator.copyDirectory.new FileFilter with pathname -> {if(pathname.isDirectory())return true; in method public MagicWebSiteGenerator(template String, dest String) from class org.magic.services.MagicWebSiteGenerator


	@Override
	public List<MagicPrice> getPrice(MagicEdition me, MagicCard card) throws Exception {

		String keyword=card.getName();
		String url = getProperty("URL");

		keyword=URLEncoder.encode(keyword,props.getProperty("ENCODING"));

		props.put("KEYWORD", keyword);

		if(me!=null)
			keyword += "&setname=" + URLEncoder.encode(me.getSet(),props.getProperty("ENCODING"));

		String link=url.replaceAll("%CARDNAME%", keyword);

		logger.info(getName()+ " Looking for price " + link);
		JsonReader reader = new JsonReader(new InputStreamReader(new URL(link).openStream(), props.getProperty("ENCODING")));
		JsonElement root = new JsonParser().parse(reader);

		String value = root.getAsJsonArray().get(0).getAsString();

		MagicPrice mp = new MagicPrice();
			mp.setUrl("http://store.channelfireball.com/products/search?query="+URLEncoder.encode(card.getName(),props.getProperty("ENCODING")));
			mp.setSite(getName());
			mp.setCurrency(value.substring(0, 1));
			mp.setValue(Double.parseDouble(value.substring(1).replaceAll(",", "")));

		ArrayList<MagicPrice> list = new ArrayList<>();
							list.add(mp);

		logger.info(getName() +" found " + list.size() +" item(s)" );

		return list;
	}

	@Override
	public List<MagicPrice> getPrice(MagicEdition me, MagicCard card) throws Exception {

		String keyword=card.getName();
		String url = getProperty("URL");

		keyword=URLEncoder.encode(keyword,props.getProperty("ENCODING"));

		props.put("KEYWORD", keyword);

		if(me!=null)
			keyword += "&setname=" + URLEncoder.encode(me.getSet(),props.getProperty("ENCODING"));

		String link=url.replaceAll("%CARDNAME%", keyword);

		logger.info(getName()+ " Looking for price " + link);
		JsonReader reader = new JsonReader(new InputStreamReader(new URL(link).openStream(), props.getProperty("ENCODING")));
		JsonElement root = new JsonParser().parse(reader);

		String value = root.getAsJsonArray().get(0).getAsString();

		MagicPrice mp = new MagicPrice();
			mp.setUrl("http://store.channelfireball.com/products/search?query="+URLEncoder.encode(card.getName(),props.getProperty("ENCODING")));
			mp.setSite(getName());
			mp.setCurrency(value.substring(0, 1));
			mp.setValue(Double.parseDouble(value.substring(1).replaceAll(",", "")));

		ArrayList<MagicPrice> list = new ArrayList<MagicPrice>();
							list.add(mp);

		logger.info(getName() +" found " + list.size() +" item(s)" );

		return list;
	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public getPrice(me MagicEdition, card MagicCard) : List<MagicPrice> from class org.magic.api.pricers.impl.ChannelFireballPricer


	public List<MagicPrice> getPrice(MagicEdition me,MagicCard card) throws IOException {
		List<MagicPrice> prices = new ArrayList<>();

		String url = props.getProperty("URL");
			   url = url.replaceAll("%API_KEY%", props.get("API_KEY").toString());
			   url = url.replaceAll("%COUNTRY%", props.get("COUNTRY").toString());
			   url = url.replaceAll("%MAX%", props.get("MAX").toString());
		KEYWORD=card.getName();

		if(me!=null)
			KEYWORD += " " + me.getSet();

		props.put("KEYWORD", KEYWORD);

		KEYWORD=URLEncoder.encode(KEYWORD,props.getProperty("ENCODING"));

		String link=url.replaceAll("%KEYWORD%", KEYWORD);

		logger.info(getName() + " looking for " + KEYWORD);

		JsonReader reader = new JsonReader(new InputStreamReader(new URL(link).openStream(), "UTF-8"));
		JsonElement root = new JsonParser().parse(reader);

		JsonElement articles=root.getAsJsonObject().entrySet().iterator().next().getValue().getAsJsonArray().get(0).getAsJsonObject().get("searchResult");

		if(articles.getAsJsonArray().get(0).getAsJsonObject().get("item")==null)
		{
			logger.info(getName() + " find nothing");
			return prices;
		}

			JsonArray items = articles.getAsJsonArray().get(0).getAsJsonObject().get("item").getAsJsonArray();

		 	for(JsonElement el : items)
		 	{
		 		MagicPrice mp = new MagicPrice();
		 		String etat="";
		 		String title = el.getAsJsonObject().get("title").getAsString();
		 		String consultURL = el.getAsJsonObject().get("viewItemURL").getAsString();
		 		double price = el.getAsJsonObject().get("sellingStatus").getAsJsonArray().get(0).getAsJsonObject().get("currentPrice").getAsJsonArray().get(0).getAsJsonObject().get("__value__").getAsDouble();
		 		String currency = el.getAsJsonObject().get("sellingStatus").getAsJsonArray().get(0).getAsJsonObject().get("currentPrice").getAsJsonArray().get(0).getAsJsonObject().get("@currencyId").getAsString();
		 		try
		 		{
		 			etat = el.getAsJsonObject().get("condition").getAsJsonArray().get(0).getAsJsonObject().get("conditionDisplayName").getAsString();
		 		}
		 		catch(NullPointerException e)
		 		{
		 			etat="";
		 		}

		 		mp.setSeller(title);
		 		mp.setUrl(consultURL);
		 		mp.setCurrency(currency);
		 		mp.setValue(price);
		 		mp.setSite(getName());
		 		mp.setQuality(etat);
		 		prices.add(mp);
		 	}

		 	logger.info(getName() + " find " + prices.size() + " item(s)");

		java.util.Collections.sort(prices);
		return prices;
	}

	public List<MagicPrice> getPrice(MagicEdition me,MagicCard card) throws IOException {
		List<MagicPrice> prices = new ArrayList<MagicPrice>();

		String url = props.getProperty("URL");
			   url = url.replaceAll("%API_KEY%", props.get("API_KEY").toString());
			   url = url.replaceAll("%COUNTRY%", props.get("COUNTRY").toString());
			   url = url.replaceAll("%MAX%", props.get("MAX").toString());
		KEYWORD=card.getName();

		if(me!=null)
			KEYWORD += " " + me.getSet();

		props.put("KEYWORD", KEYWORD);

		KEYWORD=URLEncoder.encode(KEYWORD,props.getProperty("ENCODING"));

		String link=url.replaceAll("%KEYWORD%", KEYWORD);

		logger.info(getName() + " looking for " + KEYWORD);

		JsonReader reader = new JsonReader(new InputStreamReader(new URL(link).openStream(), "UTF-8"));
		JsonElement root = new JsonParser().parse(reader);

		JsonElement articles=root.getAsJsonObject().entrySet().iterator().next().getValue().getAsJsonArray().get(0).getAsJsonObject().get("searchResult");

		if(articles.getAsJsonArray().get(0).getAsJsonObject().get("item")==null)
		{
			logger.info(getName() + " find nothing");
			return prices;
		}

			JsonArray items = articles.getAsJsonArray().get(0).getAsJsonObject().get("item").getAsJsonArray();

		 	for(JsonElement el : items)
		 	{
		 		MagicPrice mp = new MagicPrice();
		 		String etat="";
		 		String title = el.getAsJsonObject().get("title").getAsString();
		 		String consultURL = el.getAsJsonObject().get("viewItemURL").getAsString();
		 		double price = el.getAsJsonObject().get("sellingStatus").getAsJsonArray().get(0).getAsJsonObject().get("currentPrice").getAsJsonArray().get(0).getAsJsonObject().get("__value__").getAsDouble();
		 		String currency = el.getAsJsonObject().get("sellingStatus").getAsJsonArray().get(0).getAsJsonObject().get("currentPrice").getAsJsonArray().get(0).getAsJsonObject().get("@currencyId").getAsString();
		 		try
		 		{
		 			etat = el.getAsJsonObject().get("condition").getAsJsonArray().get(0).getAsJsonObject().get("conditionDisplayName").getAsString();
		 		}
		 		catch(NullPointerException e)
		 		{
		 			etat="";
		 		}

		 		mp.setSeller(title);
		 		mp.setUrl(consultURL);
		 		mp.setCurrency(currency);
		 		mp.setValue(price);
		 		mp.setSite(getName());
		 		mp.setQuality(etat);
		 		prices.add(mp);
		 	}

		 	logger.info(getName() + " find " + prices.size() + " item(s)");

		java.util.Collections.sort(prices);
		return prices;
	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public getPrice(me MagicEdition, card MagicCard) : List<MagicPrice> from class org.magic.api.pricers.impl.EbayPricer


	public MagicBazarPricer() {
		super();

		if(!new File(confdir, getName()+".conf").exists()){
			props.put("URL", "https://www.magicbazar.fr/recherche/result.php?s=");
			props.put("USER_AGENT", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

			save();
		}

		list=new ArrayList<>();
	}

	public MagicBazarPricer() {
		super();

		if(!new File(confdir, getName()+".conf").exists()){
			props.put("URL", "https://www.magicbazar.fr/recherche/result.php?s=");
			props.put("USER_AGENT", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

			save();
		}

		list=new ArrayList<MagicPrice>();
	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public MagicBazarPricer() from class org.magic.api.pricers.impl.MagicBazarPricer


	public MagicVillePricer() {
		super();

		list=new ArrayList<>();
		httpclient = HttpClients.createDefault();

		if(!new File(confdir, getName()+".conf").exists()){
				props.put("MAX", "5");
				props.put("URL", "http://www.magic-ville.com/fr/register/show_card_sale.php?gamerid=");
				props.put("WEBSITE", "http://www.magic-ville.com/");
				props.put("KEYWORD", "");
				props.put("USER_AGENT", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
				save();
		}

	}

	public MagicVillePricer() {
		super();

		list=new ArrayList<MagicPrice>();
		httpclient = HttpClients.createDefault();

		if(!new File(confdir, getName()+".conf").exists()){
				props.put("MAX", "5");
				props.put("URL", "http://www.magic-ville.com/fr/register/show_card_sale.php?gamerid=");
				props.put("WEBSITE", "http://www.magic-ville.com/");
				props.put("KEYWORD", "");
				props.put("USER_AGENT", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
				save();
		}

	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public MagicVillePricer() from class org.magic.api.pricers.impl.MagicVillePricer


	@Override
	public List<MagicPrice> getPrice(MagicEdition me, MagicCard card) throws Exception {
		List<MagicPrice> list = new ArrayList<>();
		String url = props.getProperty("URL");
			   url = url.replaceAll("%API_KEY%", props.getProperty("API_KEY"));

		String set = "";

		if(me==null)
			set = URLEncoder.encode(card.getEditions().get(0).getSet(),props.getProperty("ENCODING"));
		else
			set = URLEncoder.encode(me.getSet(),props.getProperty("ENCODING"));

		if(set.contains("Edition"))
			set =set.replaceAll("Edition", "");

		String name = card.getName();
			   name = name.replaceAll(" \\(.*$", "");
			   name = name.replaceAll("'", "%27");
			   name = name.replaceAll(" ", "+");

			   props.put("KEYWORD", "s="+set+"p="+name);

		String link=url.replaceAll("%SET%", set);
			   link=link.replaceAll("%CARTE%", name);

			   logger.info(getName()  + " looking "+ " for " + link);

			   DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
			   DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();

			   Document doc = null;

					try{
					  doc=dBuilder.parse(new URL(link).openStream());
					  logger.debug(doc);

			   doc.getDocumentElement().normalize();

			   NodeList nodes = doc.getElementsByTagName("product");

	 		   MagicPrice mp = new MagicPrice();
			   	mp.setCurrency("$");
			   	mp.setSite(getName());
			   	mp.setUrl(nodes.item(0).getChildNodes().item(11).getTextContent());
			   	mp.setSeller(getName());
			   	mp.setValue(Double.parseDouble(nodes.item(0).getChildNodes().item(7).getTextContent()));

			   	list.add(mp);
			   	logger.info(getName() +" found " + list.size() +" item(s)" );
			    if(list.size()>Integer.parseInt(props.get("MAX").toString()))
					 if(Integer.parseInt(props.get("MAX").toString())>-1)
						 return list.subList(0, Integer.parseInt(props.get("MAX").toString()));

					}
					catch(Exception e)
					{
						logger.error(e);
						return list;
					}

		return list;

	}

	@Override
	public List<MagicPrice> getPrice(MagicEdition me, MagicCard card) throws Exception {
		List<MagicPrice> list = new ArrayList<MagicPrice>();
		String url = props.getProperty("URL");
			   url = url.replaceAll("%API_KEY%", props.getProperty("API_KEY"));

		String set = "";

		if(me==null)
			set = URLEncoder.encode(card.getEditions().get(0).getSet(),props.getProperty("ENCODING"));
		else
			set = URLEncoder.encode(me.getSet(),props.getProperty("ENCODING"));

		if(set.contains("Edition"))
			set =set.replaceAll("Edition", "");

		String name = card.getName();
			   name = name.replaceAll(" \\(.*$", "");
			   name = name.replaceAll("'", "%27");
			   name = name.replaceAll(" ", "+");

			   props.put("KEYWORD", "s="+set+"p="+name);

		String link=url.replaceAll("%SET%", set);
			   link=link.replaceAll("%CARTE%", name);

			   logger.info(getName()  + " looking "+ " for " + link);

			   DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
			   DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();

			   Document doc = null;

					try{
					  doc=dBuilder.parse(new URL(link).openStream());
					  logger.debug(doc);

			   doc.getDocumentElement().normalize();

			   NodeList nodes = doc.getElementsByTagName("product");

	 		   MagicPrice mp = new MagicPrice();
			   	mp.setCurrency("$");
			   	mp.setSite(getName());
			   	mp.setUrl(nodes.item(0).getChildNodes().item(11).getTextContent());
			   	mp.setSeller(getName());
			   	mp.setValue(Double.parseDouble(nodes.item(0).getChildNodes().item(7).getTextContent()));

			   	list.add(mp);
			   	logger.info(getName() +" found " + list.size() +" item(s)" );
			    if(list.size()>Integer.parseInt(props.get("MAX").toString()))
					 if(Integer.parseInt(props.get("MAX").toString())>-1)
						 return list.subList(0, Integer.parseInt(props.get("MAX").toString()));

					}
					catch(Exception e)
					{
						logger.error(e);
						return list;
					}

		return list;

	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public getPrice(me MagicEdition, card MagicCard) : List<MagicPrice> from class org.magic.api.pricers.impl.TCGPlayerPricer


	public List<String> getCardNames()
	{
		List<String> lists = new ArrayList<>();
		String url="http://api.mtgapi.com/v2/names";
		HttpGet httpget = new HttpGet(url);
		try (CloseableHttpResponse response = httpclient.execute(httpget))
		{
			Reader reader = new InputStreamReader(response.getEntity().getContent(),"UTF-8");
			JsonElement root = new JsonParser().parse(reader);
			JsonObject arr = root.getAsJsonObject().get("names").getAsJsonObject();

			for(Entry<String, JsonElement> e : arr.entrySet())
			{
				lists.add(e.getValue().getAsString());
			}

			return lists;
		}
		catch (Exception e) {
			logger.error("couldn't get cardnames",e);
		}
		finally {
			if(httpget!=null)
				httpget.releaseConnection();

		}
		return lists;
	}

	public List<String> getCardNames()
	{
		List<String> lists = new ArrayList<>();
		HttpGet httpget = null;
		try {
		String url="http://api.mtgapi.com/v2/names";

			httpget = new HttpGet(url);
			CloseableHttpResponse response = httpclient.execute(httpget);
			Reader reader = new InputStreamReader(response.getEntity().getContent(),"UTF-8");
			JsonElement root = new JsonParser().parse(reader);
			JsonObject arr = root.getAsJsonObject().get("names").getAsJsonObject();

			for(Entry<String, JsonElement> e : arr.entrySet())
			{
				lists.add(e.getValue().getAsString());
			}

			return lists;
		}
		catch (Exception e) {
			logger.error("couldn't get cardnames",e);
		}
		finally {
			if(httpget!=null)
				httpget.releaseConnection();

		}
		return lists;
	}

Try With Resources try(CloseableHttpResponse response=httpclient.execute(httpget)) in method public getCardNames() : List<String> from class org.magic.api.providers.impl.MtgapiProvider


	private List<LoyaltyCounter> listLoyalty() {
		String[] values = magicCard.getText().split("\n");
		List<LoyaltyCounter> actions = new ArrayList<>();

		for (String s : values) {

			if (s.startsWith("+")) {
				LoyaltyCounter act = new LoyaltyCounter(
						Integer.parseInt(s.substring(s.indexOf('+'), s.indexOf(':')).trim()),
						s.substring(s.indexOf(':') + 1).trim());
				actions.add(act);
			} else if (s.startsWith("0")) {
				LoyaltyCounter act = new LoyaltyCounter(0, s.substring(s.indexOf(':') + 1).trim());
				actions.add(act);
			} else {
				LoyaltyCounter act;
				try {
					act = new LoyaltyCounter(Integer.parseInt("-" + s.substring(1, s.indexOf(':')).trim()),
							s.substring(s.indexOf(':') + 1).trim());
				} catch (Exception e) {
					act = new LoyaltyCounter(0, s.substring(s.indexOf(':') + 1).trim());
				}
				actions.add(act);
			}
		}
		return actions;
	}

	private List<LoyaltyCounter> listLoyalty() {
		String[] values = magicCard.getText().split("\n");
		List<LoyaltyCounter> actions = new ArrayList<LoyaltyCounter>();

		for (String s : values) {

			if (s.startsWith("+")) {
				LoyaltyCounter act = new LoyaltyCounter(
						Integer.parseInt(s.substring(s.indexOf('+'), s.indexOf(':')).trim()),
						s.substring(s.indexOf(':') + 1).trim());
				actions.add(act);
			} else if (s.startsWith("0")) {
				LoyaltyCounter act = new LoyaltyCounter(0, s.substring(s.indexOf(':') + 1).trim());
				actions.add(act);
			} else {
				LoyaltyCounter act;
				try {
					act = new LoyaltyCounter(Integer.parseInt("-" + s.substring(1, s.indexOf(':')).trim()),
							s.substring(s.indexOf(':') + 1).trim());
				} catch (Exception e) {
					act = new LoyaltyCounter(0, s.substring(s.indexOf(':') + 1).trim());
				}
				actions.add(act);
			}
		}
		return actions;
	}

Replace Generic With Diamond ArrayList<LoyaltyCounter> with ArrayList<> in method private listLoyalty() : List<LoyaltyCounter> from class org.magic.game.gui.components.DisplayableCard


	public void initGame() {
		for(Player player : players)
			player.init();

		turns = new ArrayList<>();

		turns.add(new Turn());
	}

	public void initGame() {
		for(Player player : players)
			player.init();

		turns = new ArrayList<Turn>();

		turns.add(new Turn());
	}

Replace Generic With Diamond ArrayList<Turn> with ArrayList<> in method public initGame() : void from class org.magic.game.model.GameManager


	public Set<String> getTypesIncludes()
	{
		Set<String> set = new LinkedHashSet<>();

		for(MagicCard mc : cards)
		{
			set.addAll(mc.getTypes());
		}
		return set;
	}

	public Set<String> getTypesIncludes()
	{
		Set<String> set = new LinkedHashSet<String>();

		for(MagicCard mc : cards)
		{
			set.addAll(mc.getTypes());
		}
		return set;
	}

Replace Generic With Diamond LinkedHashSet<String> with LinkedHashSet<> in method public getTypesIncludes() : Set<String> from class org.magic.game.model.Graveyard


	public Library() {
		cards = new ArrayList<>();
	}

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

Replace Generic With Diamond ArrayList<MagicCard> with ArrayList<> in method public Library() from class org.magic.game.model.Library


	public SpellStack() {
		stack= new Stack<>();
	}

	public SpellStack() {
		stack= new Stack<AbstractSpell>();
	}

Replace Generic With Diamond Stack<AbstractSpell> with Stack<> in method public SpellStack() from class org.magic.game.model.SpellStack


	public List<AbstractSpell> toList()
	{
		return new ArrayList<>(stack);
	}

	public List<AbstractSpell> toList()
	{
		return new ArrayList<AbstractSpell>(stack);
	}

Replace Generic With Diamond ArrayList<AbstractSpell> with ArrayList<> in method public toList() : List<AbstractSpell> from class org.magic.game.model.SpellStack


	public Turn() {
		actions = new ArrayList<>();
		index=0;

	}

	public Turn() {
		actions = new ArrayList<String>();
		index=0;

	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public Turn() from class org.magic.game.model.Turn


	public void initGUI() throws Exception
	{
		logger.info("init Main GUI");
		setSize(new Dimension(1420, 900));
		setTitle("Magic Desktop Companion ( v" + MTGControler.getInstance().getVersion()+")");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setIconImage(MTGConstants.IMAGE_LOGO);
		getContentPane().setLayout(new BorderLayout());

		try{
			tray=SystemTray.getSystemTray();
			trayNotifier = new TrayIcon(MTGConstants.IMAGE_LOGO.getScaledInstance(16, 16, BufferedImage.SCALE_SMOOTH));
		}
		catch (Exception e) {
			logger.error(e);
		}

		mtgMnuBar = new JMenuBar();
		setJMenuBar(mtgMnuBar);

		mnFile = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("FILE"));
		mnuAbout = new JMenu("?");
		jmnuLook = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("LOOK"));

		mntmExit = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("EXIT"));

		JMenuItem mntmHelp = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("READ_MANUAL"));
		JMenuItem mntmThreadItem = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
		JMenuItem mntmLogsItem = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("LOGS"));
		JMenuItem mntmAboutMagicDesktop = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("ABOUT"));
		JMenuItem mntmReportBug = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("REPORT_BUG"));
		JMenuItem mntmFileOpen = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("OPEN"));

		mtgMnuBar.add(mnFile);
		mnFile.add(mntmFileOpen);
		mnFile.add(mntmExit);
		mtgMnuBar.add(jmnuLook);
		mtgMnuBar.add(mnuAbout);
		mnuAbout.add(mntmThreadItem);
		mnuAbout.add(mntmLogsItem);
		mnuAbout.add(mntmHelp);
		mnuAbout.add(mntmAboutMagicDesktop);
		mnuAbout.add(mntmReportBug);

		mntmLogsItem.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				SwingUtilities.invokeLater(new Runnable(){
					@Override
					public void run() {
						JFrame f = new JFrame(MTGControler.getInstance().getLangService().getCapitalize("LOGS"));
						f.getContentPane().add(new LoggerViewPanel());
						f.setLocationRelativeTo(null);
						f.setVisible(true);
						f.pack();
						f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
					}
				});

			}
		});

		mntmThreadItem.addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent e) {

				SwingUtilities.invokeLater(new Runnable(){
					@Override
					public void run() {
						JFrame f = new JFrame(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
						f.getContentPane().add(new ThreadMonitorPanel());
						f.setLocationRelativeTo(null);
						f.setVisible(true);
						f.pack();
						f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

					}
				});

			}
		});

		mntmExit.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);

			}
		});

		mntmHelp.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				String url =MTGConstants.MTG_DESKTOP_WIKI_URL;
				try {
					Desktop.getDesktop().browse(new URI(url));
				} catch (Exception e1) {
					logger.error(e1);
				}
			}
		});

		mntmAboutMagicDesktop.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				new AboutDialog().setVisible(true);

			}
		});

		mntmReportBug.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try {
					String url = MTGConstants.MTG_DESKTOP_ISSUES_URL;
					Desktop.getDesktop().browse(new URI(url));
				} catch (Exception e) {
					logger.error(e);
				}
			}
		});

		mntmFileOpen.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
					JFileChooser choose = new JFileChooser();
					int returnVal = choose.showOpenDialog(null);
					if (returnVal == JFileChooser.APPROVE_OPTION)
					{
						File f =choose.getSelectedFile();
						AbstractCardExport exp = MTGControler.getInstance().getAbstractExporterFromExt(f);

						if(exp!=null)
						{
							ThreadManager.getInstance().execute(new Runnable() {
								@Override
								public void run() {
									try
									{
										if(cardSearchPanel==null)
											throw new Exception(MTGControler.getInstance().getLangService().getCapitalize("MUST_BE_LOADED",MTGControler.getInstance().getLangService().get("SEARCH_MODULE")));

									cardSearchPanel.loading(true, MTGControler.getInstance().getLangService().getCapitalize("LOADING_FILE",f.getName(),exp));
									MagicDeck d=exp.importDeck(f);
									cardSearchPanel.open(d.getAsList());
									cardSearchPanel.loading(false,"");
									tabbedPane.setSelectedIndex(0);
									} catch (Exception e) {
										logger.error(e);
									}
								}
							},"open " + f);

						}
						else
						{
							JOptionPane.showMessageDialog(null, "NO EXPORTER AVAILABLE",MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
						}
					}

			}
		});

		if(serviceUpdate.hasNewVersion())
		{
			JMenuItem newversion = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("DOWNLOAD_LAST_VERSION")+" : " + serviceUpdate.getOnlineVersion() );
			newversion.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					String url =MTGConstants.MTG_DESKTOP_APP_ZIP;
					try {
						Desktop.getDesktop().browse(new URI(url));
					} catch (Exception e1) {
						logger.error(e1.getMessage());
					}
				}
			});
			mnuAbout.add(newversion);
		}

		//INIT AVAILABLE LOOK AND FEELS
		looks = new HashMap<>();
		looksMore = new HashMap<>();

		for(LookAndFeelInfo i : UIManager.getInstalledLookAndFeels())
			looks.put(i.getName(),i.getClassName());

		looksMore.put("Cerulan","org.pushingpixels.substance.api.skin.SubstanceCeruleanLookAndFeel");
		looksMore.put("Business Blue","org.pushingpixels.substance.api.skin.SubstanceBusinessBlueSteelLookAndFeel");
		looksMore.put("Gemini","org.pushingpixels.substance.api.skin.SubstanceGeminiLookAndFeel");
		looksMore.put("Nebula","org.pushingpixels.substance.api.skin.SubstanceNebulaLookAndFeel");
		looksMore.put("Graphite","org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel");
		looksMore.put("Magellan","org.pushingpixels.substance.api.skin.SubstanceMagellanLookAndFeel");
		looksMore.put("Coffe","org.pushingpixels.substance.api.skin.SubstanceCremeCoffeeLookAndFeel");

		JMenu itMore = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("MORE"));
		for(final String ui : looksMore.keySet())
		{
			final JMenuItem it = new JMenuItem(ui);
			it.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					setLookAndFeel(looksMore.get(ui));
				}
			});
			itMore.add(it);
		}

		for(final String ui : looks.keySet())
		{
			final JMenuItem it = new JMenuItem(ui);
			it.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					setLookAndFeel(looks.get(ui));
				}
			});
			jmnuLook.add(it);
		}

		jmnuLook.add(itMore);

		tabbedPane = new JTabbedPane(MTGConstants.MTG_DESKTOP_TABBED_POSITION);

		if(MTGControler.getInstance().get("modules/search").equals("true"))
		{
			cardSearchPanel=new CardSearchPanel();
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("SEARCH_MODULE"), MTGConstants.ICON_SEARCH_2, cardSearchPanel, null);
		}

		if(MTGControler.getInstance().get("modules/deckbuilder").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DECK_MODULE"), MTGConstants.ICON_DECK, new DeckBuilderGUI(), null);

		if(MTGControler.getInstance().get("modules/game").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("GAME_MODULE"), MTGConstants.ICON_COLLECTION_SMALL, new GameGUI(), null);

		if(MTGControler.getInstance().get("modules/collection").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_MODULE"), MTGConstants.ICON_COLLECTION, new CollectionPanelGUI(), null);

		if(MTGControler.getInstance().get("modules/stock").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("STOCK_MODULE"), MTGConstants.ICON_STOCK, new StockPanelGUI(), null);

		if(MTGControler.getInstance().get("modules/dashboard").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DASHBOARD_MODULE"),MTGConstants.ICON_DASHBOARD, new DashBoardGUI2(), null);

		if(MTGControler.getInstance().get("modules/shopper").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("SHOPPING_MODULE"),MTGConstants.ICON_SHOP, new ShopperGUI(), null);

		if(MTGControler.getInstance().get("modules/alarm").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("ALERT_MODULE"), MTGConstants.ICON_ALERT, new AlarmGUI(), null);

		if(MTGControler.getInstance().get("modules/cardbuilder").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("BUILDER_MODULE"), MTGConstants.ICON_BUILDER, new CardBuilder2GUI(), null);

		if(MTGControler.getInstance().get("modules/rss").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("RSS_MODULE"), MTGConstants.ICON_RSS, new RssGUI(), null);

		if(MTGControler.getInstance().get("modules/history").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("HISTORY_MODULE"), MTGConstants.ICON_STORY, new StoriesGUI(), null);

		//tabbedPane.addTab("MKM", MTGConstants.ICON_SHOP, new MkmPanel(), null);

		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CONFIGURATION"), MTGConstants.ICON_CONFIG, new ConfigurationPanelGUI(), null);

		getContentPane().add(tabbedPane, BorderLayout.CENTER);

		if (SystemTray.isSupported()) {
			tray.add(trayNotifier);
			trayNotifier.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					if(!isVisible())
						setVisible(true);
					else
						setVisible(false);
				}
			});
			PopupMenu menuTray = new PopupMenu();
			for(int index_tab = 0;index_tab<tabbedPane.getTabCount();index_tab++)
			{
				final int index = index_tab;
				MenuItem it = new MenuItem(tabbedPane.getTitleAt(index_tab));
				it.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
							setVisible(true);
							setSelectedTab(index);

					}
				});
				menuTray.add(it);
			}

			trayNotifier.setPopupMenu(menuTray);
			trayNotifier.setToolTip("MTG Desktop Companion");
			if(serviceUpdate.hasNewVersion())
				trayNotifier.displayMessage(getTitle(),MTGControler.getInstance().getLangService().getCapitalize("NEW_VERSION")+" " + serviceUpdate.getOnlineVersion() + " "+MTGControler.getInstance().getLangService().get("AVAILABLE"),TrayIcon.MessageType.INFO);

			ThreadManager.getInstance().execute(()->{
					try {
						new TipsOfTheDayDialog().show();
					} catch (IOException e) {
						logger.error(e);
					}

			}, "launch tooltip");
		}
	}

	public void initGUI() throws Exception
	{
		logger.info("init Main GUI");
		setSize(new Dimension(1420, 900));
		setTitle("Magic Desktop Companion ( v" + MTGControler.getInstance().getVersion()+")");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setIconImage(MTGConstants.IMAGE_LOGO);
		getContentPane().setLayout(new BorderLayout());

		try{
			tray=SystemTray.getSystemTray();
			trayNotifier = new TrayIcon(MTGConstants.IMAGE_LOGO.getScaledInstance(16, 16, BufferedImage.SCALE_SMOOTH));
		}
		catch (Exception e) {
			logger.error(e);
		}

		mtgMnuBar = new JMenuBar();
		setJMenuBar(mtgMnuBar);

		mnFile = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("FILE"));
		mnuAbout = new JMenu("?");
		jmnuLook = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("LOOK"));

		mntmExit = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("EXIT"));

		JMenuItem mntmHelp = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("READ_MANUAL"));
		JMenuItem mntmThreadItem = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
		JMenuItem mntmLogsItem = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("LOGS"));
		JMenuItem mntmAboutMagicDesktop = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("ABOUT"));
		JMenuItem mntmReportBug = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("REPORT_BUG"));
		JMenuItem mntmFileOpen = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("OPEN"));

		mtgMnuBar.add(mnFile);
		mnFile.add(mntmFileOpen);
		mnFile.add(mntmExit);
		mtgMnuBar.add(jmnuLook);
		mtgMnuBar.add(mnuAbout);
		mnuAbout.add(mntmThreadItem);
		mnuAbout.add(mntmLogsItem);
		mnuAbout.add(mntmHelp);
		mnuAbout.add(mntmAboutMagicDesktop);
		mnuAbout.add(mntmReportBug);

		mntmLogsItem.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				SwingUtilities.invokeLater(new Runnable(){
					@Override
					public void run() {
						JFrame f = new JFrame(MTGControler.getInstance().getLangService().getCapitalize("LOGS"));
						f.getContentPane().add(new LoggerViewPanel());
						f.setLocationRelativeTo(null);
						f.setVisible(true);
						f.pack();
						f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
					}
				});

			}
		});

		mntmThreadItem.addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent e) {

				SwingUtilities.invokeLater(new Runnable(){
					@Override
					public void run() {
						JFrame f = new JFrame(MTGControler.getInstance().getLangService().getCapitalize("THREADS"));
						f.getContentPane().add(new ThreadMonitorPanel());
						f.setLocationRelativeTo(null);
						f.setVisible(true);
						f.pack();
						f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

					}
				});

			}
		});

		mntmExit.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);

			}
		});

		mntmHelp.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				String url =MTGConstants.MTG_DESKTOP_WIKI_URL;
				try {
					Desktop.getDesktop().browse(new URI(url));
				} catch (Exception e1) {
					logger.error(e1);
				}
			}
		});

		mntmAboutMagicDesktop.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				new AboutDialog().setVisible(true);

			}
		});

		mntmReportBug.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try {
					String url = MTGConstants.MTG_DESKTOP_ISSUES_URL;
					Desktop.getDesktop().browse(new URI(url));
				} catch (Exception e) {
					logger.error(e);
				}
			}
		});

		mntmFileOpen.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
					JFileChooser choose = new JFileChooser();
					int returnVal = choose.showOpenDialog(null);
					if (returnVal == JFileChooser.APPROVE_OPTION)
					{
						File f =choose.getSelectedFile();
						AbstractCardExport exp = MTGControler.getInstance().getAbstractExporterFromExt(f);

						if(exp!=null)
						{
							ThreadManager.getInstance().execute(new Runnable() {
								@Override
								public void run() {
									try
									{
										if(cardSearchPanel==null)
											throw new Exception(MTGControler.getInstance().getLangService().getCapitalize("MUST_BE_LOADED",MTGControler.getInstance().getLangService().get("SEARCH_MODULE")));

									cardSearchPanel.loading(true, MTGControler.getInstance().getLangService().getCapitalize("LOADING_FILE",f.getName(),exp));
									MagicDeck d=exp.importDeck(f);
									cardSearchPanel.open(d.getAsList());
									cardSearchPanel.loading(false,"");
									tabbedPane.setSelectedIndex(0);
									} catch (Exception e) {
										logger.error(e);
									}
								}
							},"open " + f);

						}
						else
						{
							JOptionPane.showMessageDialog(null, "NO EXPORTER AVAILABLE",MTGControler.getInstance().getLangService().getCapitalize("ERROR"),JOptionPane.ERROR_MESSAGE);
						}
					}

			}
		});

		if(serviceUpdate.hasNewVersion())
		{
			JMenuItem newversion = new JMenuItem(MTGControler.getInstance().getLangService().getCapitalize("DOWNLOAD_LAST_VERSION")+" : " + serviceUpdate.getOnlineVersion() );
			newversion.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					String url =MTGConstants.MTG_DESKTOP_APP_ZIP;
					try {
						Desktop.getDesktop().browse(new URI(url));
					} catch (Exception e1) {
						logger.error(e1.getMessage());
					}
				}
			});
			mnuAbout.add(newversion);
		}

		//INIT AVAILABLE LOOK AND FEELS
		looks = new HashMap<>();
		looksMore = new HashMap<>();

		for(LookAndFeelInfo i : UIManager.getInstalledLookAndFeels())
			looks.put(i.getName(),i.getClassName());

		looksMore.put("Cerulan","org.pushingpixels.substance.api.skin.SubstanceCeruleanLookAndFeel");
		looksMore.put("Business Blue","org.pushingpixels.substance.api.skin.SubstanceBusinessBlueSteelLookAndFeel");
		looksMore.put("Gemini","org.pushingpixels.substance.api.skin.SubstanceGeminiLookAndFeel");
		looksMore.put("Nebula","org.pushingpixels.substance.api.skin.SubstanceNebulaLookAndFeel");
		looksMore.put("Graphite","org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel");
		looksMore.put("Magellan","org.pushingpixels.substance.api.skin.SubstanceMagellanLookAndFeel");
		looksMore.put("Coffe","org.pushingpixels.substance.api.skin.SubstanceCremeCoffeeLookAndFeel");

		JMenu itMore = new JMenu(MTGControler.getInstance().getLangService().getCapitalize("MORE"));
		for(final String ui : looksMore.keySet())
		{
			final JMenuItem it = new JMenuItem(ui);
			it.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					setLookAndFeel(looksMore.get(ui));
				}
			});
			itMore.add(it);
		}

		for(final String ui : looks.keySet())
		{
			final JMenuItem it = new JMenuItem(ui);
			it.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					setLookAndFeel(looks.get(ui));
				}
			});
			jmnuLook.add(it);
		}

		jmnuLook.add(itMore);

		tabbedPane = new JTabbedPane(MTGConstants.MTG_DESKTOP_TABBED_POSITION);

		if(MTGControler.getInstance().get("modules/search").equals("true"))
		{
			cardSearchPanel=new CardSearchPanel();
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("SEARCH_MODULE"), MTGConstants.ICON_SEARCH_2, cardSearchPanel, null);
		}

		if(MTGControler.getInstance().get("modules/deckbuilder").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DECK_MODULE"), MTGConstants.ICON_DECK, new DeckBuilderGUI(), null);

		if(MTGControler.getInstance().get("modules/game").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("GAME_MODULE"), MTGConstants.ICON_COLLECTION_SMALL, new GameGUI(), null);

		if(MTGControler.getInstance().get("modules/collection").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_MODULE"), MTGConstants.ICON_COLLECTION, new CollectionPanelGUI(), null);

		if(MTGControler.getInstance().get("modules/stock").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("STOCK_MODULE"), MTGConstants.ICON_STOCK, new StockPanelGUI(), null);

		if(MTGControler.getInstance().get("modules/dashboard").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DASHBOARD_MODULE"),MTGConstants.ICON_DASHBOARD, new DashBoardGUI2(), null);

		if(MTGControler.getInstance().get("modules/shopper").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("SHOPPING_MODULE"),MTGConstants.ICON_SHOP, new ShopperGUI(), null);

		if(MTGControler.getInstance().get("modules/alarm").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("ALERT_MODULE"), MTGConstants.ICON_ALERT, new AlarmGUI(), null);

		if(MTGControler.getInstance().get("modules/cardbuilder").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("BUILDER_MODULE"), MTGConstants.ICON_BUILDER, new CardBuilder2GUI(), null);

		if(MTGControler.getInstance().get("modules/rss").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("RSS_MODULE"), MTGConstants.ICON_RSS, new RssGUI(), null);

		if(MTGControler.getInstance().get("modules/history").equals("true"))
			tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("HISTORY_MODULE"), MTGConstants.ICON_STORY, new StoriesGUI(), null);

		//tabbedPane.addTab("MKM", MTGConstants.ICON_SHOP, new MkmPanel(), null);

		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CONFIGURATION"), MTGConstants.ICON_CONFIG, new ConfigurationPanelGUI(), null);

		getContentPane().add(tabbedPane, BorderLayout.CENTER);

		if (SystemTray.isSupported()) {
			tray.add(trayNotifier);
			trayNotifier.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					if(!isVisible())
						setVisible(true);
					else
						setVisible(false);
				}
			});
			PopupMenu menuTray = new PopupMenu();
			for(int index_tab = 0;index_tab<tabbedPane.getTabCount();index_tab++)
			{
				final int index = index_tab;
				MenuItem it = new MenuItem(tabbedPane.getTitleAt(index_tab));
				it.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
							setVisible(true);
							setSelectedTab(index);

					}
				});
				menuTray.add(it);
			}

			trayNotifier.setPopupMenu(menuTray);
			trayNotifier.setToolTip("MTG Desktop Companion");
			if(serviceUpdate.hasNewVersion())
				trayNotifier.displayMessage(getTitle(),MTGControler.getInstance().getLangService().getCapitalize("NEW_VERSION")+" " + serviceUpdate.getOnlineVersion() + " "+MTGControler.getInstance().getLangService().get("AVAILABLE"),TrayIcon.MessageType.INFO);

			ThreadManager.getInstance().execute(new Runnable() {
				public void run() {
					try {
						new TipsOfTheDayDialog().show();
					} catch (IOException e) {
						logger.error(e);
					}

				}
			}, "launch tooltip");
		}
	}

Replace Anonymous With Lambda org.magic.gui.MagicGUI.initGUI.execute.new Runnable with () -> {trynew TipsOfTheDayDialog().show(); in method public initGUI() : void from class org.magic.gui.MagicGUI


	public DeckPricePanel() {
		setLayout(new BorderLayout(0, 0));

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

		cboPricers = new JComboBox<>(new DefaultComboBoxModel(MTGControler.getInstance().getEnabledPricers().toArray()));
		cboPricers.addItemListener(ie->{
				if (ie.getStateChange() == ItemEvent.SELECTED) {
					model.setProvider((MagicPricesProvider)cboPricers.getSelectedItem());
				}

		});
		panel.add(cboPricers);

		JButton btnCheckPrice = new JButton(MTGConstants.ICON_EURO);

		btnCheckPrice.addActionListener(ae-> {
				model.clear();

				ThreadManager.getInstance().execute(()->{
						total=0;

						for(MagicCard c : deck.getMap().keySet())
						{
							try {
								List<MagicPrice> prices = model.getProviders().get(0).getPrice(c.getEditions().get(0), c);
								MagicPrice p=null;
								if(!prices.isEmpty())
								{
									Collections.sort(prices, new MagicPricesComparator());
									p = prices.get(0);
									p.setValue(p.getValue()*deck.getMap().get(c));
									p.setSite(c.getName() +"(x"+ deck.getMap().get(c)+")");
								}
								else
								{
									p=new MagicPrice();
									p.setValue(0.0);
									p.setSite(c.getName() +"(x"+ deck.getMap().get(c)+") - " + MTGControler.getInstance().getLangService().get("NOT_FOUND"));
									p.setCurrency("");
								}

								model.addPrice(p);
								total+=p.getValue();

								lblPrice.setText(String.valueOf(total) + " " + p.getCurrency());

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

						}
						deck.setAveragePrice(total);
				});

		});
		panel.add(btnCheckPrice);

		lblPrice = new JLabel();
		panel.add(lblPrice);
		lblPrice.setFont(new Font("Tahoma", Font.BOLD, 13));

		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		model = new CardsPriceTableModel();
		tablePrice = new JTable(model);
		tablePrice.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent ev) {
				if(ev.getClickCount()==2 && !ev.isConsumed())
				{
					ev.consume();
					try {
						String url = tablePrice.getValueAt(tablePrice.getSelectedRow(), 6).toString();
						Desktop.getDesktop().browse(new URI(url));
					} catch (Exception e) {
						logger.error(e);
					}

				}

			}
		});

		scrollPane.setViewportView(tablePrice);
	}

	public DeckPricePanel() {
		setLayout(new BorderLayout(0, 0));

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

		cboPricers = new JComboBox<MagicPricesProvider>(new DefaultComboBoxModel(MTGControler.getInstance().getEnabledPricers().toArray()));
		cboPricers.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent ie) {
				if (ie.getStateChange() == ItemEvent.SELECTED) {
					model.setProvider((MagicPricesProvider)cboPricers.getSelectedItem());
				}
			}
		});
		panel.add(cboPricers);

		JButton btnCheckPrice = new JButton(MTGConstants.ICON_EURO);

		btnCheckPrice.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				model.clear();

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

					@Override
					public void run() {
						total=0;

						for(MagicCard c : deck.getMap().keySet())
						{
							try {
								List<MagicPrice> prices = model.getProviders().get(0).getPrice(c.getEditions().get(0), c);
								MagicPrice p=null;
								if(prices.size()>0)
								{
									Collections.sort(prices, new MagicPricesComparator());
									p = prices.get(0);
									p.setValue(p.getValue()*deck.getMap().get(c));
									p.setSite(c.getName() +"(x"+ deck.getMap().get(c)+")");
								}
								else
								{
									p=new MagicPrice();
									p.setValue(0.0);
									p.setSite(c.getName() +"(x"+ deck.getMap().get(c)+") - " + MTGControler.getInstance().getLangService().get("NOT_FOUND"));
									p.setCurrency("");
								}

								model.addPrice(p);
								total+=p.getValue();

								lblPrice.setText(String.valueOf(total) + " " + p.getCurrency());

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

						}

						deck.setAveragePrice(total);

					}
				});

			}
		});
		panel.add(btnCheckPrice);

		lblPrice = new JLabel();
		panel.add(lblPrice);
		lblPrice.setFont(new Font("Tahoma", Font.BOLD, 13));

		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		model = new CardsPriceTableModel();
		tablePrice = new JTable(model);
		tablePrice.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent ev) {
				if(ev.getClickCount()==2 && !ev.isConsumed())
				{
					ev.consume();
					try {
						String url = tablePrice.getValueAt(tablePrice.getSelectedRow(), 6).toString();
						Desktop.getDesktop().browse(new URI(url));
					} catch (Exception e) {
						logger.error(e);
					}

				}

			}
		});

		scrollPane.setViewportView(tablePrice);
	}

Replace Anonymous With Lambda org.magic.gui.components.DeckPricePanel.DeckPricePanel.addActionListener.new ActionListener with ae -> {model.clear(); in method public DeckPricePanel() from class org.magic.gui.components.DeckPricePanel


	public void init(MagicDeck deck) {
		cards = new ArrayList<>();
		if(deck!=null)
			if(deck.getMap()!=null)
				for(Entry<MagicCard, Integer> cci : deck.getMap().entrySet())
				{
					MagicCard mc = cci.getKey();
					for(int i=0;i<cci.getValue();i++)
						cards.add(mc);
				}
		refresh();
	}

	public void init(MagicDeck deck) {
		cards = new ArrayList<MagicCard>();
		if(deck!=null)
			if(deck.getMap()!=null)
				for(Entry<MagicCard, Integer> cci : deck.getMap().entrySet())
				{
					MagicCard mc = cci.getKey();
					for(int i=0;i<cci.getValue();i++)
						cards.add(mc);
				}
		refresh();
	}

Replace Generic With Diamond ArrayList<MagicCard> with ArrayList<> in method public init(deck MagicDeck) : void from class org.magic.gui.components.charts.CmcChartPanel


	private CategoryDataset  getManaCurveDataSet()
	{
		DefaultCategoryDataset dataset = new DefaultCategoryDataset();
		TreeMap<Integer, Number> temp = new TreeMap<>();

			for(MagicCard mc : cards)
			{
				if(mc.getCmc()!=null)
					if(!mc.getTypes().contains("Land"))
						temp.put(mc.getCmc(),count(mc.getCmc()) );

//					if(mc.getCmc()==null)
//						temp.put(0,count(0) );
//					else
//						temp.put(mc.getCmc(),count(mc.getCmc()) );

			}
			for(Integer k : temp.keySet())
				dataset.addValue(temp.get(k), "cmc",k);

        return dataset;
	}

	private CategoryDataset  getManaCurveDataSet()
	{
		DefaultCategoryDataset dataset = new DefaultCategoryDataset();
		TreeMap<Integer, Number> temp = new TreeMap<Integer, Number>();

			for(MagicCard mc : cards)
			{
				if(mc.getCmc()!=null)
					if(!mc.getTypes().contains("Land"))
						temp.put(mc.getCmc(),count(mc.getCmc()) );

//					if(mc.getCmc()==null)
//						temp.put(0,count(0) );
//					else
//						temp.put(mc.getCmc(),count(mc.getCmc()) );

			}
			for(Integer k : temp.keySet())
				dataset.addValue(temp.get(k), "cmc",k);

        return dataset;
	}

Replace Generic With Diamond TreeMap<Integer,Number> with TreeMap<> in method private getManaCurveDataSet() : CategoryDataset from class org.magic.gui.components.charts.CmcChartPanel


	public MagicCollectionTableCellRenderer() {
		cache=new HashMap<>();
	}

	public MagicCollectionTableCellRenderer() {
		cache=new HashMap<String,ImageIcon>();
	}

Replace Generic With Diamond HashMap<String,ImageIcon> with HashMap<> in method public MagicCollectionTableCellRenderer() from class org.magic.gui.renderer.MagicCollectionTableCellRenderer


	@Override
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row, int column) {

		List<MagicEdition> e = (List)value;
		cbo = new JComboBox<>(e.toArray(new MagicEdition[e.size()]));
		return cbo;
	}

	@Override
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row, int column) {

		List<MagicEdition> e = (List)value;
		cbo = new JComboBox<MagicEdition>(e.toArray(new MagicEdition[e.size()]));
		return cbo;
	}

Replace Generic With Diamond JComboBox<MagicEdition> with JComboBox<> in method public getTableCellRendererComponent(table JTable, value Object, isSelected boolean, hasFocus boolean, row int, column int) : Component from class org.magic.gui.renderer.MagicEditionRenderer


            public void run() {
            	StringBuilder message=new StringBuilder();
            	boolean notify=false;
            	if(MTGControler.getInstance().getEnabledDAO().getAlerts()!=null)
            	for(MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().getAlerts())
                {
            		alert.getOffers().clear();
                	for(MagicPricesProvider prov : MTGControler.getInstance().getEnabledPricers())
                	{
                		List<MagicPrice> okz = new ArrayList<>();
                		try {
							List<MagicPrice> list=prov.getPrice(alert.getCard().getEditions().get(0), alert.getCard());
							for(MagicPrice p : list)
							{	if(p.getValue()<=alert.getPrice() && p.getValue()>Double.parseDouble(MTGControler.getInstance().get("min-price-alert")))
								{
									alert.getOffers().add(p);
									okz.add(p);
									logger.info("Found offer " + prov + ":" + alert.getCard() + " "+ p.getValue() +p.getCurrency() );
									notify=true;
								}
							}
							prov.alertDetected(okz);
							alert.orderDesc();
						} catch (Exception e) {
							MTGLogger.printStackTrace(e);
							logger.error(e);
						}
                	}

                		message.append(alert.getCard()).append(" : ").append(alert.getOffers().size()).append(" offers").append("\n");

                }

            	if(enableNotify)
            		if(notify)
            			MTGControler.getInstance().notify("New offers", message.toString(), MessageType.INFO);

            }

            public void run() {
            	StringBuilder message=new StringBuilder();
            	boolean notify=false;
            	if(MTGControler.getInstance().getEnabledDAO().getAlerts()!=null)
            	for(MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().getAlerts())
                {
            		alert.getOffers().clear();
                	for(MagicPricesProvider prov : MTGControler.getInstance().getEnabledPricers())
                	{
                		List<MagicPrice> okz = new ArrayList<MagicPrice>();
                		try {
							List<MagicPrice> list=prov.getPrice(alert.getCard().getEditions().get(0), alert.getCard());
							for(MagicPrice p : list)
							{	if(p.getValue()<=alert.getPrice() && p.getValue()>Double.parseDouble(MTGControler.getInstance().get("min-price-alert")))
								{
									alert.getOffers().add(p);
									okz.add(p);
									logger.info("Found offer " + prov + ":" + alert.getCard() + " "+ p.getValue() +p.getCurrency() );
									notify=true;
								}
							}
							prov.alertDetected(okz);
							alert.orderDesc();
						} catch (Exception e) {
							MTGLogger.printStackTrace(e);
							logger.error(e);
						}
                	}

                		message.append(alert.getCard()).append(" : ").append(alert.getOffers().size()).append(" offers").append("\n");

                }

            	if(enableNotify)
            		if(notify)
            			MTGControler.getInstance().notify("New offers", message.toString(), MessageType.INFO);

            }

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public run() : void from class org.magic.servers.impl.PricesCheckerTimer.start.new TimerTask


	public void start()
	{
		running=true;
		tache = new TimerTask() {
            public void run() {
            	StringBuilder message=new StringBuilder();
            	boolean notify=false;
            	if(MTGControler.getInstance().getEnabledDAO().getAlerts()!=null)
            	for(MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().getAlerts())
                {
            		alert.getOffers().clear();
                	for(MagicPricesProvider prov : MTGControler.getInstance().getEnabledPricers())
                	{
                		List<MagicPrice> okz = new ArrayList<>();
                		try {
							List<MagicPrice> list=prov.getPrice(alert.getCard().getEditions().get(0), alert.getCard());
							for(MagicPrice p : list)
							{	if(p.getValue()<=alert.getPrice() && p.getValue()>Double.parseDouble(MTGControler.getInstance().get("min-price-alert")))
								{
									alert.getOffers().add(p);
									okz.add(p);
									logger.info("Found offer " + prov + ":" + alert.getCard() + " "+ p.getValue() +p.getCurrency() );
									notify=true;
								}
							}
							prov.alertDetected(okz);
							alert.orderDesc();
						} catch (Exception e) {
							MTGLogger.printStackTrace(e);
							logger.error(e);
						}
                	}

                		message.append(alert.getCard()).append(" : ").append(alert.getOffers().size()).append(" offers").append("\n");

                }

            	if(enableNotify)
            		if(notify)
            			MTGControler.getInstance().notify("New offers", message.toString(), MessageType.INFO);

            }
        };

		timer.scheduleAtFixedRate(tache,0,Long.parseLong(props.getProperty("TIMEOUT_MINUTE"))*60000);
		logger.info("Server start with "+ props.getProperty("TIMEOUT_MINUTE")+" min timeout");

	}

	public void start()
	{
		running=true;
		tache = new TimerTask() {
            public void run() {
            	StringBuilder message=new StringBuilder();
            	boolean notify=false;
            	if(MTGControler.getInstance().getEnabledDAO().getAlerts()!=null)
            	for(MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().getAlerts())
                {
            		alert.getOffers().clear();
                	for(MagicPricesProvider prov : MTGControler.getInstance().getEnabledPricers())
                	{
                		List<MagicPrice> okz = new ArrayList<MagicPrice>();
                		try {
							List<MagicPrice> list=prov.getPrice(alert.getCard().getEditions().get(0), alert.getCard());
							for(MagicPrice p : list)
							{	if(p.getValue()<=alert.getPrice() && p.getValue()>Double.parseDouble(MTGControler.getInstance().get("min-price-alert")))
								{
									alert.getOffers().add(p);
									okz.add(p);
									logger.info("Found offer " + prov + ":" + alert.getCard() + " "+ p.getValue() +p.getCurrency() );
									notify=true;
								}
							}
							prov.alertDetected(okz);
							alert.orderDesc();
						} catch (Exception e) {
							MTGLogger.printStackTrace(e);
							logger.error(e);
						}
                	}

                		message.append(alert.getCard()).append(" : ").append(alert.getOffers().size()).append(" offers").append("\n");

                }

            	if(enableNotify)
            		if(notify)
            			MTGControler.getInstance().notify("New offers", message.toString(), MessageType.INFO);

            }
        };

		timer.scheduleAtFixedRate(tache,0,Long.parseLong(props.getProperty("TIMEOUT_MINUTE"))*60000);
		logger.info("Server start with "+ props.getProperty("TIMEOUT_MINUTE")+" min timeout");

	}

Replace Generic With Diamond ArrayList<MagicPrice> with ArrayList<> in method public start() : void from class org.magic.servers.impl.PricesCheckerTimer


    public Observable() {
        obs = new ArrayList<>();
    }

    public Observable() {
        obs = new ArrayList<Observer>();
    }

Replace Generic With Diamond ArrayList<Observer> with ArrayList<> in method public Observable() from class org.utils.patterns.observer.Observable


	public DeckbrewProvider() {
		gson = new Gson();
		list = new ArrayList<>();
		init();

	}

	public DeckbrewProvider() {
		gson = new Gson();
		list = new ArrayList<MagicEdition>();
		init();

	}

Replace Generic With Diamond ArrayList<MagicEdition> with ArrayList<> in method public DeckbrewProvider() from class org.magic.api.providers.impl.DeckbrewProvider


	@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(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 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);
	}

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