org.eclipse.wst.server.ui.wizard
Class WizardFragment

java.lang.Object
  extended byorg.eclipse.wst.server.ui.wizard.WizardFragment

public abstract class WizardFragment
extends java.lang.Object

A wizard fragment is a

Since:
1.0

Constructor Summary
WizardFragment()
           
 
Method Summary
 Composite createComposite(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(IProgressMonitor monitor)
          Called when the wizard that this fragment belongs to is canceled.
 void performFinish(IProgressMonitor monitor)
          Called when the wizard that this fragment belongs to is finished.
 void setTaskModel(TaskModel taskModel)
          Sets the wizard task model.
 void updateChildFragments()
          Gives the fragment a chance to update it's child fragments.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WizardFragment

public WizardFragment()
Method Detail

hasComposite

public boolean hasComposite()
Returns true if this fragment has an associated UI, and false otherwise.

Returns:
true if the fragment has a composite

createComposite

public Composite createComposite(Composite parent,
                                 IWizardHandle handle)
Creates the composite associated with this fragment. This method is only called when hasComposite() returns true.

Parameters:
parent -
handle -
Returns:
the created composite

setTaskModel

public void setTaskModel(TaskModel taskModel)
Sets the wizard task model. The task model is shared by all fragments in the wizard and is used to share data.

Parameters:
taskModel - the task model

getTaskModel

public TaskModel getTaskModel()
Returns the wizard task model.

Returns:
the task model

enter

public void enter()
Called when the wizard that this fragment belongs to has traversed into this wizard fragment.


exit

public void exit()
Called when the wizard that this fragment belongs to has traversed out of this wizard fragment.


performFinish

public void performFinish(IProgressMonitor monitor)
                   throws CoreException
Called when the wizard that this fragment belongs to is finished.

Parameters:
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
CoreException - if something goes wrong

performCancel

public void performCancel(IProgressMonitor monitor)
                   throws CoreException
Called when the wizard that this fragment belongs to is canceled.

Parameters:
monitor - a progress monitor, or null if progress reporting and cancellation are not desired
Throws:
CoreException - if something goes wrong

getChildFragments

public java.util.List getChildFragments()
Returns the child fragments. Child fragments come directly after this fragment in the wizard flow.

Returns:
a list of child fragments

updateChildFragments

public void updateChildFragments()
Gives the fragment a chance to update it's child fragments.


isComplete

public boolean isComplete()
Returns true if this fragment is complete (can finish).

Returns:
true if the fragment is complete, and false otherwise