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.
-
cancelEnabled
- True if the Cancel button is enabled.
-
finishEnabled
- True if the Finish button is enabled.
-
helpEnabled
- True if the Help button is enabled.
-
nextEnabled
- True if the Next button is enabled.
-
nextPage
- The next page, or
null
if none.
-
nextPageIndex
- The index of the next page, or -1 if none.
-
previousEnabled
- True if the Previous button is enabled.
-
previousPage
- The previous ("back") page, or
null
if none.
-
previousPageIndex
- The index of the previous ("back") page, or -1 if none.
-
stack
- The stack containing the history of the pages shown.
-
wizard
- The WizardInterface.
-
symantec.itools.awt.SimpleWizardController(WizardInterface)
- Create a SimpleWizardController.
-
doCancel()
- Called when the CANCEL action has been validated.
-
doFinish()
- Called when the FINISH action has been validated.
-
doHelp()
- Called when the HELP action has been validated.
-
doPrepare()
- Called before the first page is shown.
-
doPrepare(int)
- Called before the first page is shown in the special case of
this SimpleWizardController.
-
getIgnoreDesignTime()
-
-
getNextPage()
- Return the next page.
-
getPreviousPage()
- Return the previous page.
-
isCancelEnabled()
- Tells if the Cancel button must be enabled.
-
isFinishEnabled()
- Tells if the Finish button must be enabled.
-
isHelpEnabled()
- Tells if the Help button must be enabled.
-
isNextEnabled()
- Tells if the Next button must be enabled.
-
isPreviousEnabled()
- Tells if the Previous button must be enabled.
-
pageHidden(Component)
- Called before the page is hidden.
-
pageShown(Component)
- Called after a page is shown.
-
preparePage(Component, int)
- Called before a page is shown.
-
resetChainInfo()
- Reset the chain information set by setPreviousPageIndex,
setNextPageIndex, setPreviousPage, setNextPage, and
setXxxEnabled.
-
setCancelEnabled(boolean)
- Set the state of the Cancel button.
-
setFinishEnabled(boolean)
- Set the state of the Finish button.
-
setHelpEnabled(boolean)
- Set the state of the Help button.
-
setIgnoreDesignTime(boolean)
- Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
-
setNextEnabled(boolean)
- Set the state of the Next button.
-
setNextPage(Component)
- Set a next page.
-
setNextPageIndex(int)
- Set an index for the next page.
-
setPreviousEnabled(boolean)
- Set the state of the Previous button.
-
setPreviousPage(Component)
- Set a previous page.
-
setPreviousPageIndex(int)
- Set an index for the previous page.
-
validatePage(Component, Component, int)
- Try to validate a page.
cancelEnabled
protected int cancelEnabled
- True if the Cancel button is enabled.
finishEnabled
protected int finishEnabled
- True if the Finish button is enabled.
helpEnabled
protected int helpEnabled
- True if the Help button is enabled.
nextEnabled
protected int nextEnabled
- True if the Next button is enabled.
nextPage
protected java.awt.Component nextPage
- The next page, or
null
if none.
- See Also:
- setNextPage
nextPageIndex
protected int nextPageIndex
- The index of the next page, or -1 if none.
- See Also:
- setNextPageIndex
previousEnabled
protected int previousEnabled
- True if the Previous button is enabled.
previousPage
protected java.awt.Component previousPage
- The previous ("back") page, or
null
if none.
- See Also:
- setPreviousPage
previousPageIndex
protected int previousPageIndex
- The index of the previous ("back") page, or -1 if none.
- See Also:
- setPreviousPageIndex
stack
protected java.util.Vector stack
- The stack containing the history of the pages shown.
- See Also:
- preparePage, getPreviousPage
wizard
protected symantec.itools.awt.WizardInterface wizard
- The WizardInterface.
SimpleWizardController
public SimpleWizardController(WizardInterface wizard)
- Create a SimpleWizardController.
- Parameters:
- wizard - A WizardInterface to talk to.
doCancel
public void doCancel()
- Called when the CANCEL action has been validated.
Default behavior: none.
doFinish
public void doFinish()
- Called when the FINISH action has been validated.
Default behavior: none.
doHelp
public void doHelp()
- Called when the HELP action has been validated.
Default behavior: none.
doPrepare
public void doPrepare()
- Called before the first page is shown.
Default behavior: clean-up the history stack.
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.
getIgnoreDesignTime
public boolean getIgnoreDesignTime()
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
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
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.
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.
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.
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.
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.
pageHidden
public void pageHidden(Component comp)
- Called before the page is hidden.
Default behavior: none.
- Parameters:
- comp - The page that has been shown.
pageShown
public void pageShown(Component comp)
- Called after a page is shown.
Default behavior: none.
- Parameters:
- comp - The page that has been shown.
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
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
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
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
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
setIgnoreDesignTime
public void setIgnoreDesignTime(boolean ignore)
- Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
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
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
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
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
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
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
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