home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 4.9 KB | 193 lines |
- /*
- * WizardInterface.java
- */
-
- package symantec.itools.awt;
-
- import java.awt.Component;
-
- /**
- * The Wizard API.
- * A Wizard is a dialog that leads the user through a series of steps in order
- * to accomplish some task.
- *
- * @see symantec.itools.awt.Wizard
- */
- public interface WizardInterface
- {
- // Properties
-
- /**
- * Gets the number of pages in the Wizard.
- * @return the number of pages currently in the Wizard
- */
- public int getPageCount();
- /**
- * Returns the zero-relative index of the currently selected page.
- * @return the currently selected page or -1 if none are shown
- */
- public int getSelectedIndex();
- /**
- * Gets the component for the page at the given index.
- * @param index the zero-relative page index
- * @return returns the component associated with the page
- * @exception ArrayIndexOutOfBoundsException
- * if the index is invalid
- */
- public Component getComponentAt(int index);
-
- // Automated navigation control
-
- /**
- * Sets the index of the page to show when goPrevious is called.
- * @param index the zero-relative page index
- *
- * @see #setNextPageIndex
- * @see #goPrevious
- * @see WizardController
- * @see SimpleWizardController
- */
- public void setPreviousPageIndex(int index);
- /**
- * Sets the index of the page to show when goNext is called.
- * @param index the zero-relative page index
- *
- * @see #setPreviousPageIndex
- * @see #goNext
- * @see WizardController
- * @see SimpleWizardController
- */
- public void setNextPageIndex(int index);
-
- /**
- * Sets the page to show when goPrevious is called.
- *
- * @see #setNextPageIndex
- * @see #goPrevious
- * @see WizardController
- * @see SimpleWizardController
- */
- public void setPreviousPage(Component comp);
- /**
- * Sets the page to show when goNext is called.
- *
- * @see #setPreviousPageIndex
- * @see #goNext
- * @see WizardController
- * @see SimpleWizardController
- */
- public void setNextPage(Component comp);
-
- // Navigation bar state
-
- /**
- * Sets a default status for the Previous, Next and Finish buttons.
- *
- * @see #setPreviousEnabled
- * @see #setNextEnabled
- * @see #setFinishEnabled
- * @see #setCancelEnabled
- * @see #setHelpEnabled
- */
- public void updateButtonsState();
-
- /**
- * Enables or disables the Previous button.
- * @param status <code>true</code> to enable the button
- *
- * @see #setNextEnabled
- * @see #setFinishEnabled
- * @see #setCancelEnabled
- * @see #setHelpEnabled
- */
- public void setPreviousEnabled(boolean status);
- /**
- * Enables or disables the Next button.
- * @param status <code>true</code> to enable the button
- *
- * @see #setPreviousEnabled
- * @see #setFinishEnabled
- * @see #setCancelEnabled
- * @see #setHelpEnabled
- */
- public void setNextEnabled(boolean status);
- /**
- * Enables or disables the Finish button.
- * @param status <code>true</code> to enable the button
- *
- * @see #setPreviousEnabled
- * @see #setNextEnabled
- * @see #setCancelEnabled
- * @see #setHelpEnabled
- */
- public void setFinishEnabled(boolean status);
- /**
- * Enables or disables the Cancel button.
- * @param status <code>true</code> to enable the button
- *
- * @see #setPreviousEnabled
- * @see #setNextEnabled
- * @see #setFinishEnabled
- * @see #setHelpEnabled
- */
- public void setCancelEnabled(boolean status);
- /**
- * Enables or disables the Help button.
- * @param status <code>true</code> to enable the button
- *
- * @see #setPreviousEnabled
- * @see #setNextEnabled
- * @see #setFinishEnabled
- * @see #setCancelEnabled
- */
- public void setHelpEnabled(boolean status);
-
- // Actions
-
- /**
- * 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 #goNext
- * @see #setPreviousPage
- * @see #setPreviousPageIndex
- */
- public void goPrevious();
- /**
- * 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 #goPrevious
- * @see #setNextPage
- * @see #setNextPageIndex
- */
- public void goNext();
- /**
- * Performs the actions needed when the Finish button is pressed.
- *
- * @see #doCancel
- * @see #doHelp
- */
- public void doFinish();
- /**
- * Performs the actions needed when the Cancel button is pressed.
- *
- * @see #doFinish
- * @see #doHelp
- */
- public void doCancel();
- /**
- * Performs the actions needed when the Help button is pressed.
- *
- * @see #doFinish
- * @see #doCancel
- */
- public void doHelp();
- }
-