Merge branch 'develop' into features/JAL-3010ontologyFeatureSettings
authorJim Procter <jprocter@issues.jalview.org>
Wed, 19 Sep 2018 14:56:26 +0000 (15:56 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 19 Sep 2018 14:56:26 +0000 (15:56 +0100)
1  2 
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<String> 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();
     */
    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()