From 3f62f10ab0f8985945e460c70c89b530446d6afa Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 14 Jan 2019 16:13:10 +0000 Subject: [PATCH] JAL-3186 remove Variable Colour from popup menu --- resources/lang/Messages.properties | 3 +- resources/lang/Messages_es.properties | 3 +- src/jalview/gui/FeatureSettings.java | 69 ++------------------------------- 3 files changed, 7 insertions(+), 68 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index d5b4725..c248a10 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1351,7 +1351,6 @@ label.colour_by_text = Colour by text label.graduated_colour = Graduated Colour label.by_text_of = By text of label.by_range_of = By range of -label.filters_tooltip = Click to set or amend filters label.or = Or label.and = And label.sequence_feature_colours = Sequence Feature Colours @@ -1362,3 +1361,5 @@ label.most_bound_molecules = Most Bound Molecules label.most_polymer_residues = Most Polymer Residues label.cached_structures = Cached Structures label.free_text_search = Free Text Search +label.configuration = Configuration +label.configure_feature_tooltip = Click to configure variable colour or filters diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 73a1fb8..232c7b4 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1352,7 +1352,6 @@ label.colour_by_text = Colorear por texto label.graduated_colour = Color graduado label.by_text_of = Por texto de label.by_range_of = Por rango de -label.filters_tooltip = Haga clic para configurar o modificar los filtros label.or = O label.and = Y label.sequence_feature_colours = Colores de características de las secuencias @@ -1363,3 +1362,5 @@ label.most_bound_molecules = M label.most_polymer_residues = Más Residuos de Polímeros label.cached_structures = Estructuras en Caché label.free_text_search = Búsqueda de texto libre +label.configuration = Configuración +label.configure_feature_tooltip = Haga clic para configurar el color o los filtros diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 1358c8f..132bb2b 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -78,7 +78,6 @@ import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; -import javax.swing.JCheckBoxMenuItem; import javax.swing.JColorChooser; import javax.swing.JDialog; import javax.swing.JInternalFrame; @@ -213,7 +212,8 @@ public class FeatureSettings extends JPanel FeatureMatcherSet o = (FeatureMatcherSet) table.getValueAt(row, column); tip = o.isEmpty() - ? MessageManager.getString("label.filters_tooltip") + ? MessageManager + .getString("label.configure_feature_tooltip") : o.toString(); break; default: @@ -409,69 +409,6 @@ public class FeatureSettings extends JPanel }); men.add(dens); - /* - * variable colour options include colour by label, by score, - * by selected attribute text, or attribute value - */ - final JCheckBoxMenuItem mxcol = new JCheckBoxMenuItem( - MessageManager.getString("label.variable_colour")); - mxcol.setSelected(!featureColour.isSimpleColour()); - men.add(mxcol); - mxcol.addActionListener(new ActionListener() - { - JColorChooser colorChooser; - - @Override - public void actionPerformed(ActionEvent e) - { - if (e.getSource() == mxcol) - { - if (featureColour.isSimpleColour()) - { - FeatureTypeSettings fc = new FeatureTypeSettings(me.fr, type); - fc.addActionListener(this); - } - else - { - // bring up simple color chooser - colorChooser = new JColorChooser(); - String title = MessageManager - .getString("label.select_colour"); - JDialog dialog = JColorChooser.createDialog(me, - title, true, // modal - colorChooser, this, // OK button handler - null); // no CANCEL button handler - colorChooser.setColor(featureColour.getMaxColour()); - dialog.setVisible(true); - } - } - 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, 1); - table.validate(); - } - else - { - // probably the color chooser! - table.setValueAt(new FeatureColour(colorChooser.getColor()), - rowSelected, 1); - table.validate(); - me.updateFeatureRenderer( - ((FeatureTableModel) table.getModel()).getData(), - false); - } - } - } - - }); - JMenuItem selCols = new JMenuItem( MessageManager.getString("label.select_columns_containing")); selCols.addActionListener(new ActionListener() @@ -1329,7 +1266,7 @@ public class FeatureSettings extends JPanel private String[] columnNames = { MessageManager.getString("label.feature_type"), MessageManager.getString("action.colour"), - MessageManager.getString("label.filter"), + MessageManager.getString("label.configuration"), MessageManager.getString("label.show") }; private Object[][] data; -- 1.7.10.2