|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface which defines the function that standalone windows
and dialogs in the UI framework must be capable of supporting.
A WindowManager
can display or hide its window,
and must be capable of cascading its window
relative to other windows on the screen.
PanelManager
,
PropertySheetManager
,
WizardManager
Field Summary | |
static int |
OFFSET_FROM_OWNER
Number of pixels by which a modal dialog should be offset from its owner. |
Method Summary | |
void |
addCancelListener(java.awt.event.ActionListener listener)
Adds an ActionListener which is notified when
the user cancels out of a window. |
void |
addCancelListener(java.lang.Object listener)
|
void |
addCommitListener(java.awt.event.ActionListener listener)
Adds an ActionListener which is notified when
commit processing is complete. |
void |
addCommitListener(java.lang.Object listener)
|
void |
dispose()
Closes the panel and releases all resources used by the panel and its associated UI components. |
WindowManager |
getOwnerManager()
Returns the WindowManager in relation to which
the receiver has been set modal, or null if the receiver is not
modal relative to another window. |
java.awt.Window |
getWindow()
Returns the window being managed by this WindowManager . |
void |
handleDataException(IllegalUserDataException ex)
Provides the default handling for an IllegalUserDataException . |
boolean |
isVisible()
Determines whether the window being managed by this WindowManager is currently visible. |
void |
setModalRelativeTo(WindowManager mgr)
Sets the location of the window being managed relative to a window managed by the specified WindowManager . |
void |
setVisible(boolean show)
Shows or hides the window being managed by this WindowManager , depending on the value of parameter show . |
Field Detail |
public static final int OFFSET_FROM_OWNER
Method Detail |
public java.awt.Window getWindow()
WindowManager
.
The window may be an instance of either JDialog
or
JFrame
, depending on whether the main window
is modal or modeless.WindowManager
public void setModalRelativeTo(WindowManager mgr)
WindowManager
.
If the window is not currently showing, the window for this
WindowManager
is centered on the screen.mgr
- the WindowManager
managing the window
in relation to which this object's window location is determinedpublic WindowManager getOwnerManager()
WindowManager
in relation to which
the receiver has been set modal, or null if the receiver is not
modal relative to another window.WindowManager
managing the window
in relation to which this object's window location is determinedpublic void addCommitListener(java.awt.event.ActionListener listener)
ActionListener
which is notified when
commit processing is complete.
This facility is provided for modeless windows, so that the
application may learn when the window has closed.
The listener's actionPerformed
method will be called following
successful completion of commit processing on the window.
The ActionEvent
passed to the listener object will
have its action command string set to "COMMIT".
This method is not recommended for modal windows, since the
application will be blocked on the setVisible
call until the window is closed.
listener
- the instance of java.awt.event.ActionListener
to be notifiedpublic void addCommitListener(java.lang.Object listener)
public void addCancelListener(java.awt.event.ActionListener listener)
ActionListener
which is notified when
the user cancels out of a window.
This facility is provided for modeless windows, so that the
application may learn when the window has closed.
The listener's actionPerformed
method will be called when
the user cancels out of a window without committing any changes.
The ActionEvent
passed to the listener object will
have its action command string set to "CANCEL".
This method is not recommended for modal windows, since the
application will be blocked on the setVisible
call until the window is closed.
listener
- the instance of java.awt.event.ActionListener
to be notifiedpublic void addCancelListener(java.lang.Object listener)
public void dispose()
public void handleDataException(IllegalUserDataException ex)
IllegalUserDataException
.
If the exception message is non-null it will be displayed to the user in a
message box. After the message box is closed, focus is set to the component
identified in the exception object so that the user can change the data
to a valid value.
ex
- The IllegalUserDataException
for which
default handling is requested.public void setVisible(boolean show)
WindowManager
, depending on the value of parameter show
.
If the window is modal, the application will block on the call to setVisible
until the window has closed.show
- If true, shows the window; otherwise, hides the window.isVisible()
public boolean isVisible()
WindowManager
is currently visible.setVisible(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |