Class symantec.itools.awt.Wizard
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.Wizard
Object
|
+----Component
|
+----Container
|
+----Panel
|
+----symantec.itools.awt.Wizard
- public class Wizard
- extends Panel
- implements WizardInterface, Serializable
The Wizard component provides services to create wizards.
It maintains a list of pages and uses the services of a
WizardController to define its behavior.
- See Also:
- WizardController, SimpleWizardController
-
CANCEL_LABEL
- The text used for the Cancel button.
-
CENTER
- Constant value indicating a layout centered.
-
FINISH_LABEL
- The text used for the Finish button.
-
HELP_LABEL
- The text used for the Help button.
-
LEFT
- Constant value indicating a layout aligned to the left.
-
NEXT_LABEL
- The text used for the Next button.
-
PREVIOUS_LABEL
- The text used for the Back button.
-
RIGHT
- Constant value indicating a layout aligned to the right.
-
cancelButton
- The Cancel button.
-
finishButton
- The Finish button.
-
helpButton
- The Help button.
-
horizontalLine1
- The horizontal line separating the pages from the navigation buttons.
-
newButtonOrder
- The button order for all instances of wizards.
-
nextButton
- The Next button.
-
panel1
- The panel that contains the pages.
-
panel2
- The top-level panel below the horizontal line.
-
panel3
- The panel that contains the navigation (Back,Next,Finish) buttons.
-
panel4
- The panel that contains the Cancel and Help buttons.
-
previousButton
- The Back button.
-
symantec.itools.awt.Wizard()
- Constructs a Wizard.
-
addActionListener(ActionListener)
- Adds the specified action listener to receive action events from
the Finish button.
-
addImpl(Component, Object, int)
- Adds the specified component to this container at the specified
index.
-
addNotify()
- Tells this component that it has been added to a container.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
doCancel()
- Performs the actions needed when the Cancel button is pressed.
-
doFinish()
- Performs the actions needed when the Finish button is pressed.
-
doHelp()
- Performs the actions needed when the Help button is pressed.
-
doLayout()
- Handles the laying out of components within this component.
-
getAlternativeButtonOrder()
- Get the button order for all instances of Wizard.
-
getButtonsAlignment()
- Gets the buttons alignment of the navigation buttons.
-
getCancelButton()
- Return the Cancel button component.
-
getComponentAt(int)
- Gets the component for the page at the given index.
-
getFinishButton()
- Return the Finish button component.
-
getHelpButton()
- Return the Help button component.
-
getIgnoreDesignTime()
-
-
getLayout()
-
-
getNextButton()
- Return the Next button component.
-
getPageCount()
- Gets the number of pages in the Wizard.
-
getPageIndex(Component)
- Gets the index for a specific page.
-
getPreviousButton()
- Return the Previous button component.
-
getSelectedIndex()
- Returns the zero-relative index of the currently selected page.
-
getWizardController()
- Get the current WizardController.
-
goNext()
- Go to the next page.
-
goPrevious()
- Go to the previous page.
-
isCombinedButton()
- Determines whether there is a combined Next/Finish button.
-
isHelpButtonVisible()
- Determines whether the Help button is visible.
-
remove(Component)
- Removes the specified component from this container.
-
remove(int)
- Removes the component, specified by
index
, from
this container.
-
removeActionListener(ActionListener)
- Removes the specified action listener so that it no longer receives
action events from the Finish button.
-
removeAllPages()
- Removes all pages and their associated components, clearing
the Wizard entirely.
-
removeNotify()
- Tells this component that it is being removed from a container.
-
removePageAt(int)
- Removes a page and its associated component at the given index.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
restart()
- Restarts the wizard after usage.
-
setAlternativeButtonOrder(boolean)
- Set the button order for all instances of Wizard.
-
setBackground(Color)
- Sets the background color of this component.
-
setButtonsAlignment(int)
- Sets the buttons alignment of the navigation buttons.
-
setCancelEnabled(boolean)
- Enables or disables the Cancel button.
-
setCombinedButton(boolean)
- Sets a combined Next/Finish button or two buttons depending on the
value of the parameter.
-
setComponentAt(int, Component)
- Replaces a page at the index specified.
-
setFinishEnabled(boolean)
- Enables or disables the Finish button.
-
setFirstPageIndex(int)
- Set the wizard starting page.
-
setHelpButtonVisible(boolean)
- Shows or hides the Help button depending on the value of the parameter.
-
setHelpEnabled(boolean)
- Enables or disables the Help button.
-
setIgnoreDesignTime(boolean)
- Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
-
setLayout(LayoutManager)
- Takes no action.
-
setNextEnabled(boolean)
- Enables or disables the Next button.
-
setNextPage(Component)
- Sets the page to show when goNext is called.
-
setNextPageIndex(int)
- Sets the index of the page to show when goNext is called.
-
setPreviousEnabled(boolean)
- Enables or disables the Previous button.
-
setPreviousPage(Component)
- Sets the page to show when goPrevious is called.
-
setPreviousPageIndex(int)
- Sets the index of the page to show when goPrevious is called.
-
setWizardController(WizardController)
- Sets a customized WizardController.
-
updateButtonsState()
- Sets a default status for the Previous, Next and Finish buttons.
CANCEL_LABEL
protected static java.lang.String CANCEL_LABEL
- The text used for the Cancel button.
CENTER
public static final int CENTER
- Constant value indicating a layout centered.
FINISH_LABEL
protected static java.lang.String FINISH_LABEL
- The text used for the Finish button.
HELP_LABEL
protected static java.lang.String HELP_LABEL
- The text used for the Help button.
LEFT
public static final int LEFT
- Constant value indicating a layout aligned to the left.
NEXT_LABEL
protected static java.lang.String NEXT_LABEL
- The text used for the Next button.
PREVIOUS_LABEL
protected static java.lang.String PREVIOUS_LABEL
- The text used for the Back button.
RIGHT
public static final int RIGHT
- Constant value indicating a layout aligned to the right.
cancelButton
protected java.awt.Button cancelButton
- The Cancel button.
finishButton
protected java.awt.Button finishButton
- The Finish button.
helpButton
protected java.awt.Button helpButton
- The Help button.
horizontalLine1
protected symantec.itools.awt.shape.HorizontalLine horizontalLine1
- The horizontal line separating the pages from the navigation buttons.
newButtonOrder
protected static boolean newButtonOrder
- The button order for all instances of wizards.
nextButton
protected java.awt.Button nextButton
- The Next button.
panel1
protected java.awt.Panel panel1
- The panel that contains the pages.
panel2
protected java.awt.Panel panel2
- The top-level panel below the horizontal line.
panel3
protected java.awt.Panel panel3
- The panel that contains the navigation (Back,Next,Finish) buttons.
panel4
protected java.awt.Panel panel4
- The panel that contains the Cancel and Help buttons.
previousButton
protected java.awt.Button previousButton
- The Back button.
Wizard
public Wizard()
- Constructs a Wizard.
addActionListener
public void addActionListener(ActionListener l)
- Adds the specified action listener to receive action events from
the Finish button.
- See Also:
- removeActionListener
addImpl
protected void addImpl(Component comp,
Object constraints,
int index)
- Adds the specified component to this container at the specified
index. This method also notifies the layout manager to add
the component to this container's layout using the specified
constraints object.
This is the method to override if a program needs to track
every add request to a container. An overriding method should
usually include a call to the superclass's version of the method:
super.addImpl(comp, constraints, index)
- Parameters:
- comp - the component to be added.
- constraints - an object expressing layout contraints
for this component.
- index - the position in the container's list at which to
insert the component, where
-1
means insert at the end.
- Overrides:
- addImpl in class Container
- Since:
- JDK1.1
- See Also:
- add(java.awt.Component), add(java.awt.Component, int), add(java.awt.Component, java.lang.Object), LayoutManager
addNotify
public void addNotify()
- Tells this component that it has been added to a container.
This is a standard Java AWT method which gets called by the AWT when
this component is added to a container. Typically, it is used to
create this component's peer.
It has been overridden here to hook-up event listeners.
- Overrides:
- addNotify in class Panel
- See Also:
- removeNotify
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removePropertyChangeListener
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeVetoableChangeListener
doCancel
public void doCancel()
- Performs the actions needed when the Cancel button is pressed.
- See Also:
- doFinish, doHelp
doFinish
public void doFinish()
- Performs the actions needed when the Finish button is pressed.
- See Also:
- doCancel, doHelp
doHelp
public void doHelp()
- Performs the actions needed when the Help button is pressed.
- See Also:
- doFinish, doCancel
doLayout
public void doLayout()
- Handles the laying out of components within this component.
This is a standard Java AWT method which gets called by the AWT
when this component is validated with the validate() method.
- Overrides:
- doLayout in class Container
- See Also:
- validate
getAlternativeButtonOrder
public static boolean getAlternativeButtonOrder()
- Get the button order for all instances of Wizard.
getButtonsAlignment
public int getButtonsAlignment()
- Gets the buttons alignment of the navigation buttons.
- See Also:
- setButtonsAlignment
getCancelButton
public java.awt.Button getCancelButton()
- Return the Cancel button component.
getComponentAt
public java.awt.Component getComponentAt(int index)
- Gets the component for the page at the given index.
- Parameters:
- index - zero-relative index of the page
- Returns:
- returns the component associated with the page
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
- See Also:
- setComponentAt
getFinishButton
public java.awt.Button getFinishButton()
- Return the Finish button component.
getHelpButton
public java.awt.Button getHelpButton()
- Return the Help button component.
getIgnoreDesignTime
public boolean getIgnoreDesignTime()
getLayout
public java.awt.LayoutManager getLayout()
- Overrides:
- getLayout in class Container
getNextButton
public java.awt.Button getNextButton()
- Return the Next button component.
getPageCount
public int getPageCount()
- Gets the number of pages in the Wizard.
- Returns:
- the number of pages currently in the Wizard
getPageIndex
public int getPageIndex(Component comp)
- Gets the index for a specific page.
- Parameters:
- comp - the page to get the index of
- Returns:
- the zero-relative index of the page or -1 if it is not found
- Throws: IllegalArgumentException
- if the component is null
getPreviousButton
public java.awt.Button getPreviousButton()
- Return the Previous button component.
getSelectedIndex
public int getSelectedIndex()
- Returns the zero-relative index of the currently selected page.
- Returns:
- the currently selected page or -1 if none are shown
getWizardController
public symantec.itools.awt.WizardController getWizardController()
- Get the current WizardController.
- See Also:
- setWizardController
goNext
public void goNext()
- Go to the next page.
If a page has been selected with setNextPage it will be used.
If a page index has been selected with setNextPageIndex it will be
used unless a page has been specified. The chain information will be
reset.
- See Also:
- goPrevious, setNextPage, setNextPageIndex
goPrevious
public void goPrevious()
- Go to the previous page.
If a page has been selected with setPreviousPage it will be used.
If a page index has been selected with setPreviousPageIndex it will be
used unless a page has been specified. The chain information will be
reset.
- See Also:
- goNext, setPreviousPage, setPreviousPageIndex
isCombinedButton
public boolean isCombinedButton()
- Determines whether there is a combined Next/Finish button.
- See Also:
- setCombinedButton
isHelpButtonVisible
public boolean isHelpButtonVisible()
- Determines whether the Help button is visible.
- See Also:
- setHelpButtonVisible
remove
public void remove(Component comp)
- Removes the specified component from this container.
This is a standard Java AWT method which gets called to remove
a component from a container. When this happens the component's
removeNotify() will also get called to indicate component
removal.
- Parameters:
- comp - the component to remove
- Overrides:
- remove in class Container
- See Also:
- add
remove
public void remove(int index)
- Removes the component, specified by
index
, from
this container.
This is a standard Java AWT method which gets called to remove
a component from a container. When this happens the component's
removeNotify() will also get called to indicate component
removal.
- Parameters:
- comp - the component to remove
- Overrides:
- remove in class Container
- See Also:
- add
removeActionListener
public void removeActionListener(ActionListener l)
- Removes the specified action listener so that it no longer receives
action events from the Finish button.
- See Also:
- addActionListener
removeAllPages
public void removeAllPages()
- Removes all pages and their associated components, clearing
the Wizard entirely.
removeNotify
public void removeNotify()
- Tells this component that it is being removed from a container.
This is a standard Java AWT method which gets called by the AWT when
this component is removed from a container. Typically, it is used to
destroy the peers of this component and all its subcomponents.
It has been overridden here to unhook event listeners.
- Overrides:
- removeNotify in class Container
- See Also:
- addNotify
removePageAt
public void removePageAt(int index)
- Removes a page and its associated component at the given index.
The currently active page cannot be removed.
- Parameters:
- index - zero-relative index of the page
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addVetoableChangeListener
restart
public void restart()
- Restarts the wizard after usage.
The WizardController life cycle will be reset and the
first page will be shown again.
setAlternativeButtonOrder
public static void setAlternativeButtonOrder(boolean order)
- Set the button order for all instances of Wizard.
This should be called before instanciating a Wizard.
setBackground
public void setBackground(Color color)
- Sets the background color of this component.
- Overrides:
- setBackground in class Component
setButtonsAlignment
public void setButtonsAlignment(int align) throws PropertyVetoException
- Sets the buttons alignment of the navigation buttons.
- Parameters:
- align - Wizard.LEFT, Wizard.CENTER or Wizard.RIGHT
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- Throws: IllegalArgumentException
- if the parameter is invalid
- See Also:
- getButtonsAlignment
setCancelEnabled
public void setCancelEnabled(boolean status)
- Enables or disables the Cancel button.
- Parameters:
- status -
true
to enable the button
- See Also:
- setPreviousEnabled, setNextEnabled, setFinishEnabled, setHelpEnabled
setCombinedButton
public void setCombinedButton(boolean combined) throws PropertyVetoException
- Sets a combined Next/Finish button or two buttons depending on the
value of the parameter.
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- isCombinedButton
setComponentAt
public void setComponentAt(int index,
Component comp) throws PropertyVetoException
- Replaces a page at the index specified.
- Parameters:
- index - the zero-relative index of the page to change
- comp - the new component
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- Throws: ArrayIndexOutOfBoundsException
- if the index is invalid
- Throws: IllegalArgumentException
- if the component is null
- See Also:
- getComponentAt
setFinishEnabled
public void setFinishEnabled(boolean status)
- Enables or disables the Finish button.
- Parameters:
- status -
true
to enable the button
- See Also:
- setPreviousEnabled, setNextEnabled, setCancelEnabled, setHelpEnabled
setFirstPageIndex
public void setFirstPageIndex(int index)
- Set the wizard starting page. This has to be called before any
page is added.
setHelpButtonVisible
public void setHelpButtonVisible(boolean visible) throws PropertyVetoException
- Shows or hides the Help button depending on the value of the parameter.
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- isHelpButtonVisible
setHelpEnabled
public void setHelpEnabled(boolean status)
- Enables or disables the Help button.
- Parameters:
- status -
true
to enable the button
- See Also:
- setPreviousEnabled, setNextEnabled, setFinishEnabled, setCancelEnabled
setIgnoreDesignTime
public void setIgnoreDesignTime(boolean ignore)
- Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
setLayout
public void setLayout(LayoutManager mgr)
- Takes no action.
This is a standard Java AWT method which gets called to specify
which layout manager should be used to layout the components in
standard containers.
Since layout managers CANNOT BE USED with this container the standard
setLayout has been OVERRIDDEN for this container and does nothing.
- Parameters:
- mgr - the layout manager to use to layout this container's components
(IGNORED)
- Overrides:
- setLayout in class Container
- See Also:
- getLayout
setNextEnabled
public void setNextEnabled(boolean status)
- Enables or disables the Next button.
- Parameters:
- status -
true
to enable the button
- See Also:
- setPreviousEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled
setNextPage
public void setNextPage(Component comp)
- Sets the page to show when goNext is called.
- See Also:
- setPreviousPageIndex, goNext, WizardController, SimpleWizardController
setNextPageIndex
public void setNextPageIndex(int index)
- Sets the index of the page to show when goNext is called.
- See Also:
- setPreviousPageIndex, goNext, WizardController, SimpleWizardController
setPreviousEnabled
public void setPreviousEnabled(boolean status)
- Enables or disables the Previous button.
- Parameters:
- status -
true
to enable the button
- See Also:
- setNextEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled
setPreviousPage
public void setPreviousPage(Component comp)
- Sets the page to show when goPrevious is called.
- See Also:
- setNextPageIndex, goPrevious, WizardController, SimpleWizardController
setPreviousPageIndex
public void setPreviousPageIndex(int index)
- Sets the index of the page to show when goPrevious is called.
- See Also:
- setNextPageIndex, goPrevious, WizardController, SimpleWizardController
setWizardController
public void setWizardController(WizardController controller)
- Sets a customized WizardController.
This should be done once before actually using the Wizard
and after all pages have been added. If no customized
WizardController is set, a default SimpleWizardController
is used.
- See Also:
- getWizardController
updateButtonsState
public void updateButtonsState()
- Sets a default status for the Previous, Next and Finish buttons.
- See Also:
- setPreviousEnabled, setNextEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled
All Packages Class Hierarchy This Package Previous Next Index