X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;fp=src%2Fjalview%2Fgui%2FDesktop.java;h=b8f629abd777405ca4f25b48237a1d6293183f99;hb=9702a30021c1387018378b61948b639358213942;hp=fea381dc745f053d3a44f7014e7a2391591d57d7;hpb=6940b5ac884139626e962201ae00c56c66d18039;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index fea381d..b8f629a 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -631,38 +631,85 @@ public class Desktop extends jalview.jbgui.GDesktop implements * Adds and opens the given frame to the desktop * * @param frame - * DOCUMENT ME! + * Frame to show * @param title - * DOCUMENT ME! + * Visible Title * @param w - * DOCUMENT ME! + * width * @param h - * DOCUMENT ME! + * height */ public static synchronized void addInternalFrame( final JInternalFrame frame, String title, int w, int h) { - addInternalFrame(frame, title, w, h, true); + addInternalFrame(frame, title, true, w, h, true); } + /** - * DOCUMENT ME! + * Add an internal frame to the Jalview desktop * * @param frame - * DOCUMENT ME! + * Frame to show * @param title - * DOCUMENT ME! + * Visible Title + * @param makeVisible + * When true, display frame immediately, otherwise, caller must call + * setVisible themselves. * @param w - * DOCUMENT ME! + * width * @param h - * DOCUMENT ME! + * height + */ + public static synchronized void addInternalFrame( + final JInternalFrame frame, String title, boolean makeVisible, + int w, int h) + { + addInternalFrame(frame, title, makeVisible, w, h, true); + } + + /** + * Add an internal frame to the Jalview desktop and make it visible + * + * @param frame + * Frame to show + * @param title + * Visible Title + * @param w + * width + * @param h + * height * @param resizable - * DOCUMENT ME! + * Allow resize */ public static synchronized void addInternalFrame( final JInternalFrame frame, String title, int w, int h, boolean resizable) { + addInternalFrame(frame, title, true, w, h, resizable); + } + + /** + * Add an internal frame to the Jalview desktop + * + * @param frame + * Frame to show + * @param title + * Visible Title + * @param makeVisible + * When true, display frame immediately, otherwise, caller must call + * setVisible themselves. + * @param w + * width + * @param h + * height + * @param resizable + * Allow resize + */ + public static synchronized void addInternalFrame( + final JInternalFrame frame, String title, boolean makeVisible, + int w, int h, boolean resizable) + { // TODO: allow callers to determine X and Y position of frame (eg. via // bounds object). @@ -687,7 +734,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements openFrameCount++; - frame.setVisible(true); + frame.setVisible(makeVisible); frame.setClosable(true); frame.setResizable(resizable); frame.setMaximizable(resizable);