|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface WindowManager
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| Modifier and Type | Field and Description |
|---|---|
static int |
OFFSET_FROM_OWNER
Number of pixels by which a modal dialog should be offset from its owner. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCancelListener(ActionListener listener)
Adds an ActionListener which is notified when
the user cancels out of a window. |
void |
addCancelListener(Object listener)
|
void |
addCommitListener(ActionListener listener)
Adds an ActionListener which is notified when
commit processing is complete. |
void |
addCommitListener(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. |
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 |
|---|
static final int OFFSET_FROM_OWNER
| Method Detail |
|---|
Window getWindow()
WindowManager.
The window may be an instance of either JDialog or
JFrame, depending on whether the main window
is modal or modeless.
WindowManagervoid 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 determinedWindowManager 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 determinedvoid addCommitListener(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 notifiedvoid addCommitListener(Object listener)
void addCancelListener(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 notifiedvoid addCancelListener(Object listener)
void dispose()
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.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()boolean isVisible()
WindowManager is currently visible.
setVisible(boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||