|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.dialog.support.DialogPageUtils
public class DialogPageUtils
Useful methods for working with DialogPage
s. These methods make it easier to
place dialog pages in arbitrary containers, wire in message listeners, wire actions
to the page complete status, etc.
These helpers can be used to quickly construct a standard layout (like that found in
the TitledPageApplicationDialog
, or you can use these methods to construct the
various components (title area and button bar) and then lay things out as you like.
The standard layout is obtained using the
createStandardView(DialogPage, ActionCommand, ActionCommand)
or
createStandardView(DialogPage, Object[])
methods. To create the pieces and do
the layout independently, use createTitlePane(DialogPage)
to get the title
pane and wire your OK command into the page complete status using
adaptPageCompletetoGuarded(DialogPage, Guarded)
. If you don't want to use the
standard title pane, you can easily arrange for the messages coming from the dialog
page to be sent to a Messagable
of your choice using
addMessageMonitor(DialogPage, Messagable)
.
Nested Class Summary | |
---|---|
protected static class |
DialogPageUtils.PageCompleteAdapter
Internal class to handle the PAGE_COMPLETE property changes in the dialog page and adapt them to operations on a Guarded object. |
Constructor Summary | |
---|---|
DialogPageUtils()
|
Method Summary | |
---|---|
static void |
adaptPageCompletetoGuarded(DialogPage dialogPage,
Guarded guarded)
Create an adapter that will monitor the page complete status of the dialog page and adapt it to operations on the provided Guarded object. |
static void |
addMessageMonitor(DialogPage dialogPage,
Messagable monitor)
Add a message monitor. |
static JComponent |
createButtonBar(Object[] groupMembers)
Return a standardized row of command buttons. |
static JComponent |
createStandardView(DialogPage dialogPage,
ActionCommand okCommand,
ActionCommand cancelCommand)
Construct a complete standard layout for a dialog page. |
static JComponent |
createStandardView(DialogPage dialogPage,
Object[] commandGroupMembers)
Construct a complete standard layout for a dialog page. |
static TitlePane |
createTitlePane(DialogPage dialogPage)
Create a standard TitlePane wired to receive messages from the given dialog
page. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DialogPageUtils()
Method Detail |
---|
public static TitlePane createTitlePane(DialogPage dialogPage)
TitlePane
wired to receive messages from the given dialog
page. The title pane will also be configured from the dialog page's title and icon.
dialogPage
- to processpublic static JComponent createStandardView(DialogPage dialogPage, ActionCommand okCommand, ActionCommand cancelCommand)
dialogPage
- to processokCommand
- Action command to wire into dialogPage's page complete statuscancelCommand
- to add to the command button bar
createTitlePane(DialogPage)
,
adaptPageCompletetoGuarded(DialogPage, Guarded)
public static JComponent createStandardView(DialogPage dialogPage, Object[] commandGroupMembers)
dialogPage
- to processcommandGroupMembers
- Array of commands to place in the button bar
createTitlePane(DialogPage)
,
adaptPageCompletetoGuarded(DialogPage, Guarded)
public static JComponent createButtonBar(Object[] groupMembers)
groupMembers
-
public static void addMessageMonitor(DialogPage dialogPage, Messagable monitor)
Messagable.setMessage(Message)
method called whenever the MESSAGE property
on the dialog page changes.
dialogPage
- to monitormonitor
- to addpublic static void adaptPageCompletetoGuarded(DialogPage dialogPage, Guarded guarded)
dialogPage
- to monitorguarded
- object to adapt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |