From de3b591d3aea3bc27d5a6ce092f051d99c5acd34 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Feb 2011 17:33:30 +0000 Subject: [PATCH] new alignmentPanel api + JAL-777/JAL-641 debugging --- src/jalview/gui/AlignmentPanel.java | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index e60424e..90c5aff 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -27,6 +27,7 @@ import java.awt.event.*; import java.awt.print.*; import javax.swing.*; +import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; import jalview.datamodel.*; import jalview.jbgui.*; @@ -40,7 +41,7 @@ import jalview.structure.SelectionSource; * @version $Revision$ */ public class AlignmentPanel extends GAlignmentPanel implements - AdjustmentListener, Printable + AdjustmentListener, Printable, AlignmentViewPanel { public AlignViewport av; @@ -1401,4 +1402,35 @@ public class AlignmentPanel extends GAlignmentPanel implements oldrfs.clear(); adjustAnnotationHeight(); } + + @Override + public AlignmentI getAlignment() + { + return av.alignment; + } + + /** + * get the name for this view + * @return + */ + public String getViewName() + { + return av.viewName; + } + + /** + * Make/Unmake this alignment panel the current input focus + * @param b + */ + public void setSelected(boolean b) + { + try { + alignFrame.setSelected(b); + } catch (Exception ex) {}; + + if (b) + { + alignFrame.setDisplayedView(this); + } + } } -- 1.7.10.2