Merge remote-tracking branch 'origin/merge/JAL-845_JAL-1640' into
[jalview.git] / src / jalview / gui / SplitFrame.java
index ab4596e..486db47 100644 (file)
@@ -5,9 +5,6 @@ import jalview.jbgui.GSplitFrame;
 import jalview.structure.StructureSelectionManager;
 
 import java.awt.Component;
-import java.awt.MouseInfo;
-import java.awt.Point;
-import java.awt.Rectangle;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -165,33 +162,6 @@ public class SplitFrame extends GSplitFrame
   }
 
   /**
-   * Returns the split pane component the mouse is in, or null if neither.
-   * 
-   * @return
-   */
-  protected GAlignFrame getFrameAtMouse()
-  {
-    Point loc = MouseInfo.getPointerInfo().getLocation();
-    
-    if (isIn(loc, getTopFrame()))
-    {
-      return getTopFrame();
-    }
-    else if (isIn(loc, getBottomFrame()))
-    {
-      return getBottomFrame();
-    }
-    return null;
-  }
-
-  private boolean isIn(Point loc, JComponent comp)
-  {
-    Point p = comp.getLocationOnScreen();
-    Rectangle r = new Rectangle(p.x, p.y, comp.getWidth(), comp.getHeight());
-    return r.contains(loc);
-  }
-
-  /**
    * Set key bindings (recommended for Swing over key accelerators).
    */
   private void addKeyBindings()
@@ -324,10 +294,13 @@ public class SplitFrame extends GSplitFrame
    * Note this is _not_ multiple tabs, each hosting a split pane view, rather it
    * is a single split pane with each split holding multiple tabs which are
    * linked in pairs.
+   * <p>
+   * TODO implement instead with a tabbed holder in the SplitView, each tab
+   * holding a single JSplitPane. Would avoid a duplicated tab, at the cost of
+   * some additional coding.
    */
   protected void newView_actionPerformed()
   {
-    System.out.println("newView " + this.hashCode());
     AlignFrame topFrame = (AlignFrame) getTopFrame();
     AlignFrame bottomFrame = (AlignFrame) getBottomFrame();