|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.server.ui.wizard.WizardFragment
public abstract class WizardFragment
A wizard fragment is a node within a wizard that provides a completely extendable wizard flow by supporting a flexible tree structure for the pages. As the user walks pages through the wizard, they are actually traversing the nodes of a tree, and each node can add or remove children at any time. Each node may be non-UI (useful for injecting behaviour into the tree) or contain a single wizard page (@see hasComposite() and createComposite(Composite, IWizardHandle)). The node may also have children (@see getChildFragments(), which should be updated or refreshed whenever the updateChildFragments() method is called by another node to let this node know that it's state may have changed. This implementation uses a createChildFragments() method to allow the fragment to add it's children into the tree. Note that this method may be called multiple times as the tree is updated and it must return the same instance of any children that have previously been returned.
Constructor Summary | |
---|---|
WizardFragment()
|
Method Summary | |
---|---|
org.eclipse.swt.widgets.Composite |
createComposite(org.eclipse.swt.widgets.Composite parent,
IWizardHandle handle)
Creates the composite associated with this fragment. |
void |
enter()
Called when the wizard that this fragment belongs to has traversed into this wizard fragment. |
void |
exit()
Called when the wizard that this fragment belongs to has traversed out of this wizard fragment. |
java.util.List |
getChildFragments()
Returns the child fragments. |
TaskModel |
getTaskModel()
Returns the wizard task model. |
boolean |
hasComposite()
Returns true if this fragment has an associated UI,
and false otherwise. |
boolean |
isComplete()
Returns true if this fragment is complete (can finish). |
void |
performCancel(org.eclipse.core.runtime.IProgressMonitor monitor)
Called when the wizard that this fragment belongs to is canceled. |
void |
performFinish(org.eclipse.core.runtime.IProgressMonitor monitor)
Called when the wizard that this fragment belongs to is finished. |
void |
setTaskModel(TaskModel taskModel)
Sets the wizard task model. |
void |
updateChildFragments()
Called to give the fragment a chance to update it's child fragments in response to other changes within the wizard or task model. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WizardFragment()
Method Detail |
---|
public boolean hasComposite()
true
if this fragment has an associated UI,
and false
otherwise.
public org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent, IWizardHandle handle)
parent
- a parent compositehandle
- a wizard handle
public void setTaskModel(TaskModel taskModel)
taskModel
- the task modelpublic TaskModel getTaskModel()
public void enter()
When finish is pressed, the current fragment is exit()ed, and then performFinish() is called on all of the fragments in the tree. enter() and exit() are not called on the remaining fragments.
public void exit()
When finish is pressed, the current fragment is exit()ed, and then performFinish() is called on all of the fragments in the tree. enter() and exit() are not called on the remaining fragments.
public void performFinish(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
This method is not called on the UI thread and must not access the composite. Not only might the user never have accessed the fragment's composite, but this method may be called asynchronously on a job once the wizard has closed.
monitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
org.eclipse.core.runtime.CoreException
- if something goes wrongpublic void performCancel(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
This method is not called on the UI thread and must not access the composite. Not only might the user never have accessed the fragment's composite, but this method may be called asynchronously on a job once the wizard has closed.
monitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
org.eclipse.core.runtime.CoreException
- if something goes wrongpublic java.util.List getChildFragments()
public void updateChildFragments()
public boolean isComplete()
true
if the fragment is complete, and
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |