com.sas.swing.visuals.wizard2
Class BaseWizardPage

com.sas.swing.visuals.wizard2.BaseWizardPage
All Implemented Interfaces:
WizardPageInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
SummaryPage

public class BaseWizardPage
implements WizardPageInterface

This class is provided as a convenience for easily creating wizard pages, and is designed to be subclassed. The WizardPageInterface interface is implemented, with many of the methods left as no-op where the behavior will be defined by the subclasses.

See Also:
Serialized Form

Field Summary
protected  java.lang.String image
          a String specifying the source path or URL for obtaining the image for the page
protected  boolean isBackEnabled
          A boolean value specifying the enablement of the default "Back" button, with action command ButtonNavigationPanel.BACK_COMMAND.
protected  boolean isNextEnabled
          A boolean value specifying the enablement of the default "Next" button, with action command ButtonNavigationPanel.NEXT_FINISH_COMMAND.
protected  java.lang.String pageInfo
          a String specifying information about the page.
protected  Wizard wizard
          The Wizard object to which the page belongs
 
Fields inherited from interface com.sas.swing.visuals.wizard.WizardPageInterface
EXPLICIT_SET, FIRST_TIME_SHOWN, NEXT, PREVIOUS
 
Constructor Summary
BaseWizardPage(Wizard wizard)
          Calls BaseWizardPage(wizard, null).
BaseWizardPage(Wizard wizard, java.lang.String pageInfo)
          Creates a BaseWizardPage object with the specified wizard, and pageInfo.
 
Method Summary
 void cleanup()
          No-op WizardPageInterface method
 java.lang.String getPageInfo()
          WizardPageInterface method.
 java.lang.String getStatusImage()
          WizardPageInterface method.
 boolean hidePage(int directionFlag)
          WizardPageInterface method.
 boolean isButtonEnabled(java.lang.String actionCommand)
          WizardPageInterface method.
 void setButtonEnabled(java.lang.String actionCommand, boolean isEnabled)
           
 void setPageInfo(java.lang.String description)
          Sets pageInfo to description.
 void setStatusImage(java.lang.String imageSource)
          Sets the image to imageSource, to specify the source path or URL for obtaining the image for this page
 void showPage(int directionFlag)
          No-op WizardPageInterface method
 

Field Detail

isNextEnabled

protected boolean isNextEnabled
A boolean value specifying the enablement of the default "Next" button, with action command ButtonNavigationPanel.NEXT_FINISH_COMMAND. The initial setting is true.

See Also:
isButtonEnabled(java.lang.String)

isBackEnabled

protected boolean isBackEnabled
A boolean value specifying the enablement of the default "Back" button, with action command ButtonNavigationPanel.BACK_COMMAND. The initial setting is true.

See Also:
isButtonEnabled(java.lang.String)

wizard

protected Wizard wizard
The Wizard object to which the page belongs


pageInfo

protected java.lang.String pageInfo
a String specifying information about the page. May be used as part of the page title.


image

protected java.lang.String image
a String specifying the source path or URL for obtaining the image for the page

See Also:
getStatusImage(), setStatusImage(java.lang.String)
Constructor Detail

BaseWizardPage

public BaseWizardPage(Wizard wizard)
Calls BaseWizardPage(wizard, null). Creates a BaseWizardPage object with the specified wizard, and pageInfo set to null. The image is set to the wizard's default image.

Parameters:
wizard - the Wizard object to which this page belongs
See Also:
wizard

BaseWizardPage

public BaseWizardPage(Wizard wizard,
                      java.lang.String pageInfo)
Creates a BaseWizardPage object with the specified wizard, and pageInfo. The image is set to the wizard's default image.

Parameters:
wizard - the Wizard object to which this page belongs
pageInfo - a String specifying information about the page
See Also:
wizard, pageInfo, getPageInfo(), setPageInfo(java.lang.String)
Method Detail

getPageInfo

public java.lang.String getPageInfo()
WizardPageInterface method. Returns pageInfo, a String specifying information about the page.

Specified by:
getPageInfo in interface WizardPageInterface
Returns:
pageInfo, a String specifying information about the page
See Also:
pageInfo, setPageInfo(java.lang.String)

setPageInfo

public void setPageInfo(java.lang.String description)
Sets pageInfo to description.

Parameters:
description - a String specifying information about the page
See Also:
pageInfo, getPageInfo()

isButtonEnabled

public boolean isButtonEnabled(java.lang.String actionCommand)
WizardPageInterface method.

If the action command actionCommand is ButtonNavigationPanel.NEXT_FINISH_COMMAND, then isNextEnabled is returned. If the action command actionCommand is ButtonNavigationPanel.BACK_COMMAND, then isBackEnabled is returned. Otherwise, true is returned.

Specified by:
isButtonEnabled in interface WizardPageInterface
Parameters:
actionCommand - the action command of the button to check
Returns:
isNextEnabled is returned if actionCommand is ButtonNavigationPanel.NEXT_FINISH_COMMAND, isBackEnabled is returned if actionCommand is ButtonNavigationPanel.BACK_COMMAND, otherwise true is returned.
See Also:
BaseWizardPage, ButtonNavigationPanel

setButtonEnabled

public void setButtonEnabled(java.lang.String actionCommand,
                             boolean isEnabled)

showPage

public void showPage(int directionFlag)
No-op WizardPageInterface method

Specified by:
showPage in interface WizardPageInterface
Parameters:
directionFlag - an integer flag whose bits specify the page that was shown before, relative to this page on the path. Also specifies if it is the first time the page has been shown. Valid values are PREVIOUS, NEXT, or EXPLICIT_SET, in combination with FIRST_TIME_SHOWN, if it is the first time the page has been shown.
See Also:
WizardPageInterface.PREVIOUS, WizardPageInterface.NEXT, WizardPageInterface.FIRST_TIME_SHOWN, WizardPageInterface.EXPLICIT_SET

hidePage

public boolean hidePage(int directionFlag)
WizardPageInterface method. Default behavior returns true.

Specified by:
hidePage in interface WizardPageInterface
Parameters:
directionFlag - an integer flag whose bits specify the page that will be shown after this one, relative to this page on the path. Valid values are PREVIOUS, NEXT, or EXPLICIT_SET.
Returns:
a boolean value indicating if the can be hidden.
See Also:
WizardPageInterface.PREVIOUS, WizardPageInterface.NEXT, WizardPageInterface.EXPLICIT_SET

cleanup

public void cleanup()
No-op WizardPageInterface method

Specified by:
cleanup in interface WizardPageInterface
See Also:
Wizard.cleanup()

getStatusImage

public java.lang.String getStatusImage()
WizardPageInterface method. Returns the image object, a string specifying the source path or URL for obtaining the image for this page.

Specified by:
getStatusImage in interface WizardPageInterface
Returns:
image, a string specifying the source path or URL for obtaining the image for this page
See Also:
image, setStatusImage(java.lang.String)

setStatusImage

public void setStatusImage(java.lang.String imageSource)
Sets the image to imageSource, to specify the source path or URL for obtaining the image for this page

Parameters:
imageSource - a string specifying the source path or URL for obtaining the image for the page
See Also:
image, getStatusImage()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.