From: Jim Procter Date: Wed, 19 Sep 2018 14:56:26 +0000 (+0100) Subject: Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=345e36bca9ccb985a560aeaade58a41b09b69bac;p=jalview.git Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings --- 345e36bca9ccb985a560aeaade58a41b09b69bac diff --cc src/jalview/gui/FeatureTypeSettings.java index 7aef644,55bc519..9609996 --- a/src/jalview/gui/FeatureTypeSettings.java +++ b/src/jalview/gui/FeatureTypeSettings.java @@@ -237,45 -217,11 +237,31 @@@ public class FeatureTypeSettings extend this.fr = frender; this.featureType = theType; ap = fr.ap; - originalFilter = fr.getFeatureFilter(theType); - originalColour = fr.getFeatureColours().get(theType); - + + /* + * determine sub-types (if any) of this feature type + */ + List types = fr.getRenderOrder(); + subTypes = SequenceOntologyFactory.getInstance() + .getChildTerms(this.featureType, types); + Collections.sort(subTypes); // sort for ease of reading in tooltip + + /* + * save original colours and filters for this feature type + * and any sub-types, to restore on Cancel + */ + originalFilters = new HashMap<>(); + originalFilters.put(theType, fr.getFeatureFilter(theType)); + originalColours = new HashMap<>(); + originalColours.put(theType, fr.getFeatureColours().get(theType)); + for (String child : subTypes) + { + originalFilters.put(child, fr.getFeatureFilter(child)); + originalColours.put(child, fr.getFeatureColours().get(child)); + } + adjusting = true; - + try { initialise(); @@@ -1319,15 -1177,8 +1311,13 @@@ */ private JPanel initialiseAndOrPanel() { - JPanel andOrPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); + JPanel andOrPanel = new JPanel(new BorderLayout()); andOrPanel.setBackground(Color.white); - //<<<<<<< HEAD ++ +// JPanel panel1 = new JPanel(new FlowLayout(FlowLayout.LEFT)); +// andOrPanel.add(panel1, BorderLayout.WEST); +// panel1.setBackground(Color.white); +// panel1.setBorder(BorderFactory.createLineBorder(debugBorderColour)); - //======= - //>>>>>>> refs/heads/develop andFilters = new JRadioButton(MessageManager.getString("label.and")); orFilters = new JRadioButton(MessageManager.getString("label.or")); ActionListener actionListener = new ActionListener()