From: Jim Procter Date: Mon, 7 Feb 2022 16:07:33 +0000 (+0000) Subject: JAL-3186 remove ‘Variable Colour’ from the sequence feature settings popup menu X-Git-Tag: Release_2_11_2_0~13^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1e591b1447109f90a7bb831b89b551243e61267c;p=jalview.git JAL-3186 remove ‘Variable Colour’ from the sequence feature settings popup menu --- 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"));