refactored VamsasListener to allow the source of the event to be passed to handlers
[jalview.git] / src / jalview / appletgui / AlignViewport.java
index ed61bc5..0dc60d1 100755 (executable)
@@ -26,8 +26,9 @@ import jalview.bin.*;
 import jalview.datamodel.*;
 import jalview.schemes.*;
 import jalview.structure.SelectionSource;
+import jalview.structure.VamsasSource;
 
-public class AlignViewport implements SelectionSource
+public class AlignViewport implements SelectionSource, VamsasSource
 {
   int startRes;
 
@@ -130,7 +131,7 @@ public class AlignViewport implements SelectionSource
 
   boolean ignoreGapsInConsensusCalculation = false;
 
-  jalview.bin.JalviewLite applet;
+  public jalview.bin.JalviewLite applet;
 
   Hashtable sequenceColours;
 
@@ -257,7 +258,11 @@ public class AlignViewport implements SelectionSource
       {
         sortByTree = Boolean.valueOf(param).booleanValue();
       }
-
+      param = applet.getParameter("automaticScrolling");
+      if (param!=null) {
+        followHighlight = Boolean.valueOf(param).booleanValue();
+        followSelection = followHighlight;
+      }
     }
 
     if (applet != null)