X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;h=957fb96724c7ca3232a240a9afd11b6547d19ead;hb=1cec732f963ab102c9d8381203df8c8cba2a9ee4;hp=2a972e364dbf18338865ac69ee2405ff80156a90;hpb=26ee59562604fa9164e895e3ca07e11398a6c8a0;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 2a972e3..957fb96 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -864,7 +864,7 @@ public class Desktop extends GDesktop final JInternalFrame frame, String title, int w, int h, boolean resizable) { - addInternalFrame(frame, title, true, w, h, resizable, false); + addInternalFrame(frame, title, true, w, h, resizable, false, null); } /** @@ -887,15 +887,51 @@ public class Desktop extends GDesktop * Do not set the default minimum size for frame */ public static synchronized void addInternalFrame( + JInternalFrame frame, String title, boolean makeVisible, int w, + int h, boolean resizable, boolean ignoreMinSize) + { + addInternalFrame(frame, title, makeVisible, w, h, resizable, + ignoreMinSize, null); + } + + /** + * 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 + * @param ignoreMinSize + * Do not set the default minimum size for frame + * @param name + * for HTML div embedding + */ + public static synchronized void addInternalFrame( final JInternalFrame frame, String title, boolean makeVisible, - int w, int h, boolean resizable, boolean ignoreMinSize) + int w, int h, boolean resizable, boolean ignoreMinSize, + String name) { + // TODO: allow callers to determine X and Y position of frame (eg. via // bounds object). // TODO: consider fixing method to update entries in the window submenu with // the current window title + if (name != null) + { + frame.setName(Jalview.getAppID(name)); + } + frame.setTitle(title); if (frame.getWidth() < 1 || frame.getHeight() < 1) {