From: Jim Procter Date: Mon, 2 Feb 2015 18:14:44 +0000 (+0000) Subject: JAL-966 allow access to viewport interface from alignPanel X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bdbd030ecb0781532bb96124411705d7b29929db;p=jalview.git JAL-966 allow access to viewport interface from alignPanel --- diff --git a/src/jalview/api/AlignmentViewPanel.java b/src/jalview/api/AlignmentViewPanel.java index a68c1f6..ae9399d 100644 --- a/src/jalview/api/AlignmentViewPanel.java +++ b/src/jalview/api/AlignmentViewPanel.java @@ -32,6 +32,8 @@ import jalview.structure.StructureSelectionManager; public interface AlignmentViewPanel extends OOMHandlerI { + AlignViewportI getAlignViewport(); + AlignmentI getAlignment(); StructureSelectionManager getStructureSelectionManager(); diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 05d4948..61e8f12 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -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; diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index add0460..e638cc0 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -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);