JAL-4071 boring GUI bits - add togglable menu item for show/hide sequence feature...
[jalview.git] / src / jalview / viewmodel / styles / ViewStyle.java
index 16aa580..0a525e2 100644 (file)
  */
 package jalview.viewmodel.styles;
 
-import jalview.api.ViewStyleI;
-
 import java.awt.Color;
 
+import jalview.api.ViewStyleI;
+
 /**
  * A container for holding alignment view properties. View properties are
  * data-independent, which means they can be safely copied between views
@@ -124,6 +124,12 @@ public class ViewStyle implements ViewStyleI
   boolean showSequenceFeatures = false;
 
   /**
+   * display setting for showing/hiding annotation tracks reporting sequence
+   * feature counts in columns of alignment view
+   */
+  boolean showSequenceFeatureCounts = false;
+
+  /**
    * display sequence symbols
    */
   boolean showText = true;
@@ -213,6 +219,8 @@ public class ViewStyle implements ViewStyleI
     setShowNPFeats(vs.isShowNPFeats());
     setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight());
     setShowSequenceFeatures(vs.isShowSequenceFeatures());
+    setShowComplementFeatures(vs.isShowComplementFeatures());
+    setShowComplementFeaturesOnTop(vs.isShowComplementFeaturesOnTop());
     setShowText(vs.getShowText());
     setShowUnconserved(vs.getShowUnconserved());
     setTextColour(vs.getTextColour());
@@ -275,6 +283,9 @@ public class ViewStyle implements ViewStyleI
             && isShowSequenceFeaturesHeight() == vs
                     .isShowSequenceFeaturesHeight()
             && isShowSequenceFeatures() == vs.isShowSequenceFeatures()
+            && isShowComplementFeatures() == vs.isShowComplementFeatures()
+            && isShowComplementFeaturesOnTop() == vs
+                    .isShowComplementFeaturesOnTop()
             && getShowText() == vs.getShowText()
             && getShowUnconserved() == vs.getShowUnconserved()
             && getThreshold() == vs.getThreshold()
@@ -365,6 +376,10 @@ public class ViewStyle implements ViewStyleI
 
   private int fontStyle;
 
+  private boolean showComplementFeatures;
+
+  private boolean showComplementFeaturesOnTop;
+
   /**
    * GUI state
    * 
@@ -1111,4 +1126,40 @@ public class ViewStyle implements ViewStyleI
   {
     proteinFontAsCdna = b;
   }
+
+  @Override
+  public void setShowComplementFeatures(boolean b)
+  {
+    showComplementFeatures = b;
+  }
+
+  @Override
+  public boolean isShowComplementFeatures()
+  {
+    return showComplementFeatures;
+  }
+
+  @Override
+  public void setShowComplementFeaturesOnTop(boolean b)
+  {
+    showComplementFeaturesOnTop = b;
+  }
+
+  @Override
+  public boolean isShowComplementFeaturesOnTop()
+  {
+    return showComplementFeaturesOnTop;
+  }
+
+  @Override
+  public void setShowSequenceFeatureCounts(boolean show)
+  {
+    showSequenceFeatureCounts = show;
+  }
+
+  @Override
+  public boolean isShowSequenceFeatureCounts()
+  {
+    return showSequenceFeatureCounts;
+  }
 }