new alignmentPanel api + JAL-777/JAL-641 debugging
authorjprocter <Jim Procter>
Fri, 18 Feb 2011 17:33:30 +0000 (17:33 +0000)
committerjprocter <Jim Procter>
Fri, 18 Feb 2011 17:33:30 +0000 (17:33 +0000)
src/jalview/gui/AlignmentPanel.java

index e60424e..90c5aff 100755 (executable)
@@ -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);
+    } 
+  }
 }