merge commit
[jalview.git] / src / jalview / gui / AlignViewport.java
index d331e82..0b3fa70 100644 (file)
@@ -42,6 +42,7 @@ import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.analysis.NJTree;
 import jalview.api.AlignViewportI;
 import jalview.bin.Cache;
+import jalview.commands.CommandI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.Annotation;
@@ -130,7 +131,7 @@ public class AlignViewport extends AlignmentViewport implements
    * Keys are the feature types which are currently visible. Note: Values are
    * not used!
    */
-  Hashtable featuresDisplayed = null;
+  private Hashtable featuresDisplayed = null;
 
   boolean antiAlias = false;
 
@@ -140,9 +141,9 @@ public class AlignViewport extends AlignmentViewport implements
 
   boolean gatherViewsHere = false;
 
-  Stack historyList = new Stack();
+  Stack<CommandI> historyList = new Stack<CommandI>();
 
-  Stack redoList = new Stack();
+  Stack<CommandI> redoList = new Stack<CommandI>();
 
   int thresholdTextColour = 0;
 
@@ -366,9 +367,10 @@ public class AlignViewport extends AlignmentViewport implements
     sortByTree = Cache.getDefault("SORT_BY_TREE", false);
     followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true);
     sortAnnotationsBy = SequenceAnnotationOrder.valueOf(Cache.getDefault(
-            "SORT_ANNOTATIONS", SequenceAnnotationOrder.NONE.name()));
-    showAutocalculatedAbove = Cache
-            .getDefault("SHOW_AUTOCALC_ABOVE", false);
+            Preferences.SORT_ANNOTATIONS,
+            SequenceAnnotationOrder.NONE.name()));
+    showAutocalculatedAbove = Cache.getDefault(
+            Preferences.SHOW_AUTOCALC_ABOVE, false);
   }
 
   /**
@@ -1278,6 +1280,16 @@ public class AlignViewport extends AlignmentViewport implements
     }
   }
 
+
+  public Hashtable getFeaturesDisplayed()
+  {
+    return featuresDisplayed;
+  }
+
+  public void setFeaturesDisplayed(Hashtable featuresDisplayed)
+  {
+    this.featuresDisplayed = featuresDisplayed;
+  }
   protected SequenceAnnotationOrder getSortAnnotationsBy()
   {
     return sortAnnotationsBy;