|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.Window
public class Window
A top-level window.
Field Summary | |
---|---|
static int |
DISPOSE_ON_CLOSE
A value for the DefaultCloseOperation property that indicates the window should be disposed when a user clicks its close button. |
static int |
DO_NOTHING_ON_CLOSE
A value for the DefaultCloseOperation property that indicates the window should not take any action when closed. |
static java.lang.String |
HEIGHT_CHANGED_PROPERTY
|
static int |
HIDE_ON_CLOSE
A value for the DefaultCloseOperation property that indicates the window should be hidden when a user clicks its close button. |
static int |
SIZE_UNKNOWN
Deprecated. Use EchoConstants.UNDEFINED_SIZE. |
static java.lang.String |
STYLE_DEFAULT_CLOSE_OPERATION
A style constant for the DefaultCloseOperation property. |
static java.lang.String |
STYLE_HEIGHT
A style constant for the Height property. |
static java.lang.String |
STYLE_WIDTH
A style constant for the Width property. |
static java.lang.String |
TITLE_CHANGED_PROPERTY
|
static java.lang.String |
WIDTH_CHANGED_PROPERTY
|
static java.lang.String |
Z_INDEX_CHANGED_PROPERTY
|
Constructor Summary | |
---|---|
Window()
Creates a Window. |
|
Window(java.lang.String title)
Creates a Window with the specified title. |
Method Summary | |
---|---|
void |
add(Component c,
int index)
Adds the specified Component as the nth child All component add operations use this method to add components. |
void |
addWindowListener(WindowListener l)
Adds a WindowListener to the window. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
void |
dispose()
Destroys the window. |
AbstractPane |
getContent()
Returns the content of this Window. |
int |
getDefaultCloseOperation()
Returns the operation that will happen by default if the user closes the window. |
EchoInstance |
getEchoInstance()
Returns the EchoInstance object to which this window belongs. |
int |
getHeight()
Returns the height of the window. |
java.util.Locale |
getLocale()
Overrides Component.getLocale() such that the applciation's locale is returned if this Window's locale is not set. |
java.lang.String |
getTitle()
Returns the window title. |
int |
getWidth()
Returns the width of the window. |
void |
removeWindowListener(WindowListener l)
Removes a WindowListener from the window. |
void |
setContent(AbstractPane newValue)
Sets the content of the window. |
void |
setDefaultCloseOperation(int defaultCloseOperation)
Sets the operation that will happen by default if the user closes the window. |
void |
setHeight(int newValue)
Sets the height of the window. |
void |
setTitle(java.lang.String newValue)
Sets the window title. |
void |
setWidth(int newValue)
Sets the width of the window. |
void |
toBack()
Brings the window to the back, such that it is obscured by any other browser windows. |
void |
toFront()
Brings the window to the front, such that it is not obscured by any other browser windows. |
void |
userClose()
Informs the window that the user has attempted to close it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STYLE_DEFAULT_CLOSE_OPERATION
public static final java.lang.String STYLE_HEIGHT
public static final java.lang.String STYLE_WIDTH
public static final int SIZE_UNKNOWN
public static final int DO_NOTHING_ON_CLOSE
WindowListeners
take no action, the window will remain open.
- See Also:
- Constant Field Values
public static final int HIDE_ON_CLOSE
public static final int DISPOSE_ON_CLOSE
public static final java.lang.String HEIGHT_CHANGED_PROPERTY
public static final java.lang.String WIDTH_CHANGED_PROPERTY
public static final java.lang.String TITLE_CHANGED_PROPERTY
public static final java.lang.String Z_INDEX_CHANGED_PROPERTY
Constructor Detail |
---|
public Window()
public Window(java.lang.String title)
title
- The window title.Method Detail |
---|
public void add(Component c, int index)
Component
add
in interface Component
add
in class AbstractComponent
c
- The child component to add.index
- The index at which to add the child component, or -1 to add
the component at the end.Component.add(Component, int)
public void addWindowListener(WindowListener l)
WindowListener
to the window.
l
- The WindowListener
to be added.public void applyStyle(Style style)
Component
Style
object. The version of this method in Component
will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle
in interface Component
applyStyle
in class AbstractComponent
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public void dispose()
public final AbstractPane getContent()
public EchoInstance getEchoInstance()
getEchoInstance
in interface Component
getEchoInstance
in class AbstractComponent
public int getHeight()
public java.util.Locale getLocale()
getLocale
in interface Component
getLocale
in class AbstractComponent
public int getDefaultCloseOperation()
DO_NOTHING_ON_CLOSE
: Do not dispose or hide the
window. Instead, registered window listeners should handle
the closing of the window if necessary in the
windowClosing() method.HIDE_ON_CLOSE
: Hide the window.DISPOSE_ON_CLOSE
: Dispose of the window.public java.lang.String getTitle()
public int getWidth()
public void toBack()
public void toFront()
public void removeWindowListener(WindowListener l)
WindowListener
from the window.
l
- The WindowListener
to be removed.public final void setContent(AbstractPane newValue)
newValue
- a ContainerPane or ContentPane that holds content.public void setDefaultCloseOperation(int defaultCloseOperation)
defaultCloseOperation
- The default close operation, one of the
following values:
DO_NOTHING_ON_CLOSE
: Do not dispose or hide the
window. Instead, registered window listeners should handle
the closing of the window if necessary in the
windowClosing() method.HIDE_ON_CLOSE
: Hide the window.DISPOSE_ON_CLOSE
: Dispose of the window.public void setHeight(int newValue)
newValue
- The inside height of the window, in pixels.public void setTitle(java.lang.String newValue)
newValue
- The title of the window.public void setWidth(int newValue)
newValue
- The inside width of the window, in pixels.public void userClose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |