|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.NotifyDescriptor org.openide.DialogDescriptor org.openide.WizardDescriptor
Implements a basic "wizard" GUI system. A list of wizard panels may be specified and these may be traversed at the proper times using the "Previous" and "Next" buttons (or "Finish" on the last one).
DialogDisplayer.createDialog(org.openide.DialogDescriptor)
,
Wizard Guidebook
(describes the set of properties controlling the display of wizard panels)Nested Class Summary | |
static class |
WizardDescriptor.ArrayIterator
Special iterator that works on an array of Panel s. |
static interface |
WizardDescriptor.AsynchronousInstantiatingIterator
Iterator for a wizard that needs to somehow instantiate new objects outside ATW queue. |
static interface |
WizardDescriptor.AsynchronousValidatingPanel
A special interface for panels that need to do additional asynchronous validation when Next or Finish button is clicked. |
static interface |
WizardDescriptor.FinishablePanel
A special interface for panel that needs to dynamically enabled Finish button. |
static interface |
WizardDescriptor.FinishPanel
Deprecated. 4.28 Use FinishablePanel instead. |
static interface |
WizardDescriptor.InstantiatingIterator
Iterator for a wizard that needs to somehow instantiate new objects. |
static interface |
WizardDescriptor.Iterator
Iterator on the sequence of panels. |
static interface |
WizardDescriptor.Panel
One wizard panel with a component on it. |
static interface |
WizardDescriptor.ValidatingPanel
A special interface for panels that need to do additional validation when Next or Finish button is clicked. |
Nested classes inherited from class org.openide.NotifyDescriptor |
NotifyDescriptor.Confirmation, NotifyDescriptor.Exception, NotifyDescriptor.InputLine, NotifyDescriptor.Message |
Field Summary | |
static Object |
FINISH_OPTION
"Finish" button option. |
static Object |
NEXT_OPTION
"Next" button option. |
static Object |
PREVIOUS_OPTION
"Previous" button option. |
Fields inherited from class org.openide.DialogDescriptor |
BOTTOM_ALIGN, DEFAULT_ALIGN, PROP_BUTTON_LISTENER, PROP_CLOSING_OPTIONS, PROP_HELP_CTX, PROP_LEAF, PROP_MODAL, PROP_OPTIONS_ALIGN, RIGHT_ALIGN |
Fields inherited from class org.openide.NotifyDescriptor |
CANCEL_OPTION, CLOSED_OPTION, DEFAULT_OPTION, ERROR_MESSAGE, INFORMATION_MESSAGE, NO_OPTION, OK_CANCEL_OPTION, OK_OPTION, PLAIN_MESSAGE, PROP_DETAIL, PROP_MESSAGE, PROP_MESSAGE_TYPE, PROP_OPTION_TYPE, PROP_OPTIONS, PROP_TITLE, PROP_VALID, PROP_VALUE, QUESTION_MESSAGE, WARNING_MESSAGE, YES_NO_CANCEL_OPTION, YES_NO_OPTION, YES_OPTION |
Constructor Summary | |
WizardDescriptor(WizardDescriptor.Iterator panels)
Create wizard for a sequence of panels, with settings defaulted to this . |
|
WizardDescriptor(WizardDescriptor.Iterator panels,
Object settings)
Create wizard for a sequence of panels, passing some settings to the panels. |
|
WizardDescriptor(WizardDescriptor.Panel[] wizardPanels)
Create a new wizard from a fixed list of panels with settings defaulted to this . |
|
WizardDescriptor(WizardDescriptor.Panel[] wizardPanels,
Object settings)
Create a new wizard from a fixed list of panels, passing some settings to the panels. |
Method Summary | |
Set |
getInstantiatedObjects()
Returns set of newly instantiated objects if the wizard has been correctly finished. |
Object |
getProperty(String name)
Getter for stored property. |
MessageFormat |
getTitleFormat()
Getter for current format to be used to format title. |
Object |
getValue()
Overriden to ensure that returned value is one of the XXX_OPTION constants. |
protected void |
initialize()
Initializes settings. |
void |
putProperty(String name,
Object value)
Allows Panels that use WizardDescriptor as settings object to store additional settings into it. |
void |
setAdditionalOptions(Object[] options)
Define an explicit description of the set of additional user-selectable options. |
void |
setClosingOptions(Object[] options)
Setter for list of options that close the dialog. |
void |
setHelpCtx(HelpCtx helpCtx)
Set new help context for this dialog descriptor. |
void |
setOptions(Object[] options)
Set options permitted by the wizard considered as a DialogDescriptor . |
void |
setPanels(WizardDescriptor.Iterator panels)
Set a different list of panels. |
void |
setTitleFormat(MessageFormat format)
Sets the message format to create title of the wizard. |
void |
setValue(Object value)
Overrides superclass method. |
protected void |
updateState()
Updates buttons to reflect the current state of the panels. |
Methods inherited from class org.openide.DialogDescriptor |
getButtonListener, getClosingOptions, getHelpCtx, getOptionsAlign, isLeaf, isModal, setButtonListener, setLeaf, setModal, setOptionsAlign |
Methods inherited from class org.openide.NotifyDescriptor |
addPropertyChangeListener, firePropertyChange, getAdditionalOptions, getDefaultValue, getMessage, getMessageType, getOptions, getOptionType, getTitle, getTitleForType, isValid, removePropertyChangeListener, setMessage, setMessageType, setOptionType, setTitle, setValid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object NEXT_OPTION
setOptions(java.lang.Object[])
public static final Object FINISH_OPTION
setOptions(java.lang.Object[])
public static final Object PREVIOUS_OPTION
setOptions(java.lang.Object[])
Constructor Detail |
public WizardDescriptor(WizardDescriptor.Panel[] wizardPanels, Object settings)
wizardPanels
- the panels to usesettings
- the settings to pass to panels, or null
WizardDescriptor(WizardDescriptor.Iterator, Object)
public WizardDescriptor(WizardDescriptor.Panel[] wizardPanels)
this
.
wizardPanels
- the panels to useWizardDescriptor(WizardDescriptor.Iterator, Object)
public WizardDescriptor(WizardDescriptor.Iterator panels, Object settings)
panels
- iterator over all WizardDescriptor.Panel
s that can appear in the wizardsettings
- the settings to provide to the panels (may be any data understood by them)WizardDescriptor.Panel.readSettings(java.lang.Object)
,
WizardDescriptor.Panel.storeSettings(java.lang.Object)
public WizardDescriptor(WizardDescriptor.Iterator panels)
this
.
panels
- iterator over all WizardDescriptor.Panel
s that can appear in the wizardMethod Detail |
protected void initialize()
initialize
in class NotifyDescriptor
public final void setPanels(WizardDescriptor.Iterator panels)
panels
- the new list of WizardDescriptor.Panel
spublic void setOptions(Object[] options)
DialogDescriptor
.
Substitutes tokens such as NEXT_OPTION
with the actual button.
setOptions
in class NotifyDescriptor
options
- the options to setNotifyDescriptor.getOptions()
public void setAdditionalOptions(Object[] options)
NotifyDescriptor
The usual value for the options parameter is an array of
String
s. But the parameter type is an array of Object
s. Its
interpretation depends on its type:
Component
Icon
JButton
is created with this icon as its label.
Object
is converted
to a string and the result is used to
label a JButton
.
setAdditionalOptions
in class NotifyDescriptor
options
- the options to setNotifyDescriptor.getOptions()
public void setClosingOptions(Object[] options)
DialogDescriptor
setClosingOptions
in class DialogDescriptor
options
- the options to setpublic Object getValue()
getValue
in class NotifyDescriptor
Object
indicating the option selected by the userNotifyDescriptor.setValue(java.lang.Object)
public void setTitleFormat(MessageFormat format)
{0} wizard {1}That can be expanded to something like this
EJB wizard (1 of 8)This method allows anybody to provide own title format.
format
- message format to the titlepublic MessageFormat getTitleFormat()
setTitleFormat(java.text.MessageFormat)
public void putProperty(String name, Object value)
name
- name of the propertyvalue
- value of propertypublic Object getProperty(String name)
name
- name of the property
public void setHelpCtx(HelpCtx helpCtx)
DialogDescriptor
The implementation should automatically display a help
button among the secondary options, without your needing to
specify it, if the help context on the descriptor is neither
null
nor HelpCtx.DEFAULT_HELP
. If the
descriptor is null
, this feature will be disabled
(you can still add your own help button manually if you wish,
of course). If DEFAULT_HELP
(the default), normally the button
will also be disabled, however if the inner pane is a component
and this component has an associated
help ID, that will be used automatically. So most users should never
need to manually add a help button: call this method with the correct
context, or associate an ID with the displayed component. Note that to
set it to null
you must explicitly call this method; passing
null
in the constructor actually sets it to DEFAULT_HELP
.
setHelpCtx
in class DialogDescriptor
helpCtx
- new help context, can be null
(no help)DialogDescriptor.getHelpCtx()
public Set getInstantiatedObjects()
IllegalStateException
- if this method is called on the unfinished wizardprotected void updateState()
super.updateState ();
setOptions (...);
public void setValue(Object value)
CLOSED_OPTION
.
setValue
in class NotifyDescriptor
value
- the chosen valueNotifyDescriptor.getValue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |