JAL-1683 replace year/version strings with tokens in source
[jalview.git] / src / jalview / gui / AlignViewport.java
index 632d2b2..b088e08 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -95,10 +95,6 @@ public class AlignViewport extends AlignmentViewport implements
 
   boolean renderGaps = true;
 
-  boolean showSequenceFeatures = false;
-
-  boolean showAnnotation = true;
-
   SequenceAnnotationOrder sortAnnotationsBy = null;
 
   int charHeight;
@@ -125,12 +121,6 @@ public class AlignViewport extends AlignmentViewport implements
 
   boolean cursorMode = false;
 
-  /**
-   * Keys are the feature types which are currently visible. Note: Values are
-   * not used!
-   */
-  private Hashtable featuresDisplayed = null;
-
   boolean antiAlias = false;
 
   Rectangle explodedPosition;
@@ -149,8 +139,7 @@ public class AlignViewport extends AlignmentViewport implements
 
   Color textColour2 = Color.white;
 
-  boolean rightAlignIds = false;
-
+  private AnnotationColumnChooser annotationColumnSelectionState;
   /**
    * Creates a new AlignViewport object.
    * 
@@ -206,16 +195,7 @@ public class AlignViewport extends AlignmentViewport implements
     setAlignment(al);
     if (hiddenColumns != null)
     {
-      this.colSel = hiddenColumns;
-      if (hiddenColumns.getHiddenColumns() != null
-              && hiddenColumns.getHiddenColumns().size() > 0)
-      {
-        hasHiddenColumns = true;
-      }
-      else
-      {
-        hasHiddenColumns = false;
-      }
+      colSel = hiddenColumns;
     }
     init();
   }
@@ -262,16 +242,7 @@ public class AlignViewport extends AlignmentViewport implements
     setAlignment(al);
     if (hiddenColumns != null)
     {
-      this.colSel = hiddenColumns;
-      if (hiddenColumns.getHiddenColumns() != null
-              && hiddenColumns.getHiddenColumns().size() > 0)
-      {
-        hasHiddenColumns = true;
-      }
-      else
-      {
-        hasHiddenColumns = false;
-      }
+      colSel = hiddenColumns;
     }
     init();
   }
@@ -286,9 +257,9 @@ public class AlignViewport extends AlignmentViewport implements
     antiAlias = Cache.getDefault("ANTI_ALIAS", false);
 
     showJVSuffix = Cache.getDefault("SHOW_JVSUFFIX", true);
-    showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true);
+    setShowAnnotation(Cache.getDefault("SHOW_ANNOTATIONS", true));
 
-    rightAlignIds = Cache.getDefault("RIGHT_ALIGN_IDS", false);
+    setRightAlignIds(Cache.getDefault("RIGHT_ALIGN_IDS", false));
     centreColumnLabels = Cache.getDefault("CENTRE_COLUMN_LABELS", false);
     autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);
 
@@ -368,22 +339,6 @@ public class AlignViewport extends AlignmentViewport implements
   }
 
   /**
-   * set the flag
-   * 
-   * @param b
-   *          features are displayed if true
-   */
-  public void setShowSequenceFeatures(boolean b)
-  {
-    showSequenceFeatures = b;
-  }
-
-  public boolean getShowSequenceFeatures()
-  {
-    return showSequenceFeatures;
-  }
-
-  /**
    * centre columnar annotation labels in displayed alignment annotation TODO:
    * add to jalviewXML and annotation display settings
    */
@@ -837,27 +792,6 @@ public class AlignViewport extends AlignmentViewport implements
    * 
    * @return DOCUMENT ME!
    */
-  public boolean getShowAnnotation()
-  {
-    return showAnnotation;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param b
-   *          DOCUMENT ME!
-   */
-  public void setShowAnnotation(boolean b)
-  {
-    showAnnotation = b;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
   public boolean getScaleAboveWrapped()
   {
     return scaleAboveWrapped;
@@ -1057,23 +991,6 @@ public class AlignViewport extends AlignmentViewport implements
     shownpfeats = show;
   }
 
-  /**
-   * 
-   * @return true if view has hidden rows
-   */
-  public boolean hasHiddenRows()
-  {
-    return hasHiddenRows;
-  }
-
-  /**
-   * 
-   * @return true if view has hidden columns
-   */
-  public boolean hasHiddenColumns()
-  {
-    return hasHiddenColumns;
-  }
 
   /**
    * when set, view will scroll to show the highlighted position
@@ -1101,8 +1018,6 @@ public class AlignViewport extends AlignmentViewport implements
     return followSelection;
   }
 
-  boolean showSeqFeaturesHeight;
-
   public void sendSelection()
   {
     jalview.structure.StructureSelectionManager
@@ -1111,16 +1026,6 @@ public class AlignViewport extends AlignmentViewport implements
                     new ColumnSelection(getColumnSelection()), this);
   }
 
-  public void setShowSequenceFeaturesHeight(boolean selected)
-  {
-    showSeqFeaturesHeight = selected;
-  }
-
-  public boolean getShowSequenceFeaturesHeight()
-  {
-    return showSeqFeaturesHeight;
-  }
-
   /**
    * return the alignPanel containing the given viewport. Use this to get the
    * components currently handling the given viewport.
@@ -1274,16 +1179,6 @@ public class AlignViewport extends AlignmentViewport implements
     }
   }
 
-
-  public Hashtable getFeaturesDisplayed()
-  {
-    return featuresDisplayed;
-  }
-
-  public void setFeaturesDisplayed(Hashtable featuresDisplayed)
-  {
-    this.featuresDisplayed = featuresDisplayed;
-  }
   protected SequenceAnnotationOrder getSortAnnotationsBy()
   {
     return sortAnnotationsBy;
@@ -1303,4 +1198,15 @@ public class AlignViewport extends AlignmentViewport implements
   {
     this.showAutocalculatedAbove = showAutocalculatedAbove;
   }
+
+  public AnnotationColumnChooser getAnnotationColumnSelectionState()
+  {
+    return annotationColumnSelectionState;
+  }
+
+  public void setAnnotationColumnSelectionState(
+          AnnotationColumnChooser currentAnnotationColumnSelectionState)
+  {
+    this.annotationColumnSelectionState = currentAnnotationColumnSelectionState;
+  }
 }