fix scrolltoposition behaviour and new alignmentPanel api
authorjprocter <Jim Procter>
Fri, 18 Feb 2011 17:31:29 +0000 (17:31 +0000)
committerjprocter <Jim Procter>
Fri, 18 Feb 2011 17:31:29 +0000 (17:31 +0000)
src/jalview/appletgui/AlignmentPanel.java

index c466b86..b275547 100755 (executable)
@@ -22,9 +22,10 @@ import java.awt.event.*;
 import java.util.Hashtable;
 import java.util.Vector;
 
+import jalview.api.AlignmentViewPanel;
 import jalview.datamodel.*;
 
-public class AlignmentPanel extends Panel implements AdjustmentListener
+public class AlignmentPanel extends Panel implements AdjustmentListener, AlignmentViewPanel
 {
 
   public AlignViewport av;
@@ -272,7 +273,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener
         return false;
       }
       SequenceI seq = av.alignment.getSequenceAt(seqIndex);
-      int[] r = results.getResults(seq, seq.getStart(), seq.getEnd());
+      int[] r = results.getResults(seq, 0,av.alignment.getWidth());
       if (r == null)
       {
         if (av.applet.debug) {// DEBUG
@@ -890,4 +891,10 @@ public class AlignmentPanel extends Panel implements AdjustmentListener
     alabels.setScrollOffset(apvscroll.getValue());
   }
 
+  @Override
+  public AlignmentI getAlignment()
+  {
+    return av.alignment;
+  }
+
 }