Class symantec.itools.awt.SimpleWizardController
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.SimpleWizardController

Object
   |
   +----symantec.itools.awt.SimpleWizardController

public class SimpleWizardController
extends Object
implements WizardController
SimpleWizardController implements the WizardController interface. It is the default WizardController used by Wizard and provides a simple behaviour that can be easily overriden. It manages a stack containing the history of pages shown, and provides consistent defaults for the navigation buttons.


Variable Index

 o cancelEnabled
True if the Cancel button is enabled.
 o finishEnabled
True if the Finish button is enabled.
 o helpEnabled
True if the Help button is enabled.
 o nextEnabled
True if the Next button is enabled.
 o nextPage
The next page, or null if none.
 o nextPageIndex
The index of the next page, or -1 if none.
 o previousEnabled
True if the Previous button is enabled.
 o previousPage
The previous ("back") page, or null if none.
 o previousPageIndex
The index of the previous ("back") page, or -1 if none.
 o stack
The stack containing the history of the pages shown.
 o wizard
The WizardInterface.

Constructor Index

 o symantec.itools.awt.SimpleWizardController(WizardInterface)
Create a SimpleWizardController.

Method Index

 o doCancel()
Called when the CANCEL action has been validated.
 o doFinish()
Called when the FINISH action has been validated.
 o doHelp()
Called when the HELP action has been validated.
 o doPrepare()
Called before the first page is shown.
 o doPrepare(int)
Called before the first page is shown in the special case of this SimpleWizardController.
 o getIgnoreDesignTime()
 o getNextPage()
Return the next page.
 o getPreviousPage()
Return the previous page.
 o isCancelEnabled()
Tells if the Cancel button must be enabled.
 o isFinishEnabled()
Tells if the Finish button must be enabled.
 o isHelpEnabled()
Tells if the Help button must be enabled.
 o isNextEnabled()
Tells if the Next button must be enabled.
 o isPreviousEnabled()
Tells if the Previous button must be enabled.
 o pageHidden(Component)
Called before the page is hidden.
 o pageShown(Component)
Called after a page is shown.
 o preparePage(Component, int)
Called before a page is shown.
 o resetChainInfo()
Reset the chain information set by setPreviousPageIndex, setNextPageIndex, setPreviousPage, setNextPage, and setXxxEnabled.
 o setCancelEnabled(boolean)
Set the state of the Cancel button.
 o setFinishEnabled(boolean)
Set the state of the Finish button.
 o setHelpEnabled(boolean)
Set the state of the Help button.
 o setIgnoreDesignTime(boolean)
Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
 o setNextEnabled(boolean)
Set the state of the Next button.
 o setNextPage(Component)
Set a next page.
 o setNextPageIndex(int)
Set an index for the next page.
 o setPreviousEnabled(boolean)
Set the state of the Previous button.
 o setPreviousPage(Component)
Set a previous page.
 o setPreviousPageIndex(int)
Set an index for the previous page.
 o validatePage(Component, Component, int)
Try to validate a page.

Variables

 o cancelEnabled
protected int cancelEnabled
True if the Cancel button is enabled.

 o finishEnabled
protected int finishEnabled
True if the Finish button is enabled.

 o helpEnabled
protected int helpEnabled
True if the Help button is enabled.

 o nextEnabled
protected int nextEnabled
True if the Next button is enabled.

 o nextPage
protected java.awt.Component nextPage
The next page, or null if none.

See Also:
setNextPage
 o nextPageIndex
protected int nextPageIndex
The index of the next page, or -1 if none.

See Also:
setNextPageIndex
 o previousEnabled
protected int previousEnabled
True if the Previous button is enabled.

 o previousPage
protected java.awt.Component previousPage
The previous ("back") page, or null if none.

See Also:
setPreviousPage
 o previousPageIndex
protected int previousPageIndex
The index of the previous ("back") page, or -1 if none.

See Also:
setPreviousPageIndex
 o stack
protected java.util.Vector stack
The stack containing the history of the pages shown.

See Also:
preparePage, getPreviousPage
 o wizard
protected symantec.itools.awt.WizardInterface wizard
The WizardInterface.

Constructors

 o SimpleWizardController
public SimpleWizardController(WizardInterface wizard)
Create a SimpleWizardController.

Parameters:
wizard - A WizardInterface to talk to.

Methods

 o doCancel
public void doCancel()
Called when the CANCEL action has been validated. Default behavior: none.

 o doFinish
public void doFinish()
Called when the FINISH action has been validated. Default behavior: none.

 o doHelp
public void doHelp()
Called when the HELP action has been validated. Default behavior: none.

 o doPrepare
public void doPrepare()
Called before the first page is shown. Default behavior: clean-up the history stack.

 o doPrepare
public void doPrepare(int index)
Called before the first page is shown in the special case of this SimpleWizardController. Default behavior: clean-up the history stack and stack the first pages.

 o getIgnoreDesignTime
public boolean getIgnoreDesignTime()
 o getNextPage
public java.awt.Component getNextPage()
Return the next page. Default behavior: if a next page has been set with setNextPage, return this page. If a next page index has been set with setNextPageIndex, return the associated page. Else, return the next page in the Wizard components order, page 0 if no page has been shown. If there is none, return null. This method is called before and after a validatePage, and by the default implementation of isNextEnabled.

Returns:
The next page to show, null if there is none.
See Also:
setNextPage, setNextPageIndex
 o getPreviousPage
public java.awt.Component getPreviousPage()
Return the previous page. Default behavior: if a previous page has been set with setPreviousPage, return this page. If a previous page index has been set with setPreviousPageIndex, return the associated page. Else, return the next to last element on the stack. If there is none, return null. This method is called before and after a validatePage, and by the default implementation of isPreviousEnabled.

Returns:
The previous page to show, null if there is none.
See Also:
setPreviousPage, setPreviousPageIndex, preparePage
 o isCancelEnabled
public boolean isCancelEnabled()
Tells if the Cancel button must be enabled. Default behavior: if setCancelEnabled has been called, return that value. Else return true.

Returns:
True if the Cancel button must be enabled, false otherwise.
 o isFinishEnabled
public boolean isFinishEnabled()
Tells if the Finish button must be enabled. Default behavior: if setFinishEnabled has been called, return that value. Else return true if the current page is the last page in the Wizard container.

Returns:
True if the Finish button must be enabled, false otherwise.
 o isHelpEnabled
public boolean isHelpEnabled()
Tells if the Help button must be enabled. Default behavior: if setHelpEnabled has been called, return that value. Else return true.

Returns:
True if the Help button must be enabled, false otherwise.
 o isNextEnabled
public boolean isNextEnabled()
Tells if the Next button must be enabled. Default behavior: if setNextEnabled has been called, return that value. Else return true if the getNextPage method returns a page, false otherwise.

Returns:
True if the Next button must be enabled, false otherwise.
 o isPreviousEnabled
public boolean isPreviousEnabled()
Tells if the Previous button must be enabled. Default behavior: if setPreviousEnabled has been called, return that value. Else return true if the getPreviousPage method returns a page, false otherwise.

Returns:
True if the Previous button must be enabled, false otherwise.
 o pageHidden
public void pageHidden(Component comp)
Called before the page is hidden. Default behavior: none.

Parameters:
comp - The page that has been shown.
 o pageShown
public void pageShown(Component comp)
Called after a page is shown. Default behavior: none.

Parameters:
comp - The page that has been shown.
 o preparePage
public void preparePage(Component comp,
                        int action)
Called before a page is shown. Default behavior: add the page to the history stack if the action is NEXT, remove the last page from the history stack if the action is PREVIOUS.

Parameters:
comp - The page that will be shown.
action - The action that has led to this page, either PREVIOUS or NEXT. If it is the first page of the wizard, the action is NEXT.
See Also:
getPreviousPage
 o resetChainInfo
public void resetChainInfo()
Reset the chain information set by setPreviousPageIndex, setNextPageIndex, setPreviousPage, setNextPage, and setXxxEnabled. This is called before a new page is preared.

See Also:
setPreviousPageIndex, setNextPageIndex, setPreviousPage, setNextPage
 o setCancelEnabled
public void setCancelEnabled(boolean status)
Set the state of the Cancel button. This state is used by the default implementation of isCancelEnabled. It is reset before a new page is prepared.

See Also:
isCancelEnabled, resetChainInfo
 o setFinishEnabled
public void setFinishEnabled(boolean status)
Set the state of the Finish button. This state is used by the default implementation of isFinishEnabled. It is reset before a new page is prepared.

See Also:
isFinishEnabled, resetChainInfo
 o setHelpEnabled
public void setHelpEnabled(boolean status)
Set the state of the Help button. This state is used by the default implementation of isHelpEnabled. It is reset before a new page is prepared.

See Also:
isHelpEnabled, resetChainInfo
 o setIgnoreDesignTime
public void setIgnoreDesignTime(boolean ignore)
Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().

 o setNextEnabled
public void setNextEnabled(boolean status)
Set the state of the Next button. This state is used by the default implementation of isNextEnabled. It is reset before a new page is prepared.

See Also:
isNextEnabled, resetChainInfo
 o setNextPage
public void setNextPage(Component comp)
Set a next page. This page is used by the default implementation of getNextPage. It is reset before a new page is prepared.

See Also:
getNextPage, resetChainInfo
 o setNextPageIndex
public void setNextPageIndex(int index)
Set an index for the next page. This index is used by the default implementation of getNextPage. It is reset before a new page is prepared.

See Also:
getNextPage, resetChainInfo
 o setPreviousEnabled
public void setPreviousEnabled(boolean status)
Set the state of the Previous button. This state is used by the default implementation of isPreviousEnabled. It is reset before a new page is prepared.

See Also:
isPreviousEnabled, resetChainInfo
 o setPreviousPage
public void setPreviousPage(Component comp)
Set a previous page. This page is used by the default implementation of getPreviousPage. It is reset before a new page is prepared.

See Also:
getPreviousPage, resetChainInfo
 o setPreviousPageIndex
public void setPreviousPageIndex(int index)
Set an index for the previous page. This index is used by the default implementation of getPreviousPage. It is reset before a new page is prepared.

See Also:
getPreviousPage, resetChainInfo
 o validatePage
public boolean validatePage(Component comp,
                            Component target,
                            int action)
Try to validate a page. Default behavior: return the state of the button associated with the action, using the isXxxEnabled methods. For example, if the controller has the Previous button enabled, this method will return true, meaning that it is valid to go back. If the result is true, then the Wizard will proceed with the action, else the state will not change.

Parameters:
comp - The page that must be validated.
target - The page that will be shown if the action is PREVIOUS or NEXT, null otherwise.
action - The action that must be validated, PREVIOUS, NEXT, FINISH, CANCEL or HELP.
Returns:
True if the action is validated, false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index