|
Side of Software Wizard Library 1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A page in the wizard progression. A wizard model steps a user through
a sequence of pages. A typical page contains
a form for the user to complete and instructions on how to complete
it. Note that a page is part of the model, in the Model-View-Controller
architecture. It is not a view. It is rendered, or viewed, with the aid of
a PageEditor
.
All pages have a state of either being complete or incomplete.
For example, a page is incomplete if it does not have a value
for a required field in its form. Use isComplete
to determine
if a page is complete. A PropertyChangeEvent
for the COMPLETE_PROPERTY
property is thrown when
the page's state changes.
In addition to being complete, a page is either valid or invalid.
To check if a page is valid, call validate
. A normal return signals
the page is valid; an InvalidPageException
signals
the page is invalid.
For example, a page may have an unacceptable value for a field
in its form. It is complete, however, since is has a value.
A page typically has a name, which can be accessed via the
putValue
and getValue
methods, passing
NAME_PROPERTY
.
WizardModel
,
PageEditor
Field Summary | |
static java.lang.String |
COMPLETE_PROPERTY
Constant used by property change events to signal that a page's state of being completed has changed. |
static java.lang.String |
NAME_PROPERTY
Constant used by property change events to signal that a page's name has changed. |
Method Summary | |
java.lang.Object |
getValue(java.lang.String key)
Returns the value associated with the specified key, or null if this page does not contain the key. |
boolean |
isComplete()
Returns true if this page is considered complete, or finished. |
java.lang.Object |
putValue(java.lang.String key,
java.lang.Object value)
Associates value with key . |
void |
validate()
Checks if this page has acceptable values. |
Methods inherited from interface sos.wizard.Model |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
public static final java.lang.String NAME_PROPERTY
public static final java.lang.String COMPLETE_PROPERTY
Method Detail |
public java.lang.Object getValue(java.lang.String key)
null
if this page does not contain the key.
key
- a string that identifies the stored object
key
, or
null
if no such object existsputValue(java.lang.String, java.lang.Object)
public boolean isComplete()
true
if this page is considered complete, or finished.
true
if this page is completepublic java.lang.Object putValue(java.lang.String key, java.lang.Object value)
value
with key
.
key
- a string that identifies the objectvalue
- the object to be associated with key
key
,
or null
if no such object existedgetValue(java.lang.String)
public void validate() throws InvalidPageException
InvalidPageException
with an appropriate
localized message.
InvalidPageException
- if this page is not valid
|
Side of Software Wizard Library 1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |