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);
}
/**
* 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)
{