JAL-2349 JAL-4134 Console log messages for contact matrix selection
[jalview.git] / src / jalview / gui / OverviewPanel.java
index 9cfda3a..872d142 100755 (executable)
@@ -413,7 +413,9 @@ public class OverviewPanel extends JPanel
        * close the parent frame (which also removes it from the
        * Desktop Windows menu)
        */
-      internalFrame.setClosed(true);
+      ((JInternalFrame) SwingUtilities
+              .getAncestorOfClass(JInternalFrame.class, (this)))
+                      .setClosed(true);
     } catch (PropertyVetoException e)
     {
       // ignore
@@ -459,27 +461,33 @@ public class OverviewPanel extends JPanel
   }
 
   /**
-   * Overridden to set the bounds of the frame holding the Overview panel
+   * Sets the bounds of the frame holding the Overview panel
    * 
    * @param xpos
    * @param ypos
    * @param width
    * @param height
    */
-  @Override
-  public void setBounds(int xpos, int ypos, int width, int height)
+  public void setFrameBounds(int xpos, int ypos, int width, int height)
   {
     internalFrame.setBounds(xpos, ypos, width, height);
   }
 
   /**
-   * Overridden to return the bounds of the enclosing frame
+   * Returns the bounds of the enclosing frame
    * 
    * @return
    */
-  @Override
-  public Rectangle getBounds()
+  public Rectangle getFrameBounds()
   {
     return internalFrame.getBounds();
   }
+
+  /**
+   * Closes the frame containing the overview panel
+   */
+  public void close()
+  {
+    internalFrame.dispose();
+  }
 }