JAL-966 allow access to viewport interface from alignPanel
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 18:14:44 +0000 (18:14 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 18:14:44 +0000 (18:14 +0000)
src/jalview/api/AlignmentViewPanel.java
src/jalview/appletgui/AlignmentPanel.java
src/jalview/gui/AlignmentPanel.java

index a68c1f6..ae9399d 100644 (file)
@@ -32,6 +32,8 @@ import jalview.structure.StructureSelectionManager;
 public interface AlignmentViewPanel extends OOMHandlerI
 {
 
+  AlignViewportI getAlignViewport();
+
   AlignmentI getAlignment();
 
   StructureSelectionManager getStructureSelectionManager();
index 05d4948..61e8f12 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.appletgui;
 
+import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SearchResults;
@@ -153,6 +154,11 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
     });
   }
 
+  @Override
+  public AlignViewportI getAlignViewport()
+  {
+    return av;
+  }
   public SequenceRenderer getSequenceRenderer()
   {
     return seqPanel.seqCanvas.sr;
index add0460..e638cc0 100644 (file)
@@ -21,6 +21,7 @@
 package jalview.gui;
 
 import jalview.analysis.AnnotationSorter;
+import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentI;
@@ -144,6 +145,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
   }
 
+  @Override
+  public AlignViewportI getAlignViewport()
+  {
+    return av;
+  }
   public void alignmentChanged()
   {
     av.alignmentChanged(this);