public class Step extends MetaTraversable
Step
class is responsible for specifying metadata
for a Traversable
that has not yet been instantiated;
Step
differs from MetaTraversable
in that
Step
is intended to be used for specifying a sequence
of panels that are displayed by the FSMWizard
.
The current behavior of Step
is identical to
MetaTraversable
. Future extensions that apply only to
the FSMWizard
will be added to Step
rather
than to MetaTraversable
.
Modifier | Constructor and Description |
---|---|
protected |
Step()
Should only be used by
copyTo(Object) . |
|
Step(java.lang.Class traversableClass) |
|
Step(java.lang.Class traversableClass,
java.lang.Class[] constructorArgTypes,
java.lang.Object[] constructorArgs) |
|
Step(java.lang.String title,
java.lang.Class traversableClass) |
|
Step(java.lang.String title,
java.lang.Class traversableClass,
java.lang.Class[] constructorArgTypes,
java.lang.Object[] constructorArgs,
java.lang.String helpID) |
|
Step(java.lang.String title,
java.lang.Class traversableClass,
java.lang.String helpID) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
copyTo(java.lang.Object target)
Copies the internal state of
this object to the
specified copy . |
protected void |
copyToImpl(Step copy) |
java.lang.String |
getPageTitle()
Method to get the title of the page that presents this Step
|
java.lang.String |
getStepLabel()
Method to get the label of the page that presents this Step.
|
static Step[] |
newSteps(java.lang.String[] traversableClasses)
Convenience method for creating an array of
Step
objects based on an array of strings that provide the fully
qualified class names of the Traversable s. |
Traversable |
newTraversable(CommitNotifier commitNotifier)
This method specifies the
Traversable that will be used
in association with the Navigable ; in general, only
NavigableUIContainer implementations should call this
method directly. |
void |
setPageTitle(java.lang.String pageTitle)
Method to set the title of the page that presents this Step
|
void |
setStepLabel(java.lang.String stepLabel)
Method to set the label of the page that presents this Step
|
copyToImpl, findHelpID, getTraversableClass, isUsingTraversableDefaultConstructor, newTraversable, newTraversable, setHelpID, setNameLink
public Step(java.lang.Class traversableClass)
public Step(java.lang.String title, java.lang.Class traversableClass)
public Step(java.lang.String title, java.lang.Class traversableClass, java.lang.String helpID)
public Step(java.lang.Class traversableClass, java.lang.Class[] constructorArgTypes, java.lang.Object[] constructorArgs)
public Step(java.lang.String title, java.lang.Class traversableClass, java.lang.Class[] constructorArgTypes, java.lang.Object[] constructorArgs, java.lang.String helpID)
protected Step()
copyTo(Object)
.public static Step[] newSteps(java.lang.String[] traversableClasses)
Step
objects based on an array of strings that provide the fully
qualified class names of the Traversable
s.public java.lang.String getPageTitle()
public void setPageTitle(java.lang.String pageTitle)
pageTitle
- String that represents the title of the pagepublic java.lang.String getStepLabel()
public void setStepLabel(java.lang.String stepLabel)
pageTitle
- String that represents the title of the pagepublic final Traversable newTraversable(CommitNotifier commitNotifier)
Traversable
that will be used
in association with the Navigable
; in general, only
NavigableUIContainer
implementations should call this
method directly.
By default, this method uses the Class
that was specified
when this Navigable
was created and calls
Class.newInstance()
on that Class
to create the
new Traversable
. If the class is null
or
the class does not implement a public default constructor or
the newly created object cannot be cast to Traversable
,
this method will return an instance of DefaultTraversablePanel
. If the class implements the CommitListener
interface, then the Traversable
instance
will be added as an CommitListener
to the NavigableUIContainer
as well.
uiContainer
- Subclasses that override this method can
register an CommitListener
with the NavigableUIContainer
.Traversable
which represents the detail UI
component that is shown when the user selects this
Navigable
in the NavigableUIContainer
.public java.lang.Object copyTo(java.lang.Object target)
Copyable
this
object to the
specified copy
. If copy
is
null
, then this method should create a new instance
of this
class and proceed to copy the internal state
to the newly created object. Generally, only the persistent
state of the object should be copied, but whether or not it is
appropriate to copy transient properties is at the discretion
of the individual implementor.
Regardless of whether the copy occurs to an existing object or to
a newly created object, the return value is object to which
this
object's state was copied.
There is a standard implementation pattern for the
copyTo
method that helps avoid problems that arise
when a Copyable
object is subclassed. The pattern
is:
The parameter passed into thepublic Object copyTo( Object target ) { final <this_class> copy = target != null ? (<this_class>) target : new <this_class>(); copyToImpl( copy ); return copy; } protected final void copyToImpl( <this_class> copy ) { super.copyToImpl( copy ); // if necessary // put code here for copying the properties of <this_class> }
copyToImpl
method is
the same type of this
class. The responsibility of
copyToImpl
is to copy the state of this
class through direct access of the fields. The
copyToImpl
method should not use getters and setters
since these may be overridden, causing the state of
this
class to be incompletely copied.copyTo
in interface Copyable
copyTo
in class MetaTraversable
target
- The target object to which the state of
this
object should be copied. If target
is null
, then the copyTo
method will
return a new instance of this
class.this
object was copied. If the target
was
non-null
, then the return value is the same as the
target
object that was passed in; otherwise, the
return value is a new instance of this
class.protected final void copyToImpl(Step copy)