X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FOverviewPanel.java;h=872d142f3b552d475210909f127cdbcc9b3c574c;hb=9fef0746bf53cc0faff2bd45f1dbdb82398f4c62;hp=9cfda3a6026c3ec1893fddca07200aad27b74f72;hpb=8df2de111af18978bb5254650cab7ba28bc84e82;p=jalview.git diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 9cfda3a..872d142 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -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(); + } }