refactor to allow distinct StructureSelectionManager instances for
[jalview.git] / src / jalview / appletgui / SeqPanel.java
old mode 100755 (executable)
new mode 100644 (file)
index 29164bb..ade0afd
@@ -91,7 +91,7 @@ public class SeqPanel extends Panel implements MouseMotionListener,
 
     seqCanvas.addMouseMotionListener(this);
     seqCanvas.addMouseListener(this);
-    ssm = StructureSelectionManager.getStructureSelectionManager();
+    ssm = StructureSelectionManager.getStructureSelectionManager(av.applet);
     ssm.addStructureViewerListener(this);
 
     seqCanvas.repaint();
@@ -1779,4 +1779,17 @@ public class SeqPanel extends Panel implements MouseMotionListener,
     }
   }
 
+  /**
+   * scroll to the given row/column - or nearest visible location
+   * @param row
+   * @param column
+   */
+  public void scrollTo(int row, int column)
+  {
+    
+    row = row<0 ? ap.av.startSeq : row;
+    column = column<0 ? ap.av.startRes : column;
+    ap.scrollTo(row, row, column, true, true);
+  }
+
 }