class Window
All Implemented Interfaces:
Allows for rendering a branch of the DOM of an application in a separate browser window.
Access instances of this class with the following methods in the
jsx3.app.Server class:
- createAppWindow()
- getAppWindow()
- loadAppWindow()
Since:
3.2
See Also:
| Field Summary |
|---|
| static String | Event subject: published after this window has received focus. |
| static String | Event subject: published after this window has successfully opened. |
| static String | Event subject: published after this window has been resized via user interaction. |
| static String | Event subject: published after this window's parent has closed. |
| static String | Event subject: published just before this window will close. |
| Constructor Summary |
|---|
| void | The instance initializer. |
| Method Summary |
|---|
| boolean | Closes the browser window of this window instance. |
| void | Ensures that this window is at least partially visible on the computer screen. |
| void | Focuses the browser window of this window instance. |
| int | Returns the inner (visible) height of this window. |
| int | Returns the current x-coordinate screen position of this browser window relative to the parent application window. |
| int | Returns the current y-coordinate screen position of this browser window relative to the parent application window. |
| jsx3.gui.Block | Returns the first DOM child of this window object. |
| String | Returns the title of this window. |
| int | Returns the inner (visible) width of this window. |
| int | Returns whether this window is "dependent. |
| boolean | Returns whether the browser window of this window instance is open. |
| boolean | Returns whether the parent application window of this window instance is open. |
| int | Returns whether this window is resizable via user interaction. |
| int | Returns whether this window will show scroll bars if the content outgrows the window. |
| void | Moves the browser window of this window instance to a position on the screen. |
| boolean | Opens the browser window of this window instance. |
| String | Repaints the root block of this window. |
| void | Sets whether this window is "dependent. |
| void | Sets the inner (visible) height of this window. |
| void | Sets whether this window is resizable via user interaction. |
| void | Sets whether this window will show scroll bars if the content outgrows the window. |
| void | Sets the title of the window. |
| void | Sets the inner (visible) width of this window. |
| String | |
| Methods Inherited From jsx3.app.Model |
|---|
| adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toXML, toXMLDoc |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
Event subject: published after this window has received focus.
Event subject: published after this window has successfully opened.
static final
String DID_RESIZE
Event subject: published after this window has been resized via user interaction.
static final
String PARENT_DID_CLOSE
Event subject: published after this window's parent has closed.
static final
String WILL_CLOSE
Event subject: published just before this window will close.
The instance initializer.
Parameters:
strName – a unique name for this window.
Closes the browser window of this window instance.
Throws:
Returns:
true if the window successfully closed or false if it didn't close
because of JavaScript security constraints or user interaction.
void constrainToScreen()
Ensures that this window is at least partially visible on the computer screen.
void focus()
Focuses the browser window of this window instance.
Throws:
Returns the inner (visible) height of this window. This does not include the border and padding that the
browser may render around the window content.
Returns:
Returns the current x-coordinate screen position of this browser window relative to the parent application window.
If the parent window is no longer open, this method returns the position relative to the upper-left
corner of the screen.
Throws:
Returns:
Returns the current y-coordinate screen position of this browser window relative to the parent application window.
If the parent window is no longer open, this method returns the position relative to the upper-left
corner of the screen.
Throws:
Returns:
Returns the first DOM child of this window object. If no child exists, this method creates a root block, adds it
to the DOM, and returns it. A window will only render its first DOM child.
Returns:
Returns the title of this window.
Returns:
Returns the inner (visible) width of this window. This does not include the border and padding that the
browser may render around the window content.
Returns:
Returns whether this window is "dependent." Dependent windows close automatically when their parents close. If
a window is not dependent, it will stay open after the parent window closes. Note that the parent window contains
all the JavaScript code and so it is very likely that interacting with a window after the parent has closed
will raise errors.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE.
Returns whether the browser window of this window instance is open.
Returns:
true if the window is open.
Returns whether the parent application window of this window instance is open.
Returns:
true if the parent window is open.
Returns whether this window is resizable via user interaction. The value returned by this method will reflect
the last value passed to setResizable() and therefore may not truly reflect the current state of the
browser window.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE.
Returns whether this window will show scroll bars if the content outgrows the window. The value returned by
this method will reflect the last value passed to setScrollable() and therefore may not truly
reflect the current state of the browser window.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE.
void moveTo(intOffsetLeft
: int, intOffsetTop
: int)
Moves the browser window of this window instance to a position on the screen. The arguments specify the
offset from the parent application window. If the parent window is no longer open, this window will be moved
relative to the upper-left corner of the screen.
Parameters:
intOffsetLeft – the left offset from the parent window.
intOffsetTop – the top offset from the parent window.
Throws:
Opens the browser window of this window instance. Depending on security settings and popup blockers,
this method may or may not actually open a window. The only safe way to determine whether the window
successfully opened is to register for the DID_OPEN event.
Throws:
Returns:
true if the window successfully opened (probably).
Repaints the root block of this window.
Returns:
void setDependent(bDependent
: boolean)
Sets whether this window is "dependent." This method not affect a currently-open window.
Parameters:
See Also:
void setHeight(intHeight
: int)
Sets the inner (visible) height of this window. If the window is currently open, the window will be resized
immediately.
Parameters:
intHeight – the inner height of the window in pixels.
void setResizable(bResizable
: boolean)
Sets whether this window is resizable via user interaction. This method will not affect a currently-open window.
Parameters:
void setScrollable(bScrollable
: boolean)
Sets whether this window will show scroll bars if the content outgrows the window. This method will not affect a
currently-open window.
Parameters:
void setTitle(strTitle
: String)
Sets the title of the window. The title is displayed in the title bar of the browser window. If the window is
currently open, the title will be updated immediately.
Parameters:
strTitle – the title of the window.
void setWidth(intWidth
: int)
Sets the inner (visible) width of this window. If the window is currently open, the window will be resized
immediately.
Parameters:
intWidth – the inner width of the window in pixels.
Parameters:
Returns:
Overrides:
Copyright © 2001-2007, TIBCO Software Inc.