All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.core.WizardComposite
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----com.sun.wizards.core.WizardComponent
|
+----com.sun.wizards.core.WizardComposite
- public class WizardComposite
- extends WizardComponent
WizardComposite implements the default behavior common
to all WizardComponents that have children. This is
the superclass of nodes (panel objects that have
child panels).
The wizard client panel tree consists of an arrangement
of panels (subclassed from WizardLeaf) and nodes
(subclassed from WizardComposite). The arrangement
of the tree determines the order in which the panels
will be visited by the wizard. Nodes can affect the
traversal of the panels, which allows advanced panels
to be skipped for users that do not wish to use them.
"Composite" was chosen as a name for this class from
the book "Design Patterns".
-
cancelAttribute
- The cancel attribute indicates whether or not this
composite will determine the child to visit after
a cancel has been performed.
Deprecated.
-
children
- A list of this objects children.
Deprecated.
-
WizardComposite()
- Creates a WizardComposite with a route to the root of the
server object tree.
-
WizardComposite(String, Route, WizardTreeManager)
- Creates a WizardComponent with the specified name, the specified
route and wizard manager.
-
WizardComposite(WizardState, String)
- Creates a WizardComposite with the specified name.
-
addChild(WizardComponent)
- Add the specified child to this WizardComposite.
-
addCriticalStateKeys(Vector)
- This method declares which wizard state keys get filled with data by this
Wizard Component.
-
addRuntimeResources(Vector)
- Get the runtime classes required by this WizardComposite.
-
addSubTree(Route, String)
- Add the subtree of the specified name from the WizardState
identified by the specified route as a child of this WizardComposite.
-
cancel(WizardComponent, boolean)
- Cancel this panel.
-
deserialize(DataInput)
- Deserialize this WizardComposite from the specified input
stream.
-
deserializeChildren(DataInput)
- Deserialize the children of this object from the specified input
stream.
-
getChild(String)
- Returns the first direct child of this WizardComposite
having the specified name.
-
getChildren()
- Get a list of children of this WizardComposite object.
-
getChildVector()
- Gets a vector containing the children of this WizardComposite.
-
getNextChild(WizardComponent)
- Get the child that follows the specified child in the
WizardComponent tree.
-
getPreviousChild(WizardComponent)
- Get the child that precedes the specified child in the
WizardComponent tree.
-
insertChild(WizardComponent, WizardComponent)
- Inserts a child into this WizardComposite before the
specified
nextChild.
-
isCancelSet()
- Returns true if the cancel attribute of this node is set.
-
next()
- Get the next WizardComponent in the tree.
-
previous()
- Get the previous WizardComponent in the tree.
-
removeChild(WizardComponent)
- Removes the specified child from this object.
-
reset(Object)
- Reset this component, given the specified information.
-
saveWizardTree(DataOutput)
- Save the wizard tree.
-
serialize(DataOutput)
- Serialize this WizardComposite to the specified output
stream.
-
serializeChildren(DataOutput)
- Serialize the children of this object to the specified output
stream.
-
setCancel(boolean)
- Sets the cancel attribute of this node.
children
protected Vector children
- Note: children is deprecated.
- A list of this objects children.
cancelAttribute
protected boolean cancelAttribute
- Note: cancelAttribute is deprecated.
- The cancel attribute indicates whether or not this
composite will determine the child to visit after
a cancel has been performed.
WizardComposite
public WizardComposite()
- Creates a WizardComposite with a route to the root of the
server object tree.
WizardComposite
public WizardComposite(WizardState wizardState,
String name)
- Creates a WizardComposite with the specified name.
- Parameters:
- wizardState - The buildtime WizardState.
- name - The name for this WizardComposite.
WizardComposite
public WizardComposite(String name,
Route route,
WizardTreeManager wizardManager)
- Creates a WizardComponent with the specified name, the specified
route and wizard manager.
- Parameters:
- name - The name for this WizardComponent.
- route - The route to the appropriate server side object.
- wizardManager - The wizardManager responsible for this component.
getChild
public WizardComponent getChild(String childName)
- Returns the first direct child of this WizardComposite
having the specified name.
- Parameters:
- childName - The name of the desired child.
- Returns:
- The desired child or null if the named child
is not a child of this object.
- Overrides:
- getChild in class WizardComponent
getChildren
public Enumeration getChildren()
- Get a list of children of this WizardComposite object.
- Returns:
- The children.
getChildVector
protected Vector getChildVector()
- Gets a vector containing the children of this WizardComposite.
getNextChild
protected WizardComponent getNextChild(WizardComponent currentChild)
- Get the child that follows the specified child in the
WizardComponent tree.
- Parameters:
- currentChild - The child that comes before the
desired child in the wizard tree.
- Returns:
- The next child in the wizard tree or null if
no children follow the specified child in the tree.
- Overrides:
- getNextChild in class WizardComponent
next
public WizardComponent next()
- Get the next WizardComponent in the tree. For a composite, next
will return the first child.next() or null.
- Returns:
- The next WizardComponent in the tree.
- Overrides:
- next in class WizardComponent
getPreviousChild
protected WizardComponent getPreviousChild(WizardComponent currentChild)
- Get the child that precedes the specified child in the
WizardComponent tree.
- Parameters:
- currentChild - The child that comes after the
desired child in the wizard tree.
- Returns:
- The previous child in the wizard tree or null if
no children precede the specified child in the tree.
- Overrides:
- getPreviousChild in class WizardComponent
previous
public WizardComponent previous()
- Get the previous WizardComponent in the tree. For a composite, previous
will return the last child.previous() or null.
- Returns:
- The previous WizardComponent in the tree.
- Overrides:
- previous in class WizardComponent
addChild
public final void addChild(WizardComponent child)
- Add the specified child to this WizardComposite. The
order that the children were added will be maintained.
- Parameters:
- child - The child to add to this object.
insertChild
public final void insertChild(WizardComponent child,
WizardComponent nextChild)
- Inserts a child into this WizardComposite before the
specified
nextChild. This new child
will be visited before nextChild.
- Parameters:
- child - The child to add to this object.
- nextChild - The already-existing child to insert in
front of.
removeChild
public final void removeChild(WizardComponent child)
- Removes the specified child from this object.
- Parameters:
- child - The child to remove.
saveWizardTree
public final synchronized void saveWizardTree(DataOutput out)
- Save the wizard tree. This method is used by wizard builders
to create a wizard archive containing a client tree. This
method should only be called on the root of the client tree.
- Parameters:
- out - The output stream to which the wizard tree
should be written.
- Overrides:
- saveWizardTree in class WizardComponent
serializeChildren
protected void serializeChildren(DataOutput out)
- Serialize the children of this object to the specified output
stream. This method should not be called by applications.
- Parameters:
- out - The output stream to which this objects children should
be written.
deserializeChildren
protected void deserializeChildren(DataInput in)
- Deserialize the children of this object from the specified input
stream. This method should not be called by applications.
- Parameters:
- in - The input stream from which this objects children should
be read.
serialize
protected void serialize(DataOutput out)
- Serialize this WizardComposite to the specified output
stream. This method does not save its children.
- Parameters:
- out - The output stream to which this WizardComponent will be
serialized.
- Overrides:
- serialize in class WizardComponent
- See Also:
- serializeChildren
deserialize
protected void deserialize(DataInput in)
- Deserialize this WizardComposite from the specified input
stream. This method does not deserialize its children.
- Parameters:
- in - The input stream from which this WizardComponent will be
deserialized.
- Overrides:
- deserialize in class WizardComponent
- See Also:
- deserializeChildren
addSubTree
public void addSubTree(Route route,
String subtreeName)
- Add the subtree of the specified name from the WizardState
identified by the specified route as a child of this WizardComposite.
- Parameters:
- route - The route to the WizardState responsible
for the desired subtree.
- subtreeName - The name of the desired subtree.
reset
public void reset(Object info)
- Reset this component, given the specified information.
This method may be called when a user backtracks in
the client wizard tree and changes a fundamental setting.
The panel that enabled the modification might traverse
subsequent panels and call this method resynchronize
all panels with the user's choice.
- Parameters:
- info - The information required to perform a reset.
- Overrides:
- reset in class WizardComponent
setCancel
public void setCancel(boolean cancelAttribute)
- Sets the cancel attribute of this node.
The default behavior of the cancel button is to identify the
nearest ancestor node with the cancel attribute set, and
then traverse to the previous child or the next child of
that node.
The previous or next behavior of cancel is set by the
current panel's cancelDirection flag.
- Parameters:
- cancelAttribute - If true, the cancel attribute of this node will be set.
- See Also:
- setCancelDirection
isCancelSet
public boolean isCancelSet()
- Returns true if the cancel attribute of this node is set.
cancel
public WizardComponent cancel(WizardComponent child,
boolean direction)
- Cancel this panel. This method is only called after the
cancel operation is confirmed by the user.
- Parameters:
- child - The child currently being visited.
- direction - The cancel direction.
- Returns:
- The client panel that should be displayed after the
cancel operation.
addCriticalStateKeys
public void addCriticalStateKeys(Vector keys)
- This method declares which wizard state keys get filled with data by this
Wizard Component. During statefile creation, these keys are written out to
the statefile. and can be used with a statefile to set the default settings
in subsequent executions of the wizard.
- Parameters:
- wizardStateKeys - The vector holding the wizard state keys.
- Overrides:
- addCriticalStateKeys in class WizardComponent
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Get the runtime classes required by this WizardComposite.
- Overrides:
- addRuntimeResources in class WizardComponent
All Packages Class Hierarchy This Package Previous Next Index