From 1e591b1447109f90a7bb831b89b551243e61267c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 7 Feb 2022 16:07:33 +0000 Subject: [PATCH] =?utf8?q?JAL-3186=20remove=20=E2=80=98Variable=20Colour=E2=80?= =?utf8?q?=99=20from=20the=20sequence=20feature=20settings=20popup=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/gui/FeatureSettings.java | 75 ---------------------------------- 1 file changed, 75 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 572ada6..ac04a1f 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -498,81 +498,6 @@ public class FeatureSettings extends JPanel JPopupMenu men = new JPopupMenu(MessageManager .formatMessage("label.settings_for_param", new String[] { type })); - final FeatureColourI featureColour = (FeatureColourI) typeCol; - - /* - * menu option to select (or deselect) variable colour - */ - final JCheckBoxMenuItem variableColourCB = new JCheckBoxMenuItem( - MessageManager.getString("label.variable_colour")); - variableColourCB.setSelected(!featureColour.isSimpleColour()); - men.add(variableColourCB); - - /* - * checkbox action listener doubles up as listener to OK - * from the variable colour / filters dialog - */ - variableColourCB.addActionListener(new ActionListener() - { - @Override - public void actionPerformed(ActionEvent e) - { - if (e.getSource() == variableColourCB) - { - // BH 2018 for JavaScript because this is a checkbox - men.setVisible(true); - men.setVisible(false); - if (featureColour.isSimpleColour()) - { - /* - * toggle simple colour to variable colour - show dialog - */ - FeatureTypeSettings fc = new FeatureTypeSettings(fr, type); - fc.addActionListener(this); - } - else - { - /* - * toggle variable to simple colour - show colour chooser - */ - String title = MessageManager - .formatMessage("label.select_colour_for", type); - ColourChooserListener listener = new ColourChooserListener() - { - @Override - public void colourSelected(Color c) - { - table.setValueAt(new FeatureColour(c), rowSelected, - COLOUR_COLUMN); - table.validate(); - updateFeatureRenderer( - ((FeatureTableModel) table.getModel()).getData(), - false); - } - }; - JalviewColourChooser.showColourChooser(FeatureSettings.this, - title, featureColour.getMaxColour(), listener); - } - } - else - { - if (e.getSource() instanceof FeatureTypeSettings) - { - /* - * update after OK in feature colour dialog; the updated - * colour will have already been set in the FeatureRenderer - */ - FeatureColourI fci = fr.getFeatureColours().get(type); - table.setValueAt(fci, rowSelected, COLOUR_COLUMN); - // BH 2018 setting a table value does not invalidate it. - // System.out.println("FeatureSettings is valied" + - // table.validate(); - } - } - } - }); - - men.addSeparator(); JMenuItem scr = new JMenuItem( MessageManager.getString("label.sort_by_score")); -- 1.7.10.2