From bdbd030ecb0781532bb96124411705d7b29929db Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 2 Feb 2015 18:14:44 +0000 Subject: [PATCH] JAL-966 allow access to viewport interface from alignPanel --- src/jalview/api/AlignmentViewPanel.java | 2 ++ src/jalview/appletgui/AlignmentPanel.java | 6 ++++++ src/jalview/gui/AlignmentPanel.java | 6 ++++++ 3 files changed, 14 insertions(+) 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); -- 1.7.10.2