	public MagicCardDetailPanel() {

		obs = new Observable();
		gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[] { 52, 382, 76, 0, 57, 32, 51, 0, 77, 0 };
		gridBagLayout.rowHeights = new int[] { 0, 0, 0, 44, 0, 65, 25, 21, 0, 0, 0, 0 };
		gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
		gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0E-4 };
		setLayout(gridBagLayout);

		JLabel nameLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("NAME") + " :");
		GridBagConstraints labelgbc5 = new GridBagConstraints();
		labelgbc5.insets = new Insets(5, 5, 5, 5);
		labelgbc5.gridx = 0;
		labelgbc5.gridy = 0;
		add(nameLabel, labelgbc5);

		nameJTextField = new JTextField();

		GridBagConstraints componentgbc5 = new GridBagConstraints();
		componentgbc5.insets = new Insets(5, 0, 5, 5);
		componentgbc5.fill = GridBagConstraints.HORIZONTAL;
		componentgbc5.gridx = 1;
		componentgbc5.gridy = 0;
		add(nameJTextField, componentgbc5);

		JLabel cmcLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_COST") + " :");
		GridBagConstraints labelgbc0 = new GridBagConstraints();
		labelgbc0.anchor = GridBagConstraints.EAST;
		labelgbc0.insets = new Insets(5, 5, 5, 5);
		labelgbc0.gridx = 2;
		labelgbc0.gridy = 0;
		add(cmcLabel, labelgbc0);

		cmcJTextField = new JTextField();
		GridBagConstraints componentgbc0 = new GridBagConstraints();
		componentgbc0.insets = new Insets(5, 0, 5, 5);
		componentgbc0.fill = GridBagConstraints.HORIZONTAL;
		componentgbc0.gridx = 4;
		componentgbc0.gridy = 0;
		add(cmcJTextField, componentgbc0);

		lblLogoSet = new JLabel("");
		GridBagConstraints gbclblLogoSet = new GridBagConstraints();
		gbclblLogoSet.gridwidth = 2;
		gbclblLogoSet.gridheight = 2;
		gbclblLogoSet.insets = new Insets(0, 0, 5, 5);
		gbclblLogoSet.gridx = 5;
		gbclblLogoSet.gridy = 0;
		add(lblLogoSet, gbclblLogoSet);

		btnAlert = new JButton("");
		btnAlert.setEnabled(false);
		Image b = MTGConstants.ICON_ALERT.getImage();
		btnAlert.setIcon(new ImageIcon(b));
		btnAlert.addActionListener(ae -> {

			MagicCardAlert alert = new MagicCardAlert();
			alert.setCard(magicCard);
			String price = JOptionPane.showInputDialog(null,
					MTGControler.getInstance().getLangService().getCapitalize("SELECT_MAXIMUM_PRICE"),
					MTGControler.getInstance().getLangService().getCapitalize("ADD_ALERT_FOR", magicCard),
					JOptionPane.QUESTION_MESSAGE);
			alert.setPrice(Double.parseDouble(price));

			try {
				MTGControler.getInstance().getEnabled(MTGDao.class).saveAlert(alert);
			} catch (Exception e) {
				logger.error(e);
				MTGControler.getInstance().notify(e);
			}
		});

		GridBagConstraints gbcbtnAlert = new GridBagConstraints();
		gbcbtnAlert.insets = new Insets(0, 0, 5, 0);
		gbcbtnAlert.gridx = 8;
		gbcbtnAlert.gridy = 0;
		add(btnAlert, gbcbtnAlert);

		lblThumbnail = new JLabel("");
		GridBagConstraints gbclblThumbnail = new GridBagConstraints();
		gbclblThumbnail.insets = new Insets(0, 0, 5, 0);
		gbclblThumbnail.fill = GridBagConstraints.HORIZONTAL;
		gbclblThumbnail.gridwidth = 2;
		gbclblThumbnail.gridheight = 9;
		gbclblThumbnail.gridx = 7;
		gbclblThumbnail.gridy = 1;
		add(lblThumbnail, gbclblThumbnail);

		JLabel fullTypeLabel = new JLabel(
				MTGControler.getInstance().getLangService().getCapitalize("CARD_TYPES") + " :");
		GridBagConstraints labelgbc2 = new GridBagConstraints();
		labelgbc2.insets = new Insets(5, 5, 5, 5);
		labelgbc2.gridx = 0;
		labelgbc2.gridy = 1;
		add(fullTypeLabel, labelgbc2);

		fullTypeJTextField = new JTextField();
		GridBagConstraints componentgbc2 = new GridBagConstraints();
		componentgbc2.insets = new Insets(5, 0, 5, 5);
		componentgbc2.fill = GridBagConstraints.HORIZONTAL;
		componentgbc2.gridx = 1;
		componentgbc2.gridy = 1;
		add(fullTypeJTextField, componentgbc2);

		JLabel costLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_MANA") + " :");
		GridBagConstraints labelgbc1 = new GridBagConstraints();
		labelgbc1.anchor = GridBagConstraints.EAST;
		labelgbc1.insets = new Insets(5, 5, 5, 5);
		labelgbc1.gridx = 2;
		labelgbc1.gridy = 1;
		add(costLabel, labelgbc1);

		manaPanel = new ManaPanel();
		GridBagConstraints componentgbc1 = new GridBagConstraints();
		componentgbc1.insets = new Insets(5, 0, 5, 5);
		componentgbc1.fill = GridBagConstraints.HORIZONTAL;
		componentgbc1.gridx = 4;
		componentgbc1.gridy = 1;
		add(manaPanel, componentgbc1);

		JLabel loyaltyLabel = new JLabel(
				MTGControler.getInstance().getLangService().getCapitalize("CARD_LOYALTY") + " :");
		GridBagConstraints gbcloyaltyLabel = new GridBagConstraints();
		gbcloyaltyLabel.insets = new Insets(0, 0, 5, 5);
		gbcloyaltyLabel.gridx = 0;
		gbcloyaltyLabel.gridy = 2;
		add(loyaltyLabel, gbcloyaltyLabel);
		loyaltyJTextField = new JTextField();
		loyaltyJTextField.setColumns(5);
		JLabel powerLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_POWER") + " :");
		powerJTextField = new JTextField();
		powerJTextField.setColumns(5);
		JLabel toughnessLabel = new JLabel("/");
		toughnessJTextField = new JTextField();
		toughnessJTextField.setColumns(5);

		panelDetailCreature = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panelDetailCreature.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbcpanelDetailCreature = new GridBagConstraints();
		gbcpanelDetailCreature.gridwidth = 3;
		gbcpanelDetailCreature.insets = new Insets(0, 0, 5, 5);
		gbcpanelDetailCreature.fill = GridBagConstraints.BOTH;
		gbcpanelDetailCreature.gridx = 1;
		gbcpanelDetailCreature.gridy = 2;
		add(panelDetailCreature, gbcpanelDetailCreature);
		panelDetailCreature.add(loyaltyJTextField);
		panelDetailCreature.add(powerLabel);
		panelDetailCreature.add(powerJTextField);
		panelDetailCreature.add(toughnessLabel);
		panelDetailCreature.add(toughnessJTextField);

		lblnumberInSet = new JLabel("/");
		GridBagConstraints gbclblnumberInSet = new GridBagConstraints();
		gbclblnumberInSet.gridwidth = 2;
		gbclblnumberInSet.insets = new Insets(0, 0, 5, 5);
		gbclblnumberInSet.gridx = 5;
		gbclblnumberInSet.gridy = 2;
		add(lblnumberInSet, gbclblnumberInSet);

		lblLayout = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_LAYOUT") + " :");
		GridBagConstraints gbclblLayout = new GridBagConstraints();
		gbclblLayout.insets = new Insets(0, 0, 5, 5);
		gbclblLayout.gridx = 0;
		gbclblLayout.gridy = 3;
		add(lblLayout, gbclblLayout);

		txtLayoutField = new JTextField();

		GridBagConstraints gbctxtLayoutField = new GridBagConstraints();
		gbctxtLayoutField.insets = new Insets(0, 0, 5, 5);
		gbctxtLayoutField.fill = GridBagConstraints.HORIZONTAL;
		gbctxtLayoutField.gridx = 1;
		gbctxtLayoutField.gridy = 3;
		add(txtLayoutField, gbctxtLayoutField);
		txtLayoutField.setColumns(10);
		GridBagConstraints gbclstFormats = new GridBagConstraints();
		gbclstFormats.gridwidth = 3;
		gbclstFormats.insets = new Insets(0, 0, 5, 5);
		gbclstFormats.fill = GridBagConstraints.HORIZONTAL;
		gbclstFormats.gridx = 4;
		gbclstFormats.gridy = 3;

		chckbxReserved = new JCheckBox("(R)");
		GridBagConstraints gbcchckbxReserved = new GridBagConstraints();
		gbcchckbxReserved.insets = new Insets(0, 0, 5, 5);
		gbcchckbxReserved.gridx = 2;
		gbcchckbxReserved.gridy = 3;
		add(chckbxReserved, gbcchckbxReserved);

		rarityJTextField = new JTextField();
		GridBagConstraints gbcrarityJTextField = new GridBagConstraints();
		gbcrarityJTextField.gridwidth = 3;
		gbcrarityJTextField.insets = new Insets(0, 0, 5, 5);
		gbcrarityJTextField.fill = GridBagConstraints.HORIZONTAL;
		gbcrarityJTextField.gridx = 3;
		gbcrarityJTextField.gridy = 3;
		add(rarityJTextField, gbcrarityJTextField);
		rarityJTextField.setColumns(10);

		lstFormats = new JList<>(new DefaultListModel<MagicFormat>());
		lstFormats.setCellRenderer((JList<? extends MagicFormat> list, MagicFormat obj, int arg2,boolean arg3, boolean arg4)->{
				JLabel l = new JLabel(obj.getFormat());
					if(obj.isLegal())
						l.setIcon(MTGConstants.ICON_SMALL_CHECK);
					else
						l.setIcon(MTGConstants.ICON_SMALL_DELETE);

				return l;
		});

		GridBagConstraints gbcscrollLegality = new GridBagConstraints();
		gbcscrollLegality.gridheight = 2;
		gbcscrollLegality.gridwidth = 2;
		gbcscrollLegality.insets = new Insets(0, 0, 5, 5);
		gbcscrollLegality.fill = GridBagConstraints.BOTH;
		gbcscrollLegality.gridx = 1;
		gbcscrollLegality.gridy = 8;
		add(new JScrollPane(lstFormats), gbcscrollLegality);

		JLabel textLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_TEXT") + " :");
		GridBagConstraints labelgbc8 = new GridBagConstraints();
		labelgbc8.gridheight = 2;
		labelgbc8.insets = new Insets(5, 5, 5, 5);
		labelgbc8.gridx = 0;
		labelgbc8.gridy = 4;
		add(textLabel, labelgbc8);

		txtTextPane = new MagicTextPane();
		txtTextPane.setBorder(new LineBorder(Color.GRAY));
		txtTextPane.setBackground(Color.WHITE);

		GridBagConstraints gbctxtTextPane = new GridBagConstraints();
		gbctxtTextPane.gridwidth = 6;
		gbctxtTextPane.gridheight = 2;
		gbctxtTextPane.insets = new Insets(5, 0, 5, 5);
		gbctxtTextPane.fill = GridBagConstraints.BOTH;
		gbctxtTextPane.gridx = 1;
		gbctxtTextPane.gridy = 4;
		add(txtTextPane, gbctxtTextPane);

		lblFlavor = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_FLAVOR") + " :");
		GridBagConstraints gbclblFlavor = new GridBagConstraints();
		gbclblFlavor.insets = new Insets(0, 0, 5, 5);
		gbclblFlavor.gridx = 0;
		gbclblFlavor.gridy = 6;
		add(lblFlavor, gbclblFlavor);

		txtFlavorArea = new JTextPane();
		GridBagConstraints gbctxtFlavorArea = new GridBagConstraints();
		gbctxtFlavorArea.gridwidth = 6;
		gbctxtFlavorArea.insets = new Insets(0, 0, 5, 5);
		gbctxtFlavorArea.fill = GridBagConstraints.BOTH;
		gbctxtFlavorArea.gridx = 1;
		gbctxtFlavorArea.gridy = 6;
		add(txtFlavorArea, gbctxtFlavorArea);

		lblArtist = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_ARTIST") + " :");
		GridBagConstraints gbclblArtist = new GridBagConstraints();
		gbclblArtist.insets = new Insets(0, 0, 5, 5);
		gbclblArtist.gridx = 0;
		gbclblArtist.gridy = 7;
		add(lblArtist, gbclblArtist);

		txtArtist = new JTextField();
		GridBagConstraints gbctxtArtist = new GridBagConstraints();
		gbctxtArtist.insets = new Insets(0, 0, 5, 5);
		gbctxtArtist.fill = GridBagConstraints.HORIZONTAL;
		gbctxtArtist.gridx = 1;
		gbctxtArtist.gridy = 7;
		add(txtArtist, gbctxtArtist);
		txtArtist.setColumns(10);

		lblWatermark = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_WATERMARK") + " :");
		GridBagConstraints gbclblWatermark = new GridBagConstraints();
		gbclblWatermark.anchor = GridBagConstraints.EAST;
		gbclblWatermark.insets = new Insets(0, 0, 5, 5);
		gbclblWatermark.gridx = 2;
		gbclblWatermark.gridy = 7;
		add(lblWatermark, gbclblWatermark);

		txtWatermark = new JTextField();

		GridBagConstraints gbctxtWatermark = new GridBagConstraints();
		gbctxtWatermark.gridwidth = 3;
		gbctxtWatermark.insets = new Insets(0, 0, 5, 5);
		gbctxtWatermark.fill = GridBagConstraints.HORIZONTAL;
		gbctxtWatermark.gridx = 4;
		gbctxtWatermark.gridy = 7;
		add(txtWatermark, gbctxtWatermark);
		txtWatermark.setColumns(10);

		lblLegal = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_LEGALITIES") + " :");
		GridBagConstraints gbclblLegal = new GridBagConstraints();
		gbclblLegal.insets = new Insets(0, 0, 5, 5);
		gbclblLegal.gridx = 0;
		gbclblLegal.gridy = 8;
		add(lblLegal, gbclblLegal);

		GridBagConstraints gbcscrollCollections = new GridBagConstraints();
		gbcscrollCollections.gridheight = 2;
		gbcscrollCollections.gridwidth = 3;
		gbcscrollCollections.insets = new Insets(0, 0, 5, 5);
		gbcscrollCollections.fill = GridBagConstraints.BOTH;
		gbcscrollCollections.gridx = 4;
		gbcscrollCollections.gridy = 8;
		listModelCollection = new DefaultListModel<>();
		listCollection = new JList<>(listModelCollection);
		add(new JScrollPane(listCollection), gbcscrollCollections);

		panelSwitchLangage = new JPanel();
		FlowLayout flowLayout1 = (FlowLayout) panelSwitchLangage.getLayout();
		flowLayout1.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbcpanelSwitchLangage = new GridBagConstraints();
		gbcpanelSwitchLangage.gridwidth = 9;
		gbcpanelSwitchLangage.insets = new Insets(0, 0, 0, 5);
		gbcpanelSwitchLangage.fill = GridBagConstraints.BOTH;
		gbcpanelSwitchLangage.gridx = 0;
		gbcpanelSwitchLangage.gridy = 10;
		add(panelSwitchLangage, gbcpanelSwitchLangage);

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

		setEditable(false);

	}

	public MagicCardDetailPanel() {

		obs = new Observable();
		gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[] { 52, 382, 76, 0, 57, 32, 51, 0, 77, 0 };
		gridBagLayout.rowHeights = new int[] { 0, 0, 0, 44, 0, 65, 25, 21, 0, 0, 0, 0 };
		gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 };
		gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0E-4 };
		setLayout(gridBagLayout);

		JLabel nameLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("NAME") + " :");
		GridBagConstraints labelgbc5 = new GridBagConstraints();
		labelgbc5.insets = new Insets(5, 5, 5, 5);
		labelgbc5.gridx = 0;
		labelgbc5.gridy = 0;
		add(nameLabel, labelgbc5);

		nameJTextField = new JTextField();

		GridBagConstraints componentgbc5 = new GridBagConstraints();
		componentgbc5.insets = new Insets(5, 0, 5, 5);
		componentgbc5.fill = GridBagConstraints.HORIZONTAL;
		componentgbc5.gridx = 1;
		componentgbc5.gridy = 0;
		add(nameJTextField, componentgbc5);

		JLabel cmcLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_COST") + " :");
		GridBagConstraints labelgbc0 = new GridBagConstraints();
		labelgbc0.anchor = GridBagConstraints.EAST;
		labelgbc0.insets = new Insets(5, 5, 5, 5);
		labelgbc0.gridx = 2;
		labelgbc0.gridy = 0;
		add(cmcLabel, labelgbc0);

		cmcJTextField = new JTextField();
		GridBagConstraints componentgbc0 = new GridBagConstraints();
		componentgbc0.insets = new Insets(5, 0, 5, 5);
		componentgbc0.fill = GridBagConstraints.HORIZONTAL;
		componentgbc0.gridx = 4;
		componentgbc0.gridy = 0;
		add(cmcJTextField, componentgbc0);

		lblLogoSet = new JLabel("");
		GridBagConstraints gbclblLogoSet = new GridBagConstraints();
		gbclblLogoSet.gridwidth = 2;
		gbclblLogoSet.gridheight = 2;
		gbclblLogoSet.insets = new Insets(0, 0, 5, 5);
		gbclblLogoSet.gridx = 5;
		gbclblLogoSet.gridy = 0;
		add(lblLogoSet, gbclblLogoSet);

		btnAlert = new JButton("");
		btnAlert.setEnabled(false);
		Image b = MTGConstants.ICON_ALERT.getImage();
		btnAlert.setIcon(new ImageIcon(b));
		btnAlert.addActionListener(ae -> {

			MagicCardAlert alert = new MagicCardAlert();
			alert.setCard(magicCard);
			String price = JOptionPane.showInputDialog(null,
					MTGControler.getInstance().getLangService().getCapitalize("SELECT_MAXIMUM_PRICE"),
					MTGControler.getInstance().getLangService().getCapitalize("ADD_ALERT_FOR", magicCard),
					JOptionPane.QUESTION_MESSAGE);
			alert.setPrice(Double.parseDouble(price));

			try {
				MTGControler.getInstance().getEnabled(MTGDao.class).saveAlert(alert);
			} catch (Exception e) {
				logger.error(e);
				MTGControler.getInstance().notify(e);
			}
		});

		GridBagConstraints gbcbtnAlert = new GridBagConstraints();
		gbcbtnAlert.insets = new Insets(0, 0, 5, 0);
		gbcbtnAlert.gridx = 8;
		gbcbtnAlert.gridy = 0;
		add(btnAlert, gbcbtnAlert);

		lblThumbnail = new JLabel("");
		GridBagConstraints gbclblThumbnail = new GridBagConstraints();
		gbclblThumbnail.insets = new Insets(0, 0, 5, 0);
		gbclblThumbnail.fill = GridBagConstraints.HORIZONTAL;
		gbclblThumbnail.gridwidth = 2;
		gbclblThumbnail.gridheight = 9;
		gbclblThumbnail.gridx = 7;
		gbclblThumbnail.gridy = 1;
		add(lblThumbnail, gbclblThumbnail);

		JLabel fullTypeLabel = new JLabel(
				MTGControler.getInstance().getLangService().getCapitalize("CARD_TYPES") + " :");
		GridBagConstraints labelgbc2 = new GridBagConstraints();
		labelgbc2.insets = new Insets(5, 5, 5, 5);
		labelgbc2.gridx = 0;
		labelgbc2.gridy = 1;
		add(fullTypeLabel, labelgbc2);

		fullTypeJTextField = new JTextField();
		GridBagConstraints componentgbc2 = new GridBagConstraints();
		componentgbc2.insets = new Insets(5, 0, 5, 5);
		componentgbc2.fill = GridBagConstraints.HORIZONTAL;
		componentgbc2.gridx = 1;
		componentgbc2.gridy = 1;
		add(fullTypeJTextField, componentgbc2);

		JLabel costLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_MANA") + " :");
		GridBagConstraints labelgbc1 = new GridBagConstraints();
		labelgbc1.anchor = GridBagConstraints.EAST;
		labelgbc1.insets = new Insets(5, 5, 5, 5);
		labelgbc1.gridx = 2;
		labelgbc1.gridy = 1;
		add(costLabel, labelgbc1);

		manaPanel = new ManaPanel();
		GridBagConstraints componentgbc1 = new GridBagConstraints();
		componentgbc1.insets = new Insets(5, 0, 5, 5);
		componentgbc1.fill = GridBagConstraints.HORIZONTAL;
		componentgbc1.gridx = 4;
		componentgbc1.gridy = 1;
		add(manaPanel, componentgbc1);

		JLabel loyaltyLabel = new JLabel(
				MTGControler.getInstance().getLangService().getCapitalize("CARD_LOYALTY") + " :");
		GridBagConstraints gbcloyaltyLabel = new GridBagConstraints();
		gbcloyaltyLabel.insets = new Insets(0, 0, 5, 5);
		gbcloyaltyLabel.gridx = 0;
		gbcloyaltyLabel.gridy = 2;
		add(loyaltyLabel, gbcloyaltyLabel);
		loyaltyJTextField = new JTextField();
		loyaltyJTextField.setColumns(5);
		JLabel powerLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_POWER") + " :");
		powerJTextField = new JTextField();
		powerJTextField.setColumns(5);
		JLabel toughnessLabel = new JLabel("/");
		toughnessJTextField = new JTextField();
		toughnessJTextField.setColumns(5);

		panelDetailCreature = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panelDetailCreature.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbcpanelDetailCreature = new GridBagConstraints();
		gbcpanelDetailCreature.gridwidth = 3;
		gbcpanelDetailCreature.insets = new Insets(0, 0, 5, 5);
		gbcpanelDetailCreature.fill = GridBagConstraints.BOTH;
		gbcpanelDetailCreature.gridx = 1;
		gbcpanelDetailCreature.gridy = 2;
		add(panelDetailCreature, gbcpanelDetailCreature);
		panelDetailCreature.add(loyaltyJTextField);
		panelDetailCreature.add(powerLabel);
		panelDetailCreature.add(powerJTextField);
		panelDetailCreature.add(toughnessLabel);
		panelDetailCreature.add(toughnessJTextField);

		lblnumberInSet = new JLabel("/");
		GridBagConstraints gbclblnumberInSet = new GridBagConstraints();
		gbclblnumberInSet.gridwidth = 2;
		gbclblnumberInSet.insets = new Insets(0, 0, 5, 5);
		gbclblnumberInSet.gridx = 5;
		gbclblnumberInSet.gridy = 2;
		add(lblnumberInSet, gbclblnumberInSet);

		lblLayout = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_LAYOUT") + " :");
		GridBagConstraints gbclblLayout = new GridBagConstraints();
		gbclblLayout.insets = new Insets(0, 0, 5, 5);
		gbclblLayout.gridx = 0;
		gbclblLayout.gridy = 3;
		add(lblLayout, gbclblLayout);

		txtLayoutField = new JTextField();

		GridBagConstraints gbctxtLayoutField = new GridBagConstraints();
		gbctxtLayoutField.insets = new Insets(0, 0, 5, 5);
		gbctxtLayoutField.fill = GridBagConstraints.HORIZONTAL;
		gbctxtLayoutField.gridx = 1;
		gbctxtLayoutField.gridy = 3;
		add(txtLayoutField, gbctxtLayoutField);
		txtLayoutField.setColumns(10);
		GridBagConstraints gbclstFormats = new GridBagConstraints();
		gbclstFormats.gridwidth = 3;
		gbclstFormats.insets = new Insets(0, 0, 5, 5);
		gbclstFormats.fill = GridBagConstraints.HORIZONTAL;
		gbclstFormats.gridx = 4;
		gbclstFormats.gridy = 3;

		chckbxReserved = new JCheckBox("(R)");
		GridBagConstraints gbcchckbxReserved = new GridBagConstraints();
		gbcchckbxReserved.insets = new Insets(0, 0, 5, 5);
		gbcchckbxReserved.gridx = 2;
		gbcchckbxReserved.gridy = 3;
		add(chckbxReserved, gbcchckbxReserved);

		rarityJTextField = new JTextField();
		GridBagConstraints gbcrarityJTextField = new GridBagConstraints();
		gbcrarityJTextField.gridwidth = 3;
		gbcrarityJTextField.insets = new Insets(0, 0, 5, 5);
		gbcrarityJTextField.fill = GridBagConstraints.HORIZONTAL;
		gbcrarityJTextField.gridx = 3;
		gbcrarityJTextField.gridy = 3;
		add(rarityJTextField, gbcrarityJTextField);
		rarityJTextField.setColumns(10);

		lstFormats = new JList<>(new DefaultListModel<MagicFormat>());
		lstFormats.setCellRenderer(new ListCellRenderer<MagicFormat>() {

			@Override
			public Component getListCellRendererComponent(JList<? extends MagicFormat> list, MagicFormat obj, int arg2,boolean arg3, boolean arg4) {
				JLabel l = new JLabel(obj.getFormat());
					if(obj.isLegal())
						l.setIcon(MTGConstants.ICON_SMALL_CHECK);
					else
						l.setIcon(MTGConstants.ICON_SMALL_DELETE);

				return l;
			}
		});

		GridBagConstraints gbcscrollLegality = new GridBagConstraints();
		gbcscrollLegality.gridheight = 2;
		gbcscrollLegality.gridwidth = 2;
		gbcscrollLegality.insets = new Insets(0, 0, 5, 5);
		gbcscrollLegality.fill = GridBagConstraints.BOTH;
		gbcscrollLegality.gridx = 1;
		gbcscrollLegality.gridy = 8;
		add(new JScrollPane(lstFormats), gbcscrollLegality);

		JLabel textLabel = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_TEXT") + " :");
		GridBagConstraints labelgbc8 = new GridBagConstraints();
		labelgbc8.gridheight = 2;
		labelgbc8.insets = new Insets(5, 5, 5, 5);
		labelgbc8.gridx = 0;
		labelgbc8.gridy = 4;
		add(textLabel, labelgbc8);

		txtTextPane = new MagicTextPane();
		txtTextPane.setBorder(new LineBorder(Color.GRAY));
		txtTextPane.setBackground(Color.WHITE);

		GridBagConstraints gbctxtTextPane = new GridBagConstraints();
		gbctxtTextPane.gridwidth = 6;
		gbctxtTextPane.gridheight = 2;
		gbctxtTextPane.insets = new Insets(5, 0, 5, 5);
		gbctxtTextPane.fill = GridBagConstraints.BOTH;
		gbctxtTextPane.gridx = 1;
		gbctxtTextPane.gridy = 4;
		add(txtTextPane, gbctxtTextPane);

		lblFlavor = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_FLAVOR") + " :");
		GridBagConstraints gbclblFlavor = new GridBagConstraints();
		gbclblFlavor.insets = new Insets(0, 0, 5, 5);
		gbclblFlavor.gridx = 0;
		gbclblFlavor.gridy = 6;
		add(lblFlavor, gbclblFlavor);

		txtFlavorArea = new JTextPane();
		GridBagConstraints gbctxtFlavorArea = new GridBagConstraints();
		gbctxtFlavorArea.gridwidth = 6;
		gbctxtFlavorArea.insets = new Insets(0, 0, 5, 5);
		gbctxtFlavorArea.fill = GridBagConstraints.BOTH;
		gbctxtFlavorArea.gridx = 1;
		gbctxtFlavorArea.gridy = 6;
		add(txtFlavorArea, gbctxtFlavorArea);

		lblArtist = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_ARTIST") + " :");
		GridBagConstraints gbclblArtist = new GridBagConstraints();
		gbclblArtist.insets = new Insets(0, 0, 5, 5);
		gbclblArtist.gridx = 0;
		gbclblArtist.gridy = 7;
		add(lblArtist, gbclblArtist);

		txtArtist = new JTextField();
		GridBagConstraints gbctxtArtist = new GridBagConstraints();
		gbctxtArtist.insets = new Insets(0, 0, 5, 5);
		gbctxtArtist.fill = GridBagConstraints.HORIZONTAL;
		gbctxtArtist.gridx = 1;
		gbctxtArtist.gridy = 7;
		add(txtArtist, gbctxtArtist);
		txtArtist.setColumns(10);

		lblWatermark = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_WATERMARK") + " :");
		GridBagConstraints gbclblWatermark = new GridBagConstraints();
		gbclblWatermark.anchor = GridBagConstraints.EAST;
		gbclblWatermark.insets = new Insets(0, 0, 5, 5);
		gbclblWatermark.gridx = 2;
		gbclblWatermark.gridy = 7;
		add(lblWatermark, gbclblWatermark);

		txtWatermark = new JTextField();

		GridBagConstraints gbctxtWatermark = new GridBagConstraints();
		gbctxtWatermark.gridwidth = 3;
		gbctxtWatermark.insets = new Insets(0, 0, 5, 5);
		gbctxtWatermark.fill = GridBagConstraints.HORIZONTAL;
		gbctxtWatermark.gridx = 4;
		gbctxtWatermark.gridy = 7;
		add(txtWatermark, gbctxtWatermark);
		txtWatermark.setColumns(10);

		lblLegal = new JLabel(MTGControler.getInstance().getLangService().getCapitalize("CARD_LEGALITIES") + " :");
		GridBagConstraints gbclblLegal = new GridBagConstraints();
		gbclblLegal.insets = new Insets(0, 0, 5, 5);
		gbclblLegal.gridx = 0;
		gbclblLegal.gridy = 8;
		add(lblLegal, gbclblLegal);

		GridBagConstraints gbcscrollCollections = new GridBagConstraints();
		gbcscrollCollections.gridheight = 2;
		gbcscrollCollections.gridwidth = 3;
		gbcscrollCollections.insets = new Insets(0, 0, 5, 5);
		gbcscrollCollections.fill = GridBagConstraints.BOTH;
		gbcscrollCollections.gridx = 4;
		gbcscrollCollections.gridy = 8;
		listModelCollection = new DefaultListModel<>();
		listCollection = new JList<>(listModelCollection);
		add(new JScrollPane(listCollection), gbcscrollCollections);

		panelSwitchLangage = new JPanel();
		FlowLayout flowLayout1 = (FlowLayout) panelSwitchLangage.getLayout();
		flowLayout1.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbcpanelSwitchLangage = new GridBagConstraints();
		gbcpanelSwitchLangage.gridwidth = 9;
		gbcpanelSwitchLangage.insets = new Insets(0, 0, 0, 5);
		gbcpanelSwitchLangage.fill = GridBagConstraints.BOTH;
		gbcpanelSwitchLangage.gridx = 0;
		gbcpanelSwitchLangage.gridy = 10;
		add(panelSwitchLangage, gbcpanelSwitchLangage);

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

		setEditable(false);

	}

Replace Anonymous With Lambda org.magic.gui.components.MagicCardDetailPanel.MagicCardDetailPanel.setCellRenderer.new ListCellRenderer<MagicFormat> with (list, obj, arg2, arg3, arg4) -> {JLabel l=new JLabel(obj.getFormat()); in method public MagicCardDetailPanel() from class org.magic.gui.components.MagicCardDetailPanel


	private <T extends MTGPlugin> void createTab(String label, Icon ic, boolean multi,List<T> list)
	{
		JXTreeTable table = new JXTreeTable(new PluginTreeTableModel<T>(multi, list));
		table.setShowGrid(true, false);
		table.setTreeCellRenderer(new MTGPluginTreeCellRenderer());
		table.setDefaultRenderer(Boolean.class, (JTable table2, Object value, boolean isSelected,boolean hasFocus, int row, int column)->{
				JPanel p = new JPanel();
				JCheckBox cbox = new JCheckBox("",Boolean.parseBoolean(value.toString()));
				cbox.setOpaque(false);
				p.add(cbox);

				if(isSelected)
					p.setBackground(table.getSelectionBackground());
				else
					p.setBackground(table.getBackground());

				return p;
		});

		subTabbedProviders.addTab(label, ic,new JScrollPane(table), null);
		table.addTreeSelectionListener(e -> {
			if (e.getNewLeadSelectionPath() != null && e.getNewLeadSelectionPath().getPathCount() > 1)
				((PluginTreeTableModel<?>) table.getTreeTableModel()).setSelectedNode((T) e.getNewLeadSelectionPath().getPathComponent(1));
		});
		table.packAll();

	}

	private <T extends MTGPlugin> void createTab(String label, Icon ic, boolean multi,List<T> list)
	{
		JXTreeTable table = new JXTreeTable(new PluginTreeTableModel<T>(multi, list));
		table.setShowGrid(true, false);
		table.setTreeCellRenderer(new MTGPluginTreeCellRenderer());
		table.setDefaultRenderer(Boolean.class, new DefaultTableCellRenderer() {
			private static final long serialVersionUID = 1L;
			@Override
			public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,boolean hasFocus, int row, int column) {
				JPanel p = new JPanel();
				JCheckBox cbox = new JCheckBox("",Boolean.parseBoolean(value.toString()));
				cbox.setOpaque(false);
				p.add(cbox);

				if(isSelected)
					p.setBackground(table.getSelectionBackground());
				else
					p.setBackground(table.getBackground());

				return p;

			}

		});
		subTabbedProviders.addTab(label, ic,new JScrollPane(table), null);
		table.addTreeSelectionListener(e -> {
			if (e.getNewLeadSelectionPath() != null && e.getNewLeadSelectionPath().getPathCount() > 1)
				((PluginTreeTableModel<?>) table.getTreeTableModel()).setSelectedNode((T) e.getNewLeadSelectionPath().getPathComponent(1));
		});
		table.packAll();

	}

Replace Anonymous With Lambda org.magic.gui.ConfigurationPanelGUI.createTab.setDefaultRenderer.new DefaultTableCellRenderer with (table2, value, isSelected, hasFocus, row, column) -> {JPanel p=new JPanel(); in method private createTab(label String, ic Icon, multi boolean, list List<T>) : void from class org.magic.gui.ConfigurationPanelGUI


	public JDeckChooserDialog() {
		setTitle(MTGControler.getInstance().getLangService().getCapitalize("OPEN_DECK"));
		setIconImage(MTGConstants.ICON_DECK.getImage());
		setSize(828, 500);

		model = new DefaultTreeModel(root);
		manager = new MTGDeckManager();
		DeckSelectionTableModel decksModel = new DeckSelectionTableModel();
		manager.addObserver((o,d)->decksModel.addItem((MagicDeck)d));

		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosed(WindowEvent e) {
				selectedDeck = null;
			}

			@Override
			public void windowClosing(WindowEvent e) {
				selectedDeck = null;
			}
		});

		ThreadManager.getInstance().execute(()->manager.listDecks(), "Loading Decks");

		table = new JXTable(decksModel);
		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		table.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent event) {
				selectedDeck = (MagicDeck) UITools.getTableSelection(table, 0).get(0);
				initTree();
				tagsPanel.clean();
				tagsPanel.addTags(selectedDeck.getTags());
				cmcChartPanel.init(selectedDeck);
				cmcChartPanel.revalidate();
				cmcChartPanel.repaint();

				if (event.getClickCount() == 2) {
					dispose();
				}

			}

		});

		getContentPane().add(new JScrollPane(table), BorderLayout.CENTER);

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

		JButton btnSelect = new JButton(MTGConstants.ICON_OPEN);
		btnSelect.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("OPEN"));
		btnSelect.addActionListener(e -> {
			if (selectedDeck == null)
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),new NullPointerException(MTGControler.getInstance().getLangService().getCapitalize("CHOOSE_DECK"))));
			else
				dispose();
		});
		panelBas.add(btnSelect);

		JButton btnCancel = new JButton(MTGConstants.ICON_CANCEL);
		btnCancel.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("CANCEL"));
		btnCancel.addActionListener(e -> {
			selectedDeck = null;
			dispose();
		});

		panelBas.add(btnCancel);

		JButton btnDelete = new JButton(MTGConstants.ICON_DELETE);
		btnDelete.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("DELETE"));
		btnDelete.addActionListener(e -> {

			int res = JOptionPane.showConfirmDialog(null,
					MTGControler.getInstance().getLangService().getCapitalize("CONFIRM_DELETE", selectedDeck.getName()),
					MTGControler.getInstance().getLangService().getCapitalize("CONFIRMATION") + " ?",
					JOptionPane.YES_NO_OPTION);

			if (res == JOptionPane.YES_OPTION) {
				try {
					manager.remove(selectedDeck);
					((DeckSelectionTableModel) table.getModel()).removeItem(selectedDeck);
				} catch (IOException e1) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e1));
				}
			}
		});

		panelBas.add(btnDelete);

		JSplitPane panelRight = new JSplitPane();
		panelRight.setOrientation(JSplitPane.VERTICAL_SPLIT);
		getContentPane().add(panelRight, BorderLayout.EAST);

		cmcChartPanel = new CmcChartPanel();
		cmcChartPanel.setPreferredSize(new Dimension(250, 150));
		panelRight.setBottomComponent(cmcChartPanel);
		root = new DefaultMutableTreeNode("Cards");
		// add the child nodes to the root node
		root.add(creatureNode);
		root.add(artifactsNode);
		root.add(planeswalkerNode);
		root.add(landsNode);
		root.add(spellsNode);
		root.add(sideNode);
		model = new DefaultTreeModel(root);

		panelRight.setDividerLocation(300);

		JPanel panelTree = new JPanel();
		panelTree.setLayout(new BorderLayout(0, 0));
		panelRight.setTopComponent(panelTree);
		tree = new JTree();
		tree.setModel(model);

		JScrollPane scrollPane1 = new JScrollPane();
		panelTree.add(scrollPane1);
		scrollPane1.setViewportView(tree);

		tagsPanel = new JTagsPanel();
		tagsPanel.setFontSize(11);
		tagsPanel.setColors(Color.DARK_GRAY, Color.WHITE);
		tagsPanel.setEditable(false);
		panelTree.add(tagsPanel, BorderLayout.SOUTH);

		table.getColumnModel().getColumn(1).setCellRenderer(new ManaCellRenderer());
		table.packAll();
		setLocationRelativeTo(null);
		setModal(true);
	}

	public JDeckChooserDialog() {
		setTitle(MTGControler.getInstance().getLangService().getCapitalize("OPEN_DECK"));
		setIconImage(MTGConstants.ICON_DECK.getImage());
		setSize(828, 500);

		model = new DefaultTreeModel(root);
		manager = new MTGDeckManager();
		DeckSelectionTableModel decksModel = new DeckSelectionTableModel();
		manager.addObserver(new Observer() {

			@Override
			public void update(Observable o, Object d) {
				decksModel.addItem((MagicDeck)d);
			}
		});

		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosed(WindowEvent e) {
				selectedDeck = null;
			}

			@Override
			public void windowClosing(WindowEvent e) {
				selectedDeck = null;
			}
		});

		ThreadManager.getInstance().execute(()->manager.listDecks(), "Loading Decks");

		table = new JXTable(decksModel);
		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		table.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent event) {
				selectedDeck = (MagicDeck) UITools.getTableSelection(table, 0).get(0);
				initTree();
				tagsPanel.clean();
				tagsPanel.addTags(selectedDeck.getTags());
				cmcChartPanel.init(selectedDeck);
				cmcChartPanel.revalidate();
				cmcChartPanel.repaint();

				if (event.getClickCount() == 2) {
					dispose();
				}

			}

		});

		getContentPane().add(new JScrollPane(table), BorderLayout.CENTER);

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

		JButton btnSelect = new JButton(MTGConstants.ICON_OPEN);
		btnSelect.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("OPEN"));
		btnSelect.addActionListener(e -> {
			if (selectedDeck == null)
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),new NullPointerException(MTGControler.getInstance().getLangService().getCapitalize("CHOOSE_DECK"))));
			else
				dispose();
		});
		panelBas.add(btnSelect);

		JButton btnCancel = new JButton(MTGConstants.ICON_CANCEL);
		btnCancel.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("CANCEL"));
		btnCancel.addActionListener(e -> {
			selectedDeck = null;
			dispose();
		});

		panelBas.add(btnCancel);

		JButton btnDelete = new JButton(MTGConstants.ICON_DELETE);
		btnDelete.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("DELETE"));
		btnDelete.addActionListener(e -> {

			int res = JOptionPane.showConfirmDialog(null,
					MTGControler.getInstance().getLangService().getCapitalize("CONFIRM_DELETE", selectedDeck.getName()),
					MTGControler.getInstance().getLangService().getCapitalize("CONFIRMATION") + " ?",
					JOptionPane.YES_NO_OPTION);

			if (res == JOptionPane.YES_OPTION) {
				try {
					manager.remove(selectedDeck);
					((DeckSelectionTableModel) table.getModel()).removeItem(selectedDeck);
				} catch (IOException e1) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e1));
				}
			}
		});

		panelBas.add(btnDelete);

		JSplitPane panelRight = new JSplitPane();
		panelRight.setOrientation(JSplitPane.VERTICAL_SPLIT);
		getContentPane().add(panelRight, BorderLayout.EAST);

		cmcChartPanel = new CmcChartPanel();
		cmcChartPanel.setPreferredSize(new Dimension(250, 150));
		panelRight.setBottomComponent(cmcChartPanel);
		root = new DefaultMutableTreeNode("Cards");
		// add the child nodes to the root node
		root.add(creatureNode);
		root.add(artifactsNode);
		root.add(planeswalkerNode);
		root.add(landsNode);
		root.add(spellsNode);
		root.add(sideNode);
		model = new DefaultTreeModel(root);

		panelRight.setDividerLocation(300);

		JPanel panelTree = new JPanel();
		panelTree.setLayout(new BorderLayout(0, 0));
		panelRight.setTopComponent(panelTree);
		tree = new JTree();
		tree.setModel(model);

		JScrollPane scrollPane1 = new JScrollPane();
		panelTree.add(scrollPane1);
		scrollPane1.setViewportView(tree);

		tagsPanel = new JTagsPanel();
		tagsPanel.setFontSize(11);
		tagsPanel.setColors(Color.DARK_GRAY, Color.WHITE);
		tagsPanel.setEditable(false);
		panelTree.add(tagsPanel, BorderLayout.SOUTH);

		table.getColumnModel().getColumn(1).setCellRenderer(new ManaCellRenderer());
		table.packAll();
		setLocationRelativeTo(null);
		setModal(true);
	}

Replace Anonymous With Lambda org.magic.gui.components.dialog.JDeckChooserDialog.JDeckChooserDialog.addObserver.new Observer with (o, d) -> decksModel.addItem((MagicDeck)d) in method public JDeckChooserDialog() from class org.magic.gui.components.dialog.JDeckChooserDialog


	public static <T> JComboBox<T> createCombobox(List<T> items)
	{
		DefaultComboBoxModel<T> model = new DefaultComboBoxModel<>();
		JComboBox<T> combo = new JComboBox<>(model);
			items.stream().forEach(model::addElement);

			combo.setRenderer((list,value, index,isSelected,cellHasFocus)->{
					JLabel l ;
					if(value==null)
					{
						l= new JLabel();
					}
					else
					{
						l=new JLabel(value.toString());
						if(value instanceof LookAndFeelInfo)
						{
							l=new JLabel(((LookAndFeelInfo)value).getName());
						}
						l.setIcon(MTGConstants.ICON_MANA_INCOLOR);
					}

					l.setOpaque(true);
					if (isSelected) {
						l.setBackground(list.getSelectionBackground());
						l.setForeground(list.getSelectionForeground());
					} else {
						l.setBackground(list.getBackground());
						l.setForeground(list.getForeground());
					}

					return l;
			});

		return combo;
	}

	public static <T> JComboBox<T> createCombobox(List<T> items)
	{
		DefaultComboBoxModel<T> model = new DefaultComboBoxModel<>();
		JComboBox<T> combo = new JComboBox<>(model);
			items.stream().forEach(model::addElement);

			combo.setRenderer(new ListCellRenderer<T>() {
				@Override
				public Component getListCellRendererComponent(JList<? extends T> list, T value, int index,boolean isSelected, boolean cellHasFocus) {
					JLabel l ;
					if(value==null)
					{
						l= new JLabel();
					}
					else
					{
						l=new JLabel(value.toString());
						if(value instanceof LookAndFeelInfo)
						{
							l=new JLabel(((LookAndFeelInfo)value).getName());
						}
						l.setIcon(MTGConstants.ICON_MANA_INCOLOR);
					}

					l.setOpaque(true);
					if (isSelected) {
						l.setBackground(list.getSelectionBackground());
						l.setForeground(list.getSelectionForeground());
					} else {
						l.setBackground(list.getBackground());
						l.setForeground(list.getForeground());
					}

					return l;
				}
			});

		return combo;
	}

Replace Anonymous With Lambda org.magic.tools.UITools.createCombobox.setRenderer.new ListCellRenderer<T> with (list, value, index, isSelected, cellHasFocus) -> {JLabel l; in method public createCombobox(items List<T>) : JComboBox<T> from class org.magic.tools.UITools


	public StackPanel() {
		model = new DefaultListModel<>();

		timer = new Timer(1000,e->{
				startTime=startTime-1;
				lblCounter.setText(String.valueOf(startTime));

				if(startTime==0)
				{
					timer.stop();
					if(model.size()>0)
					{
						lblCounter.setText("RESOLVING " + model.size() + " spell(s)");
						GameManager.getInstance().getStack().unstack();

					}
					else
					{
						startTime=SECONDE;
					}
				}

		});

		lblCounter = new JLabel(String.valueOf(startTime));
		JPanel panel = new JPanel();
		listStack = new JList<>(model);

		setLayout(new BorderLayout(0, 0));
		listStack.setCellRenderer(new StackItemRenderer());

		add(new JScrollPane(listStack ), BorderLayout.CENTER);
		add(panel, BorderLayout.NORTH);
		panel.add(lblCounter);

		btnPause = new JButton(PAUSE);

		btnPause.addActionListener(ae->{

				if(timer.isRunning())
				{
					timer.stop();
					btnPause.setText(START);
				}
				else
				{
					timer.start();
					btnPause.setText(PAUSE);
				}
		});
		panel.add(btnPause);
	}

	public StackPanel() {
		model = new DefaultListModel<>();

		timer = new Timer(1000,new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				startTime=startTime-1;
				lblCounter.setText(String.valueOf(startTime));

				if(startTime==0)
				{
					timer.stop();
					if(model.size()>0)
					{
						lblCounter.setText("RESOLVING " + model.size() + " spell(s)");
						GameManager.getInstance().getStack().unstack();

					}
					else
					{
						startTime=SECONDE;
					}
				}
			}
		});

		lblCounter = new JLabel(String.valueOf(startTime));
		JPanel panel = new JPanel();
		listStack = new JList<>(model);

		setLayout(new BorderLayout(0, 0));
		listStack.setCellRenderer(new StackItemRenderer());

		add(new JScrollPane(listStack ), BorderLayout.CENTER);
		add(panel, BorderLayout.NORTH);
		panel.add(lblCounter);

		btnPause = new JButton("Pause");

		btnPause.addActionListener(ae->{

				if(timer.isRunning())
				{
					timer.stop();
					btnPause.setText("Start");
				}
				else
				{
					timer.start();
					btnPause.setText("Pause");
				}
		});
		panel.add(btnPause);
	}

Replace Anonymous With Lambda org.magic.game.gui.components.StackPanel.StackPanel.new Timer.new ActionListener with e -> {startTime=startTime - 1; in method public StackPanel() from class org.magic.game.gui.components.StackPanel


	public void initGUI() throws IOException, SQLException, ClassNotFoundException {
		logger.info("init collection GUI");

		MagicEditionsTableModel model;
		JProgressBar progressBar;
		JTabbedPane tabbedPane;
		TypeRepartitionPanel typeRepartitionPanel;
		ManaRepartitionPanel manaRepartitionPanel;
		RarityRepartitionPanel rarityRepartitionPanel;
		MagicCardDetailPanel magicCardDetailPanel;
		CardStockPanel statsPanel;
		JLabel lblTotal;

		//////// INIT COMPONENTS
		JPanel panneauHaut = new JPanel();
		JButton btnAdd = new JButton(MTGConstants.ICON_NEW);
		JButton btnRefresh = new JButton(MTGConstants.ICON_REFRESH);
		JButton btnRemove = new JButton(MTGConstants.ICON_DELETE);
		JButton btnAddAllSet = new JButton(MTGConstants.ICON_CHECK);
		JButton btnExport = new JButton(MTGConstants.ICON_EXPORT);
		JButton btnMassCollection = new JButton(MTGConstants.ICON_MASS_IMPORT);
		JButton btnGenerateWebSite = new JButton(MTGConstants.ICON_WEBSITE);
		JScrollPane scrollPaneCollections = new JScrollPane();
		JSplitPane splitListPanel = new JSplitPane();
		JSplitPane splitPane = new JSplitPane();
		JPanel panneauGauche = new JPanel();
		JScrollPane scrollPane = new JScrollPane();
		JPanel panelTotal = new JPanel();
		JPanel panneauDroite = new JPanel();
		MagicCollectionTableCellRenderer render = new MagicCollectionTableCellRenderer();

		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		progressBar = new JProgressBar();
		lblTotal = new JLabel();
		magicEditionDetailPanel = new MagicEditionDetailPanel(true, false);
		magicCardDetailPanel = new MagicCardDetailPanel();
		typeRepartitionPanel = new TypeRepartitionPanel();
		manaRepartitionPanel = new ManaRepartitionPanel();
		rarityRepartitionPanel = new RarityRepartitionPanel();
		statsPanel = new CardStockPanel();
		historyPricesPanel = new HistoryPricesPanel();
		jsonPanel = new JSONPanel();
		tree = new LazyLoadingTree();
		tableEditions = new JXTable();
		PricesTablePanel pricePanel = new PricesTablePanel();

		//////// MODELS
		model = new MagicEditionsTableModel();
		DefaultRowSorter<DefaultTableModel, Integer> sorterEditions = new TableRowSorter<>(model);
		model.init(provider.loadEditions());
		tableEditions.setModel(model);
		new TableFilterHeader(tableEditions, AutoChoices.ENABLED);

		///////// CONFIGURE COMPONENTS
		splitListPanel.setDividerLocation(0.5);
		splitListPanel.setResizeWeight(0.5);

		progressBar.setVisible(false);
		btnRemove.setEnabled(true);
		btnExport.setEnabled(false);

		splitPane.setResizeWeight(0.5);
		splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
		scrollPaneCollections.setMinimumSize(new Dimension(0, 0));
		tree.setCellRenderer(new MagicCardsTreeCellRenderer());

		magicCardDetailPanel.setPreferredSize(new Dimension(0, 0));
		magicCardDetailPanel.enableThumbnail(true);

		tableEditions.setDefaultRenderer(Object.class, render);
		tableEditions.setDefaultRenderer(String.class, render);
		tableEditions.setDefaultRenderer(Integer.class, render);
		tableEditions.setDefaultRenderer(double.class, render);
		tableEditions.setRowHeight(25);
		tableEditions.setRowSorter(sorterEditions);

		addComponentListener(new ComponentAdapter() {
			@Override
			public void componentShown(ComponentEvent componentEvent) {
				splitListPanel.setDividerLocation(.45);
				splitPane.setDividerLocation(.5);
				removeComponentListener(this);
			}

		});

		///////// LAYOUT
		setLayout(new BorderLayout(0, 0));
		panneauDroite.setLayout(new BorderLayout());
		panneauGauche.setLayout(new BorderLayout(0, 0));

		///////// ADD PANELS
		add(panneauHaut, BorderLayout.NORTH);
		panneauHaut.add(btnAdd);
		panneauHaut.add(btnRefresh);
		panneauHaut.add(btnRemove);
		panneauHaut.add(btnAddAllSet);
		panneauHaut.add(btnMassCollection);
		panneauHaut.add(btnExport);
		panneauHaut.add(btnGenerateWebSite);
		panneauHaut.add(progressBar);
		add(splitListPanel, BorderLayout.CENTER);
		splitListPanel.setRightComponent(panneauDroite);
		panneauDroite.add(splitPane, BorderLayout.CENTER);
		splitPane.setLeftComponent(scrollPaneCollections);
		scrollPaneCollections.setViewportView(tree);
		splitPane.setRightComponent(tabbedPane);
		splitListPanel.setLeftComponent(panneauGauche);
		panneauGauche.add(scrollPane);
		scrollPane.setViewportView(tableEditions);
		panneauGauche.add(panelTotal, BorderLayout.SOUTH);
		panelTotal.add(lblTotal);

		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DETAILS"), MTGConstants.ICON_TAB_DETAILS,magicCardDetailPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_EDITIONS"),  MTGConstants.ICON_BACK,magicEditionDetailPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PRICES"), MTGConstants.ICON_TAB_PRICES, pricePanel,null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_TYPES"), MTGConstants.ICON_TAB_TYPE,typeRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_MANA"), MTGConstants.ICON_TAB_MANA,manaRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_RARITY"), MTGConstants.ICON_TAB_RARITY,rarityRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("STOCK_MODULE"), MTGConstants.ICON_TAB_STOCK, statsPanel,null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PRICE_VARIATIONS"), MTGConstants.ICON_TAB_VARIATIONS,historyPricesPanel, null);

		if (MTGControler.getInstance().get("debug-json-panel").equalsIgnoreCase("true"))
			tabbedPane.addTab("Json", MTGConstants.ICON_TAB_JSON, jsonPanel, null);

		///////// Labels
		lblTotal.setText("Total : " + model.getCountDefaultLibrary() + "/" + model.getCountTotal());
		btnAdd.setToolTipText(MTGControler.getInstance().getLangService().get("COLLECTION_ADD"));
		btnRefresh.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_REFRESH"));
		btnRemove.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("ITEM_SELECTED_REMOVE"));
		btnAddAllSet.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_SET_FULL"));
		btnExport.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("EXPORT_AS"));
		btnMassCollection.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_IMPORT"));
		btnGenerateWebSite.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("GENERATE_WEBSITE"));

		List<SortKey> keys = new ArrayList<>();
		SortKey sortKey = new SortKey(3, SortOrder.DESCENDING);// column index 2
		keys.add(sortKey);
		sorterEditions.setSortKeys(keys);

		tableEditions.packAll();

		initPopupCollection();

		tableEditions.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				int row = tableEditions.getSelectedRow();
				MagicEdition ed = (MagicEdition) tableEditions.getValueAt(row, 1);
				magicEditionDetailPanel.setMagicEdition(ed);
				historyPricesPanel.init(null, ed, ed.getSet());
				jsonPanel.show(ed);
			}
		});

		btnAdd.addActionListener(e -> {
			String name = JOptionPane
					.showInputDialog(MTGControler.getInstance().getLangService().getCapitalize("NAME") + " ?");
			MagicCollection collectionAdd = new MagicCollection();
			collectionAdd.setName(name);
			try {
				dao.saveCollection(collectionAdd);
				((LazyLoadingTree.MyNode) getJTree().getModel().getRoot())
						.add(new DefaultMutableTreeNode(collectionAdd));
				getJTree().refresh();
				initPopupCollection();
			} catch (Exception ex) {
				logger.error(ex);
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),ex));
			}
		});

		btnRefresh.addActionListener(e ->

		ThreadManager.getInstance().execute(() -> {
			progressBar.setVisible(true);
			tree.refresh();
			try {
				model.calculate();
				lblTotal.setText("Total : " + model.getCountDefaultLibrary() + "/" + model.getCountTotal());
			} catch (Exception ex) {
				logger.error(ex);
			}
			model.fireTableDataChanged();
			progressBar.setVisible(false);
		}, "update Tree"));

		btnExport.addActionListener(ae -> {
			JPopupMenu menu = new JPopupMenu();

			for (final MTGCardsExport exp : MTGControler.getInstance().getEnabledDeckExports())
			{
				if (exp.getMods() == MODS.BOTH || exp.getMods() == MODS.EXPORT) {
					JMenuItem it = new JMenuItem();
					it.setIcon(exp.getIcon());
					it.setText(exp.getName());
					it.addActionListener(al -> ThreadManager.getInstance().execute(() -> {
						try {

							DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();
							JFileChooser jf = new JFileChooser();

							MagicCollection mc = null;
							MagicEdition ed = null;

							if (curr.getUserObject() instanceof MagicEdition) {
								ed = (MagicEdition) curr.getUserObject();
								mc = (MagicCollection) ((DefaultMutableTreeNode) curr.getParent()).getUserObject();
							} else {
								mc = (MagicCollection) curr.getUserObject();
							}

							jf.setSelectedFile(new File(mc.getName() + exp.getFileExtension()));
							int result = jf.showSaveDialog(null);
							File f = jf.getSelectedFile();

							exp.addObserver((Observable o, Object arg) -> progressBar.setValue((int) arg));

							if (result == JFileChooser.APPROVE_OPTION) {
								progressBar.setVisible(true);
								if (ed == null)
									exp.export(dao.listCardsFromCollection(mc), f);
								else
									exp.export(dao.listCardsFromCollection(mc, ed), f);

								progressBar.setVisible(false);

								MTGControler.getInstance().notify(new MTGNotification(
										MTGControler.getInstance().getLangService().getCapitalize("FINISHED"),
										MTGControler.getInstance().getLangService().combine("EXPORT", "FINISHED"),
										MESSAGE_TYPE.INFO
										));
							}

						} catch (Exception e) {
							logger.error("error in export",e);
							progressBar.setVisible(false);
							MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
						}
					}, "export collection with " + exp));

					menu.add(it);
				}

			}

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

		});

		splitPane.addComponentListener(new ComponentAdapter() {

			@Override
			public void componentShown(ComponentEvent componentEvent) {
				splitPane.setDividerLocation(.5);
				removeComponentListener(this);
			}
		});

		tree.addTreeSelectionListener(tse -> {
			path = tse.getPath();

			final DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();

			if (curr.getUserObject() instanceof String) {
				btnExport.setEnabled(false);
				statsPanel.enabledAdd(false);
			}

			if (curr.getUserObject() instanceof MagicCollection) {
				btnExport.setEnabled(true);
				selectedcol = (MagicCollection) curr.getUserObject();
				statsPanel.enabledAdd(false);
				btnExport.setEnabled(true);
				ThreadManager.getInstance().execute(() -> {
					try {

						List<MagicCard> list = dao.listCardsFromCollection(selectedcol);
						rarityRepartitionPanel.init(list);
						typeRepartitionPanel.init(list);
						manaRepartitionPanel.init(list);
						jsonPanel.show(curr.getUserObject());

					} catch (Exception e) {
						logger.error("error",e);
					}
				}, "Calculate Collection cards");

			}

			if (curr.getUserObject() instanceof MagicEdition) {
				magicEditionDetailPanel.setMagicEdition((MagicEdition) curr.getUserObject());
				btnExport.setEnabled(true);
				statsPanel.enabledAdd(false);
				ThreadManager.getInstance().execute(() -> {
					try {

						MagicCollection collec = (MagicCollection) ((DefaultMutableTreeNode) curr.getParent()).getUserObject();
						List<MagicCard> list = dao.listCardsFromCollection(collec, (MagicEdition) curr.getUserObject());
						rarityRepartitionPanel.init(list);
						typeRepartitionPanel.init(list);
						manaRepartitionPanel.init(list);
						historyPricesPanel.init(null, (MagicEdition) curr.getUserObject(),curr.getUserObject().toString());
						jsonPanel.show(curr.getUserObject());

					} catch (Exception e) {
						logger.error(e);
					}
				}, "Calculate Editions cards");
			}

			if (curr.getUserObject() instanceof MagicCard) {
				final MagicCard card = (MagicCard) ((DefaultMutableTreeNode) path.getLastPathComponent())
						.getUserObject();
				btnExport.setEnabled(false);
				magicCardDetailPanel.setMagicCard((MagicCard) curr.getUserObject());
				magicEditionDetailPanel.setMagicEdition(card.getCurrentSet());
				magicCardDetailPanel.enableThumbnail(true);
				jsonPanel.show(curr.getUserObject());

				ThreadManager.getInstance().execute(() -> {
					statsPanel.initMagicCardStock(card,
							(MagicCollection) ((DefaultMutableTreeNode) curr.getParent().getParent()).getUserObject());
					statsPanel.enabledAdd(true);
				}, "Update Collection");

				pricePanel.init(card,null);

				ThreadManager.getInstance().execute(() -> {
					try {
						historyPricesPanel.init(card, null, card.getName());
					} catch (Exception e) {
						logger.error("error history",e);
					}
				}, "update history");
			}

		});

		tree.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				if (SwingUtilities.isRightMouseButton(e)) {
					int row = tree.getClosestRowForLocation(e.getX(), e.getY());
					tree.setSelectionRow(row);

					final DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

					if (node.getUserObject() instanceof MagicEdition) {
						popupMenuEdition.show(e.getComponent(), e.getX(), e.getY());

					}
					if (node.getUserObject() instanceof MagicCard) {
						popupMenuCards.show(e.getComponent(), e.getX(), e.getY());
					}
					if (node.getUserObject() instanceof MagicCollection) {
						JPopupMenu p = new JPopupMenu();
						JMenuItem it = new JMenuItem("Mass movement");
						p.add(it);

						it.addActionListener(ae -> {
							MassMoverDialog d = new MassMoverDialog((MagicCollection) node.getUserObject(), null);
							d.setVisible(true);
							logger.debug("closing mass import with change =" + d.hasChange());
						});
						p.show(e.getComponent(), e.getX(), e.getY());
					}

				}
			}
		});

		btnMassCollection.addActionListener(ae -> {
			MassCollectionImporterDialog diag = new MassCollectionImporterDialog();
			diag.setVisible(true);
			try {
				model.calculate();
			} catch (Exception e) {
				logger.error(e);
			}
			model.fireTableDataChanged();
		});

		btnGenerateWebSite.addActionListener(ae -> ThreadManager.getInstance().execute(() -> {
			try {

				WebSiteGeneratorDialog diag = new WebSiteGeneratorDialog(dao.getCollections());
				diag.setVisible(true);
				if (diag.value()) {
					progressBar.setVisible(true);
					progressBar.setStringPainted(true);
					progressBar.setMinimum(0);

					int max = 0;
					for (MagicCollection col : diag.getSelectedCollections())
						max += dao.getCardsCount(col, null);

					progressBar.setMaximum(max);
					progressBar.setValue(0);

					MagicWebSiteGenerator gen = new MagicWebSiteGenerator(diag.getTemplate(),diag.getDest().getAbsolutePath());

					gen.addObserver((Observable o, Object arg) -> progressBar.setValue((int) arg));
					gen.generate(diag.getSelectedCollections(), diag.getPriceProviders());

					int res = JOptionPane.showConfirmDialog(null,MTGControler.getInstance().getLangService().getCapitalize("WEBSITE_CONFIRMATION_VIEW"));

					if (res == JOptionPane.YES_OPTION) {
						Path p = Paths.get(diag.getDest().getAbsolutePath() + "/index.htm");
						Desktop.getDesktop().browse(p.toUri());
					}
					progressBar.setVisible(false);
				}

			} catch (Exception e) {
				logger.error("error generating website", e);
				progressBar.setVisible(false);
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
			}
		}, "btnGenerateWebSite generate website"));

		btnAddAllSet.addActionListener(evt -> {
			MagicEdition ed = (MagicEdition) tableEditions.getValueAt(tableEditions.getSelectedRow(), 1);

			int res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService().getCapitalize(
					"CONFIRM_COLLECTION_ITEM_ADDITION", ed, MTGControler.getInstance().get("default-library")));

			if (res == JOptionPane.YES_OPTION)
				try {
					List<MagicCard> list = provider.searchCardByEdition(ed);
					logger.debug("save " + list.size() + " cards from " + ed.getId());
					for (MagicCard mc : list) {
						MagicCollection col = new MagicCollection();
						col.setName(MTGControler.getInstance().get("default-library"));
						dao.saveCard(mc, col);
					}
					model.calculate();
					model.fireTableDataChanged();
				} catch (Exception e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
					logger.error(e);
				}
		});

		btnRemove.addActionListener(evt -> {

			MagicCollection col = (MagicCollection) ((DefaultMutableTreeNode) path.getPathComponent(1)).getUserObject();
			int res = 0;

			DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();
			if (curr.getUserObject() instanceof MagicCard) {
				MagicCard card = (MagicCard) ((DefaultMutableTreeNode) path.getLastPathComponent()).getUserObject();

				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_ITEM_DELETE", card, col));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeCard(card, col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}
			if (curr.getUserObject() instanceof MagicEdition) {
				MagicEdition me = (MagicEdition) ((DefaultMutableTreeNode) path.getPathComponent(2)).getUserObject();

				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_ITEM_DELETE", me, col));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeEdition(me, col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}
			if (curr.getUserObject() instanceof MagicCollection) {
				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_DELETE", col, dao.getCardsCount(col, null)));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeCollection(col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}

			if (res == JOptionPane.YES_OPTION) {
				try {
					model.calculate();
				} catch (Exception e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
				tree.refresh();

			}
		});

	}

	public void initGUI() throws IOException, SQLException, ClassNotFoundException {
		logger.info("init collection GUI");

		MagicEditionsTableModel model;
		JProgressBar progressBar;
		JTabbedPane tabbedPane;
		TypeRepartitionPanel typeRepartitionPanel;
		ManaRepartitionPanel manaRepartitionPanel;
		RarityRepartitionPanel rarityRepartitionPanel;
		MagicCardDetailPanel magicCardDetailPanel;
		CardStockPanel statsPanel;
		JLabel lblTotal;

		//////// INIT COMPONENTS
		JPanel panneauHaut = new JPanel();
		JButton btnAdd = new JButton(MTGConstants.ICON_NEW);
		JButton btnRefresh = new JButton(MTGConstants.ICON_REFRESH);
		JButton btnRemove = new JButton(MTGConstants.ICON_DELETE);
		JButton btnAddAllSet = new JButton(MTGConstants.ICON_CHECK);
		JButton btnExport = new JButton(MTGConstants.ICON_EXPORT);
		JButton btnMassCollection = new JButton(MTGConstants.ICON_MASS_IMPORT);
		JButton btnGenerateWebSite = new JButton(MTGConstants.ICON_WEBSITE);
		JScrollPane scrollPaneCollections = new JScrollPane();
		JSplitPane splitListPanel = new JSplitPane();
		JSplitPane splitPane = new JSplitPane();
		JPanel panneauGauche = new JPanel();
		JScrollPane scrollPane = new JScrollPane();
		JPanel panelTotal = new JPanel();
		JPanel panneauDroite = new JPanel();
		MagicCollectionTableCellRenderer render = new MagicCollectionTableCellRenderer();

		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		progressBar = new JProgressBar();
		lblTotal = new JLabel();
		magicEditionDetailPanel = new MagicEditionDetailPanel(true, false);
		magicCardDetailPanel = new MagicCardDetailPanel();
		typeRepartitionPanel = new TypeRepartitionPanel();
		manaRepartitionPanel = new ManaRepartitionPanel();
		rarityRepartitionPanel = new RarityRepartitionPanel();
		statsPanel = new CardStockPanel();
		historyPricesPanel = new HistoryPricesPanel();
		jsonPanel = new JSONPanel();
		tree = new LazyLoadingTree();
		tableEditions = new JXTable();
		PricesTablePanel pricePanel = new PricesTablePanel();

		//////// MODELS
		model = new MagicEditionsTableModel();
		DefaultRowSorter sorterEditions = new TableRowSorter<DefaultTableModel>(model);
		model.init(provider.loadEditions());
		tableEditions.setModel(model);
		new TableFilterHeader(tableEditions, AutoChoices.ENABLED);

		///////// CONFIGURE COMPONENTS
		splitListPanel.setDividerLocation(0.5);
		splitListPanel.setResizeWeight(0.5);

		progressBar.setVisible(false);
		btnRemove.setEnabled(true);
		btnExport.setEnabled(false);

		splitPane.setResizeWeight(0.5);
		splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
		scrollPaneCollections.setMinimumSize(new Dimension(0, 0));
		tree.setCellRenderer(new MagicCardsTreeCellRenderer());

		magicCardDetailPanel.setPreferredSize(new Dimension(0, 0));
		magicCardDetailPanel.enableThumbnail(true);

		tableEditions.setDefaultRenderer(Object.class, render);
		tableEditions.setDefaultRenderer(String.class, render);
		tableEditions.setDefaultRenderer(Integer.class, render);
		tableEditions.setDefaultRenderer(double.class, render);
		tableEditions.setRowHeight(25);
		tableEditions.setRowSorter(sorterEditions);

		addComponentListener(new ComponentAdapter() {
			@Override
			public void componentShown(ComponentEvent componentEvent) {
				splitListPanel.setDividerLocation(.45);
				splitPane.setDividerLocation(.5);
				removeComponentListener(this);
			}

		});

		///////// LAYOUT
		setLayout(new BorderLayout(0, 0));
		panneauDroite.setLayout(new BorderLayout());
		panneauGauche.setLayout(new BorderLayout(0, 0));

		///////// ADD PANELS
		add(panneauHaut, BorderLayout.NORTH);
		panneauHaut.add(btnAdd);
		panneauHaut.add(btnRefresh);
		panneauHaut.add(btnRemove);
		panneauHaut.add(btnAddAllSet);
		panneauHaut.add(btnMassCollection);
		panneauHaut.add(btnExport);
		panneauHaut.add(btnGenerateWebSite);
		panneauHaut.add(progressBar);
		add(splitListPanel, BorderLayout.CENTER);
		splitListPanel.setRightComponent(panneauDroite);
		panneauDroite.add(splitPane, BorderLayout.CENTER);
		splitPane.setLeftComponent(scrollPaneCollections);
		scrollPaneCollections.setViewportView(tree);
		splitPane.setRightComponent(tabbedPane);
		splitListPanel.setLeftComponent(panneauGauche);
		panneauGauche.add(scrollPane);
		scrollPane.setViewportView(tableEditions);
		panneauGauche.add(panelTotal, BorderLayout.SOUTH);
		panelTotal.add(lblTotal);

		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("DETAILS"), MTGConstants.ICON_TAB_DETAILS,magicCardDetailPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_EDITIONS"),  MTGConstants.ICON_BACK,magicEditionDetailPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PRICES"), MTGConstants.ICON_TAB_PRICES, pricePanel,null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_TYPES"), MTGConstants.ICON_TAB_TYPE,typeRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_MANA"), MTGConstants.ICON_TAB_MANA,manaRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("CARD_RARITY"), MTGConstants.ICON_TAB_RARITY,rarityRepartitionPanel, null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("STOCK_MODULE"), MTGConstants.ICON_TAB_STOCK, statsPanel,null);
		tabbedPane.addTab(MTGControler.getInstance().getLangService().getCapitalize("PRICE_VARIATIONS"), MTGConstants.ICON_TAB_VARIATIONS,historyPricesPanel, null);

		if (MTGControler.getInstance().get("debug-json-panel").equalsIgnoreCase("true"))
			tabbedPane.addTab("Json", MTGConstants.ICON_TAB_JSON, jsonPanel, null);

		///////// Labels
		lblTotal.setText("Total : " + model.getCountDefaultLibrary() + "/" + model.getCountTotal());
		btnAdd.setToolTipText(MTGControler.getInstance().getLangService().get("COLLECTION_ADD"));
		btnRefresh.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_REFRESH"));
		btnRemove.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("ITEM_SELECTED_REMOVE"));
		btnAddAllSet.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_SET_FULL"));
		btnExport.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("EXPORT_AS"));
		btnMassCollection.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("COLLECTION_IMPORT"));
		btnGenerateWebSite.setToolTipText(MTGControler.getInstance().getLangService().getCapitalize("GENERATE_WEBSITE"));

		List<SortKey> keys = new ArrayList<>();
		SortKey sortKey = new SortKey(3, SortOrder.DESCENDING);// column index 2
		keys.add(sortKey);
		sorterEditions.setSortKeys(keys);

		tableEditions.packAll();

		initPopupCollection();

		tableEditions.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				int row = tableEditions.getSelectedRow();
				MagicEdition ed = (MagicEdition) tableEditions.getValueAt(row, 1);
				magicEditionDetailPanel.setMagicEdition(ed);
				historyPricesPanel.init(null, ed, ed.getSet());
				jsonPanel.show(ed);
			}
		});

		btnAdd.addActionListener(e -> {
			String name = JOptionPane
					.showInputDialog(MTGControler.getInstance().getLangService().getCapitalize("NAME") + " ?");
			MagicCollection collectionAdd = new MagicCollection();
			collectionAdd.setName(name);
			try {
				dao.saveCollection(collectionAdd);
				((LazyLoadingTree.MyNode) getJTree().getModel().getRoot())
						.add(new DefaultMutableTreeNode(collectionAdd));
				getJTree().refresh();
				initPopupCollection();
			} catch (Exception ex) {
				logger.error(ex);
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),ex));
			}
		});

		btnRefresh.addActionListener(e ->

		ThreadManager.getInstance().execute(() -> {
			progressBar.setVisible(true);
			tree.refresh();
			try {
				model.calculate();
				lblTotal.setText("Total : " + model.getCountDefaultLibrary() + "/" + model.getCountTotal());
			} catch (Exception ex) {
				logger.error(ex);
			}
			model.fireTableDataChanged();
			progressBar.setVisible(false);
		}, "update Tree"));

		btnExport.addActionListener(ae -> {
			JPopupMenu menu = new JPopupMenu();

			for (final MTGCardsExport exp : MTGControler.getInstance().getEnabledDeckExports())
			{
				if (exp.getMods() == MODS.BOTH || exp.getMods() == MODS.EXPORT) {
					JMenuItem it = new JMenuItem();
					it.setIcon(exp.getIcon());
					it.setText(exp.getName());
					it.addActionListener(al -> ThreadManager.getInstance().execute(() -> {
						try {

							DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();
							JFileChooser jf = new JFileChooser();

							MagicCollection mc = null;
							MagicEdition ed = null;

							if (curr.getUserObject() instanceof MagicEdition) {
								ed = (MagicEdition) curr.getUserObject();
								mc = (MagicCollection) ((DefaultMutableTreeNode) curr.getParent()).getUserObject();
							} else {
								mc = (MagicCollection) curr.getUserObject();
							}

							jf.setSelectedFile(new File(mc.getName() + exp.getFileExtension()));
							int result = jf.showSaveDialog(null);
							File f = jf.getSelectedFile();

							exp.addObserver((Observable o, Object arg) -> progressBar.setValue((int) arg));

							if (result == JFileChooser.APPROVE_OPTION) {
								progressBar.setVisible(true);
								if (ed == null)
									exp.export(dao.listCardsFromCollection(mc), f);
								else
									exp.export(dao.listCardsFromCollection(mc, ed), f);

								progressBar.setVisible(false);

								MTGControler.getInstance().notify(new MTGNotification(
										MTGControler.getInstance().getLangService().getCapitalize("FINISHED"),
										MTGControler.getInstance().getLangService().combine("EXPORT", "FINISHED"),
										MESSAGE_TYPE.INFO
										));
							}

						} catch (Exception e) {
							logger.error("error in export",e);
							progressBar.setVisible(false);
							MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
						}
					}, "export collection with " + exp));

					menu.add(it);
				}

			}

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

		});

		splitPane.addComponentListener(new ComponentAdapter() {

			@Override
			public void componentShown(ComponentEvent componentEvent) {
				splitPane.setDividerLocation(.5);
				removeComponentListener(this);
			}
		});

		tree.addTreeSelectionListener(tse -> {
			path = tse.getPath();

			final DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();

			if (curr.getUserObject() instanceof String) {
				btnExport.setEnabled(false);
				statsPanel.enabledAdd(false);
			}

			if (curr.getUserObject() instanceof MagicCollection) {
				btnExport.setEnabled(true);
				selectedcol = (MagicCollection) curr.getUserObject();
				statsPanel.enabledAdd(false);
				btnExport.setEnabled(true);
				ThreadManager.getInstance().execute(() -> {
					try {

						List<MagicCard> list = dao.listCardsFromCollection(selectedcol);
						rarityRepartitionPanel.init(list);
						typeRepartitionPanel.init(list);
						manaRepartitionPanel.init(list);
						jsonPanel.show(curr.getUserObject());

					} catch (Exception e) {
						logger.error("error",e);
					}
				}, "Calculate Collection cards");

			}

			if (curr.getUserObject() instanceof MagicEdition) {
				magicEditionDetailPanel.setMagicEdition((MagicEdition) curr.getUserObject());
				btnExport.setEnabled(true);
				statsPanel.enabledAdd(false);
				ThreadManager.getInstance().execute(() -> {
					try {

						MagicCollection collec = (MagicCollection) ((DefaultMutableTreeNode) curr.getParent()).getUserObject();
						List<MagicCard> list = dao.listCardsFromCollection(collec, (MagicEdition) curr.getUserObject());
						rarityRepartitionPanel.init(list);
						typeRepartitionPanel.init(list);
						manaRepartitionPanel.init(list);
						historyPricesPanel.init(null, (MagicEdition) curr.getUserObject(),curr.getUserObject().toString());
						jsonPanel.show(curr.getUserObject());

					} catch (Exception e) {
						logger.error(e);
					}
				}, "Calculate Editions cards");
			}

			if (curr.getUserObject() instanceof MagicCard) {
				final MagicCard card = (MagicCard) ((DefaultMutableTreeNode) path.getLastPathComponent())
						.getUserObject();
				btnExport.setEnabled(false);
				magicCardDetailPanel.setMagicCard((MagicCard) curr.getUserObject());
				magicEditionDetailPanel.setMagicEdition(card.getCurrentSet());
				magicCardDetailPanel.enableThumbnail(true);
				jsonPanel.show(curr.getUserObject());

				ThreadManager.getInstance().execute(() -> {
					statsPanel.initMagicCardStock(card,
							(MagicCollection) ((DefaultMutableTreeNode) curr.getParent().getParent()).getUserObject());
					statsPanel.enabledAdd(true);
				}, "Update Collection");

				pricePanel.init(card,null);

				ThreadManager.getInstance().execute(() -> {
					try {
						historyPricesPanel.init(card, null, card.getName());
					} catch (Exception e) {
						logger.error("error history",e);
					}
				}, "update history");
			}

		});

		tree.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				if (SwingUtilities.isRightMouseButton(e)) {
					int row = tree.getClosestRowForLocation(e.getX(), e.getY());
					tree.setSelectionRow(row);

					final DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

					if (node.getUserObject() instanceof MagicEdition) {
						popupMenuEdition.show(e.getComponent(), e.getX(), e.getY());

					}
					if (node.getUserObject() instanceof MagicCard) {
						popupMenuCards.show(e.getComponent(), e.getX(), e.getY());
					}
					if (node.getUserObject() instanceof MagicCollection) {
						JPopupMenu p = new JPopupMenu();
						JMenuItem it = new JMenuItem("Mass movement");
						p.add(it);

						it.addActionListener(ae -> {
							MassMoverDialog d = new MassMoverDialog((MagicCollection) node.getUserObject(), null);
							d.setVisible(true);
							logger.debug("closing mass import with change =" + d.hasChange());
						});
						p.show(e.getComponent(), e.getX(), e.getY());
					}

				}
			}
		});

		btnMassCollection.addActionListener(ae -> {
			MassCollectionImporterDialog diag = new MassCollectionImporterDialog();
			diag.setVisible(true);
			try {
				model.calculate();
			} catch (Exception e) {
				logger.error(e);
			}
			model.fireTableDataChanged();
		});

		btnGenerateWebSite.addActionListener(ae -> ThreadManager.getInstance().execute(() -> {
			try {

				WebSiteGeneratorDialog diag = new WebSiteGeneratorDialog(dao.getCollections());
				diag.setVisible(true);
				if (diag.value()) {
					progressBar.setVisible(true);
					progressBar.setStringPainted(true);
					progressBar.setMinimum(0);

					int max = 0;
					for (MagicCollection col : diag.getSelectedCollections())
						max += dao.getCardsCount(col, null);

					progressBar.setMaximum(max);
					progressBar.setValue(0);

					MagicWebSiteGenerator gen = new MagicWebSiteGenerator(diag.getTemplate(),diag.getDest().getAbsolutePath());

					gen.addObserver((Observable o, Object arg) -> progressBar.setValue((int) arg));
					gen.generate(diag.getSelectedCollections(), diag.getPriceProviders());

					int res = JOptionPane.showConfirmDialog(null,MTGControler.getInstance().getLangService().getCapitalize("WEBSITE_CONFIRMATION_VIEW"));

					if (res == JOptionPane.YES_OPTION) {
						Path p = Paths.get(diag.getDest().getAbsolutePath() + "/index.htm");
						Desktop.getDesktop().browse(p.toUri());
					}
					progressBar.setVisible(false);
				}

			} catch (Exception e) {
				logger.error("error generating website", e);
				progressBar.setVisible(false);
				MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
			}
		}, "btnGenerateWebSite generate website"));

		btnAddAllSet.addActionListener(evt -> {
			MagicEdition ed = (MagicEdition) tableEditions.getValueAt(tableEditions.getSelectedRow(), 1);

			int res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService().getCapitalize(
					"CONFIRM_COLLECTION_ITEM_ADDITION", ed, MTGControler.getInstance().get("default-library")));

			if (res == JOptionPane.YES_OPTION)
				try {
					List<MagicCard> list = provider.searchCardByEdition(ed);
					logger.debug("save " + list.size() + " cards from " + ed.getId());
					for (MagicCard mc : list) {
						MagicCollection col = new MagicCollection();
						col.setName(MTGControler.getInstance().get("default-library"));
						dao.saveCard(mc, col);
					}
					model.calculate();
					model.fireTableDataChanged();
				} catch (Exception e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
					logger.error(e);
				}
		});

		btnRemove.addActionListener(evt -> {

			MagicCollection col = (MagicCollection) ((DefaultMutableTreeNode) path.getPathComponent(1)).getUserObject();
			int res = 0;

			DefaultMutableTreeNode curr = (DefaultMutableTreeNode) path.getLastPathComponent();
			if (curr.getUserObject() instanceof MagicCard) {
				MagicCard card = (MagicCard) ((DefaultMutableTreeNode) path.getLastPathComponent()).getUserObject();

				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_ITEM_DELETE", card, col));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeCard(card, col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}
			if (curr.getUserObject() instanceof MagicEdition) {
				MagicEdition me = (MagicEdition) ((DefaultMutableTreeNode) path.getPathComponent(2)).getUserObject();

				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_ITEM_DELETE", me, col));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeEdition(me, col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}
			if (curr.getUserObject() instanceof MagicCollection) {
				try {
					res = JOptionPane.showConfirmDialog(null, MTGControler.getInstance().getLangService()
							.getCapitalize("CONFIRM_COLLECTION_DELETE", col, dao.getCardsCount(col, null)));
					if (res == JOptionPane.YES_OPTION) {
						dao.removeCollection(col);
						curr.removeFromParent();
					}
				} catch (SQLException e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
			}

			if (res == JOptionPane.YES_OPTION) {
				try {
					model.calculate();
				} catch (Exception e) {
					MTGControler.getInstance().notify(new MTGNotification(MTGControler.getInstance().getLangService().getError(),e));
				}
				tree.refresh();

			}
		});

	}

Replace Generic With Diamond TableRowSorter<DefaultTableModel> with TableRowSorter<> in method public initGUI() : void from class org.magic.gui.CollectionPanelGUI


	public DeckSelectionModel() {
		decks = new ArrayList<>();
		manager = new MTGDeckManager();
		manager.addObserver((Observable o, Object obj)->{
				decks.add((MagicDeck) obj);
				fireTableDataChanged();
		});

		ThreadManager.getInstance().execute(() -> manager.listDecks());

	}

	public DeckSelectionModel() {
		decks = new ArrayList<>();
		manager = new MTGDeckManager();
		manager.addObserver(new Observer() {

			@Override
			public void update(Observable o, Object obj) {
				decks.add((MagicDeck) obj);
				fireTableDataChanged();

			}
		});
		ThreadManager.getInstance().execute(() -> manager.listDecks());

	}

Replace Anonymous With Lambda org.magic.gui.models.DeckSelectionModel.DeckSelectionModel.addObserver.new Observer with (o, obj) -> {decks.add((MagicDeck)obj); in method public DeckSelectionModel() from class org.magic.gui.models.DeckSelectionModel


			public void run() {
				StringBuilder message = new StringBuilder();
				if (MTGControler.getInstance().getEnabledDAO().listAlerts() != null)
					for (MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().listAlerts()) {
						Map<Date,Double> map = null;
						try {
							map = MTGControler.getInstance().getEnabledDashBoard().getPriceVariation(alert.getCard(), alert.getCard().getCurrentSet());
							if(map!=null)
							{
								List<Entry<Date, Double>> res = new ArrayList<>(map.entrySet());
								Date now = res.get(res.size()-1).getKey();
								Date yesterday = res.get(res.size()-2).getKey();
								Date week = res.get(res.size()-7).getKey();

								double valDay = map.get(now) - map.get(yesterday);
								double valWeek = map.get(now) - map.get(week);
								double pcWeek = (map.get(now) - map.get(week))/map.get(week)*100;
								double pcDay = (map.get(now) - map.get(yesterday))/map.get(yesterday)*100;

								if(pcDay>=getInt("ALERT_MIN_PERCENT"))
								{
									if(valDay>0)
										message.append(alert.getCard() + " is up +"+formatter.format(pcDay)+"%\n");
										else
										message.append(alert.getCard() + " is down "+formatter.format(pcDay)+"%\n");
								}
								CardShake cs = new CardShake();
								cs.setCard(alert.getCard());
								cs.setDateUpdate(new Date());
								cs.setPercentDayChange(pcDay);
								cs.setPercentWeekChange(pcWeek);
								cs.setPriceDayChange(valDay);
								cs.setPriceWeekChange(valWeek);
								cs.setPrice(map.get(now));
								alert.setShake(cs);

								if(getInt("THREAD_PAUSE")!=null)
									Thread.sleep(getInt("THREAD_PAUSE"));
							}
						} catch (IOException|InterruptedException e) {
							logger.error(e);
						}

					}

				if(message.length()>0)
				{
					MTGNotification notif = new MTGNotification();
									notif.setTitle("Alerts Variation");
									notif.setMessage(message.toString());
									notif.setType(MessageType.INFO);

					try {
						MTGControler.getInstance().getNotifier(ConsoleNotifier.class).send(notif);
					} catch (IOException e) {
						logger.error(e);
					}
				}

			}

			public void run() {
				StringBuilder message = new StringBuilder();
				if (MTGControler.getInstance().getEnabledDAO().listAlerts() != null)
					for (MagicCardAlert alert : MTGControler.getInstance().getEnabledDAO().listAlerts()) {
						Map<Date,Double> map = null;
						try {
							map = MTGControler.getInstance().getEnabledDashBoard().getPriceVariation(alert.getCard(), alert.getCard().getCurrentSet());
							if(map!=null)
							{
								List<Entry<Date, Double>> res = new ArrayList<>(map.entrySet());
								Date now = res.get(res.size()-1).getKey();
								Date yesterday = res.get(res.size()-2).getKey();
								Date week = res.get(res.size()-7).getKey();

								double valDay = map.get(now) - map.get(yesterday);
								double valWeek = map.get(now) - map.get(week);
								double pcWeek = (map.get(now) - map.get(week))/map.get(week)*100;
								double pcDay = (map.get(now) - map.get(yesterday))/map.get(yesterday)*100;

								if(pcDay>=getInt("ALERT_MIN_PERCENT"))
								{
									if(valDay>0)
										message.append(alert.getCard() + " is up +"+formatter.format(pcDay)+"%\n");
										else
										message.append(alert.getCard() + " is down "+formatter.format(pcDay)+"%\n");
								}
								CardShake cs = new CardShake();
								cs.setCard(alert.getCard());
								cs.setDateUpdate(new Date());
								cs.setPercentDayChange(pcDay);
								cs.setPercentWeekChange(pcWeek);
								cs.setPriceDayChange(valDay);
								cs.setPriceWeekChange(valWeek);
								cs.setPrice(map.get(now));
								alert.setShake(cs);

								if(getInt("THREAD_PAUSE")!=null)
									Thread.sleep(getInt("THREAD_PAUSE"));
							}
						} catch (IOException e) {
							logger.error(e);
						} catch (InterruptedException e) {
							logger.error(e);
						}

					}

				if(message.length()>0)
				{
					MTGNotification notif = new MTGNotification();
									notif.setTitle("Alerts Variation");
									notif.setMessage(message.toString());
									notif.setType(MessageType.INFO);

					try {
						new ConsoleNotifier().send(notif);
					} catch (IOException e) {
						logger.error(e);
					}
				}

			}

Merge Catch [catch(IOException e), catch(InterruptedException e)] to catch(IOException|InterruptedException e) in method public run() : void from class org.magic.servers.impl.AlertTrendServer.start.new TimerTask


	@Override
	public List<MagicNewsContent> listNews(MagicNews rssBean) throws IOException {
		InputStream is = null;
		SyndFeed feed;

		List<MagicNewsContent> ret = new ArrayList<>();
		try {
			URLConnection openConnection = rssBean.getUrl().openConnection();
			openConnection.setRequestProperty("User-Agent",MTGConstants.USER_AGENT);
			is = openConnection.getInputStream();
			InputSource source = new InputSource(is);
			feed=input.build(source);
			String baseURI=feed.getLink();

			for(SyndEntry s: feed.getEntries())
			{
				MagicNewsContent content = new MagicNewsContent();
				content.setTitle(s.getTitle());
				content.setAuthor(s.getAuthor());
				content.setDate(s.getPublishedDate());
				try{
					URL link;
					if(!s.getLink().startsWith(baseURI))
						link = new URL(baseURI+s.getLink());
					else
						link = new URL(s.getLink());

					content.setLink(link);
				}
				catch(MalformedURLException e)
				{
					logger.error(e);
				}
				ret.add(content);
			}

			return ret;

		} catch (IllegalArgumentException|FeedException e) {
			throw new IOException(e);
		}
		finally
		{
			if(is!=null)
				is.close();
		}

	}

	@Override
	public List<MagicNewsContent> listNews(MagicNews rssBean) throws IOException {
		InputStream is = null;
		SyndFeed feed;

		List<MagicNewsContent> ret = new ArrayList<>();
		try {
			URLConnection openConnection = rssBean.getUrl().openConnection();
			openConnection.setRequestProperty("User-Agent",MTGConstants.USER_AGENT);
			is = openConnection.getInputStream();
			InputSource source = new InputSource(is);
			feed=input.build(source);
			String baseURI=feed.getLink();

			for(SyndEntry s: feed.getEntries())
			{
				MagicNewsContent content = new MagicNewsContent();
				content.setTitle(s.getTitle());
				content.setAuthor(s.getAuthor());
				content.setDate(s.getPublishedDate());
				try{
					URL link;
					if(!s.getLink().startsWith(baseURI))
						link = new URL(baseURI+s.getLink());
					else
						link = new URL(s.getLink());

					content.setLink(link);
				}
				catch(MalformedURLException e)
				{
					logger.error(e);
				}
				ret.add(content);
			}

			return ret;

		} catch (IllegalArgumentException e) {
			throw new IOException(e);
		} catch (FeedException e) {
			throw new IOException(e);
		}
		finally
		{
			if(is!=null)
				is.close();
		}

	}

Merge Catch [catch(IllegalArgumentException e), catch(FeedException e)] to catch(IllegalArgumentException|FeedException e) in method public listNews(rssBean MagicNews) : List<MagicNewsContent> from class org.magic.api.news.impl.RSSNewsProvider


			@Override
			public void mouseClicked(MouseEvent me) {
				MagicNewsContent sel = model.getEntryAt(table.getSelectedRow());

				if(me.getClickCount()==2)
				{
					try {
						Desktop.getDesktop().browse(sel.getLink().toURI());
					} catch (Exception e1) {
						logger.error(e1);
					}
				}
				else
				{
					ThreadManager.getInstance().execute(()->{
							lblLoading.setVisible(true);
							try {
								logger.debug("loading " + sel.getLink());
								editorPane.setPage(sel.getLink());
								editorPane.setCaretPosition(0);
								lblLoading.setVisible(false);
							} catch (IOException e) {
								logger.error("Error reading " + sel.getLink(),e);
								lblLoading.setVisible(false);
							}

					});
				}
			}

			@Override
			public void mouseClicked(MouseEvent me) {
				MagicNewsContent sel = model.getEntryAt(table.getSelectedRow());

				if(me.getClickCount()==2)
				{
					try {
						Desktop.getDesktop().browse(sel.getLink().toURI());
					} catch (Exception e1) {
						logger.error(e1);
					}
				}
				else
				{
					ThreadManager.getInstance().execute(new Runnable() {

						@Override
						public void run() {
							lblLoading.setVisible(true);
							try {
								logger.debug("loading " + sel.getLink());
								editorPane.setPage(sel.getLink());
								editorPane.setCaretPosition(0);
								lblLoading.setVisible(false);
							} catch (IOException e) {
								logger.error("Error reading " + sel.getLink(),e);
								lblLoading.setVisible(false);
							}
						}
					});
				}
			}

Replace Anonymous With Lambda org.magic.gui.RssGUI.RssGUI.addMouseListener.new MouseAdapter.mouseClicked.execute.new Runnable with () -> {lblLoading.setVisible(true); in method public mouseClicked(me MouseEvent) : void from class org.magic.gui.RssGUI.RssGUI.addMouseListener.new MouseAdapter


	protected void open()
	{
		deck = new MagicDeck();
		deck.setDateCreation(new Date());
		deck.setDescription("Sealed from " + model.getSealedPack());
		deck.setName("sealed from "+model.getSealedPack().toList().size() +" boosters");

		panelOpenedBooster.clear();
		panelDeck.removeAll();
		panelDeck.revalidate();
		panelDeck.repaint();
		ThreadManager.getInstance().execute(()->{
				int column=0;
				list = new ArrayList<>();
				lblLoading.setVisible(true);
				for(Entry<MagicEdition, Integer> ed : model.getSealedPack().getEntries())
				{

					try {
						for(int i=0;i<ed.getValue();i++)
						{

							Booster b = MTGControler.getInstance().getEnabledProviders().generateBooster(ed.getKey());
							column++;
							for(MagicCard mc : b.getCards())
							{
								list.add(mc);
								DisplayableCard c = createCard(mc);

								panelOpenedBooster.addComponent(c,column);
							}

						}
					} catch (IOException e) {
						MTGLogger.printStackTrace(e);
						lblLoading.setVisible(false);
					}

				}
				panelOpenedBooster.setList(list);
				refreshStats();
				lblLoading.setVisible(false);
		});
	}

	protected void open()
	{
		deck = new MagicDeck();
		deck.setDateCreation(new Date());
		deck.setDescription("Sealed from " + model.getSealedPack());
		deck.setName("sealed from "+model.getSealedPack().toList().size() +" boosters");

		panelOpenedBooster.clear();
		panelDeck.removeAll();
		panelDeck.revalidate();
		panelDeck.repaint();
		ThreadManager.getInstance().execute(new Runnable() {

			@Override
			public void run() {
				int column=0;
				list = new ArrayList<>();
				lblLoading.setVisible(true);
				for(Entry<MagicEdition, Integer> ed : model.getSealedPack().getEntries())
				{

					try {
						for(int i=0;i<ed.getValue();i++)
						{

							Booster b = MTGControler.getInstance().getEnabledProviders().generateBooster(ed.getKey());
							column++;
							for(MagicCard mc : b.getCards())
							{
								list.add(mc);
								DisplayableCard c = createCard(mc);

								panelOpenedBooster.addComponent(c,column);
							}

						}
					} catch (IOException e) {
						MTGLogger.printStackTrace(e);
						lblLoading.setVisible(false);
					}

				}
				panelOpenedBooster.setList(list);
				refreshStats();
				lblLoading.setVisible(false);
			}
		});
	}

Replace Anonymous With Lambda org.magic.gui.components.SealedPanel.open.execute.new Runnable with () -> {int column=0; in method protected open() : void from class org.magic.gui.components.SealedPanel


	@Override
	public Map<String, Integer> getCardsCountGlobal(MagicCollection c) throws SQLException {
		Map<String, Integer> map = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
		 List<Bson> aggr = Arrays.asList(
	              Aggregates.match(Filters.eq("collection.name", c.getName())),
	              Aggregates.group("$edition", Accumulators.sum("count", 1))
	      );

		 logger.trace(aggr.toString());

		db.getCollection("cards",BasicDBObject.class)
		  .aggregate(aggr)
		  .forEach( (Consumer<BasicDBObject>)document->
				            map.put(document.getString("_id"), document.getInt("count"))
				        	);
		return map;
	}

	@Override
	public Map<String, Integer> getCardsCountGlobal(MagicCollection c) throws SQLException {
		Map<String, Integer> map = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
		 List<Bson> aggr = Arrays.asList(
	              Aggregates.match(Filters.eq("collection.name", c.getName())),
	              Aggregates.group("$edition", Accumulators.sum("count", 1))
	      );

		 logger.trace(aggr.toString());

		db.getCollection("cards",BasicDBObject.class)
		  .aggregate(aggr)
		  .forEach( new Block<BasicDBObject>() {
				        @Override
				        public void apply(final BasicDBObject document) {
				            map.put(document.getString("_id"), document.getInt("count"));
				        	}
				    	}
				  );
		return map;
	}

Replace Anonymous With Lambda org.magic.api.dao.impl.MongoDbDAO.getCardsCountGlobal.forEach.new Block<BasicDBObject> with document -> map.put(document.getString("_id"),document.getInt("count")) in method public getCardsCountGlobal(c MagicCollection) : Map<String,Integer> from class org.magic.api.dao.impl.MongoDbDAO


	@Override
	public List<MagicCollection> getCollectionFromCards(MagicCard mc) throws SQLException{

		List<MagicCollection> ret = new ArrayList<>();
		BasicDBObject query = new BasicDBObject();
		query.put("db_id",IDGenerator.generate(mc));
		db.getCollection("cards", BasicDBObject.class).distinct("collection.name",query,String.class).forEach((Consumer<String>)result ->{
				try {
					logger.trace("found " + mc + " in " + result);
					ret.add(getCollection(result));
				} catch (SQLException e) {
					logger.error("Error",e);
				}

		});

		return ret;
	}

	@Override
	public List<MagicCollection> getCollectionFromCards(MagicCard mc) throws SQLException{

		List<MagicCollection> ret = new ArrayList<>();
		BasicDBObject query = new BasicDBObject();
		query.put("db_id",IDGenerator.generate(mc));
		db.getCollection("cards", BasicDBObject.class).distinct("collection.name",query,String.class).forEach(new Block<String>() {
			public void apply(String arg) {
				try {
					logger.trace("found " + mc + " in " + arg);
					ret.add(getCollection(arg));
				} catch (SQLException e) {
					logger.error("Error",e);
				}
			}
		});

		return ret;
	}

Replace Anonymous With Lambda org.magic.api.dao.impl.MongoDbDAO.getCollectionFromCards.forEach.new Block<String> with result -> {trylogger.trace("found " + mc + " in " + result); in method public getCollectionFromCards(mc MagicCard) : List<MagicCollection> from class org.magic.api.dao.impl.MongoDbDAO


	@Override
	public List<MagicCardAlert> getAlerts() {
		ArrayList<MagicCardAlert> ret= new ArrayList<>();
		db.getCollection("alerts",BasicDBObject.class).find().forEach((Consumer<BasicDBObject>)result->
					ret.add(deserialize(result.get("alertItem").toString(),MagicCardAlert.class))
					);
      return ret;
	}

	@Override
	public List<MagicCardAlert> getAlerts() {
		ArrayList<MagicCardAlert> ret= new ArrayList<>();
		db.getCollection("alerts",BasicDBObject.class).find().forEach(new Block<BasicDBObject>() {
	        @Override
	        public void apply(final BasicDBObject result) {
	        	ret.add(deserialize(result.get("alertItem").toString(),MagicCardAlert.class));
	        	}
	    	}
	  );
      return ret;
	}

Replace Anonymous With Lambda org.magic.api.dao.impl.MongoDbDAO.getAlerts.forEach.new Block<BasicDBObject> with result -> ret.add(deserialize(result.get("alertItem").toString(),MagicCardAlert.class)) in method public getAlerts() : List<MagicCardAlert> from class org.magic.api.dao.impl.MongoDbDAO


	public List<MagicEdition> loadEditions() throws Exception {

		List<MagicEdition> ret = new ArrayList<>();
		for(File f : confdir.listFiles(pathname->{
				return pathname.getName().endsWith(ext);
			}))
			{
					ret.add(getEdition(f));
			}

		return ret;
	}

	public List<MagicEdition> loadEditions() throws Exception {

		List<MagicEdition> ret = new ArrayList<>();
		for(File f : confdir.listFiles(new FileFilter() {
			public boolean accept(File pathname) {
				return pathname.getName().endsWith(ext);
			}
			}))
			{
					ret.add(getEdition(f));
			}

		return ret;
	}

Replace Anonymous With Lambda org.magic.api.providers.impl.PrivateMTGSetProvider.loadEditions.listFiles.new FileFilter with pathname -> {return pathname.getName().endsWith(ext); in method public loadEditions() : List<MagicEdition> from class org.magic.api.providers.impl.PrivateMTGSetProvider