Oracle JEWT 4.2.10

oracle.bali.ewt.wizard
Class WizardPage

java.lang.Object
  |
  +--oracle.bali.ewt.wizard.WizardPage
Direct Known Subclasses:
ImageWizardPage

public class WizardPage
extends java.lang.Object

WizardPages hold the content of the wizard. They associate a panel with a unique label.

Context-sensitive Help

While WizardPages lack setHelpTopic() and setHelpBook() methods, context-sensitive help can be set on the content component in the wizard page.

Event summary:

WizardPages can deliver WizardPage.VALIDATE_PAGE events. The WizardEvent.VALIDATE_PAGE event supports the Cancelable interface. The event can be cancelled by calling the cancel() method of this interface; see the Wizard class documentation for more information on page validation.

See Also:
BaseWizard, Wizard, ReentrantWizard, WizardValidateListener, Cancelable

Field Summary
static int NOT_ADDED_INDEX
          Index returned for pages that haven't been added to a Wizard.
 
Constructor Summary
WizardPage(java.awt.Component content)
          Creates a wizard page with no label.
WizardPage(java.awt.Component content, java.lang.String label)
          Creates a wizard page.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 void addWizardValidateListener(WizardValidateListener listener)
          Adds a listener for wizard validation events.
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Delivers a property change event to all registered listeners.
 java.lang.String getAccessibleDescription()
          Get the accessibleDescription of the WizardPage.
 boolean getCanAdvance()
          Checks whether the client is allowed to advance from this page.
 boolean getCanGoBack()
          Checks whether the client is allowed to go backwards from this page.
 java.awt.Component getContent()
          Retrieves the content associated with the page.
 int getIndex()
          Returns the index of the WizardPage in the wizard.
 java.awt.Component getInitialFocus()
          Returns the component that will receive focus initially.
 java.lang.String getLabel()
          Retrieves the label associated with the page.
 BaseWizard getParent()
          Returns the wizard to which this page currently belongs.
 boolean isEnabled()
          Checks if the page is enabled.
 boolean isSelected()
          Checks if the page is selected.
 boolean isVisible()
          Checks if the page is visible.
protected  void processWizardValidateEvent(oracle.bali.ewt.wizard.WizardValidateEvent event)
          Processes a WizardValidateEvent
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void removeWizardValidateListener(WizardValidateListener listener)
          Removes a listener for wizard validation events.
 void setAccessibleDescription(java.lang.String accessibleDescription)
          Set the accessibleDescription of the WizardPage.
 void setCanAdvance(boolean advance)
          Sets whether the client is allowed to advance from this page.
 void setCanGoBack(boolean canGoBack)
          Sets whether the client is allowed to go backwards from this page.
 void setContent(java.awt.Component content)
          Sets the content associated with the page.
 void setEnabled(boolean enabled)
          Enables or disables the page.
 void setInitialFocus(java.awt.Component initialFocus)
          Sets the component that will receive focus initially.
 void setLabel(java.lang.String label)
          Sets the label associated with the page.
 void setVisible(boolean visible)
          Hides or shows the wizard page.
 java.lang.String toString()
          Returns a string representation of the page.
protected  boolean validatePage()
          Sends a validate event, and checks whether any listener cancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_ADDED_INDEX

public static final int NOT_ADDED_INDEX
Index returned for pages that haven't been added to a Wizard.
Constructor Detail

WizardPage

public WizardPage(java.awt.Component content)
Creates a wizard page with no label.
Parameters:
content - the component used for this page.

WizardPage

public WizardPage(java.awt.Component content,
                  java.lang.String label)
Creates a wizard page.
Parameters:
content - the component used for this page.
label - the label on this page. The label is only user-visible for ReentrantWizards.
Method Detail

setVisible

public void setVisible(boolean visible)
Hides or shows the wizard page.
Parameters:
visible - true to show the page, false to hide it.

isVisible

public boolean isVisible()
Checks if the page is visible.

setContent

public void setContent(java.awt.Component content)
Sets the content associated with the page.
Parameters:
content - the new component

getContent

public java.awt.Component getContent()
Retrieves the content associated with the page.

setLabel

public void setLabel(java.lang.String label)
Sets the label associated with the page.
Parameters:
label - the new label. The label is only user-visible if the Wizard is freely navigable.

getLabel

public java.lang.String getLabel()
Retrieves the label associated with the page.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the page.
Parameters:
enabled - true to enable the page, false to disable it.

isEnabled

public boolean isEnabled()
Checks if the page is enabled.

setCanAdvance

public void setCanAdvance(boolean advance)
Sets whether the client is allowed to advance from this page. When false, the "Finish" and "Next" buttons are always disabled. Where possible, clients should use this method to prevent users from advancing, instead of using VALIDATE_PAGE events.

getCanAdvance

public boolean getCanAdvance()
Checks whether the client is allowed to advance from this page.

setCanGoBack

public void setCanGoBack(boolean canGoBack)
Sets whether the client is allowed to go backwards from this page. When false, the "Back" button is always disabled. Clients should refrain from using this functionality unless absolutely necessary.

getCanGoBack

public boolean getCanGoBack()
Checks whether the client is allowed to go backwards from this page.

isSelected

public boolean isSelected()
Checks if the page is selected.
See Also:
BaseWizard.selectPage(oracle.bali.ewt.wizard.WizardPage), BaseWizard.getSelectedPage()

getIndex

public int getIndex()
Returns the index of the WizardPage in the wizard. If the page isn't currently in any wizard, returns -1. The value returned by this function is undefined when a WizardPage is used in a DWizard; clients should consider using getCurrentPageIndex() instead.
See Also:
BaseWizard.getCurrentPageIndex()

getParent

public BaseWizard getParent()
Returns the wizard to which this page currently belongs.

getInitialFocus

public java.awt.Component getInitialFocus()
Returns the component that will receive focus initially.

setInitialFocus

public void setInitialFocus(java.awt.Component initialFocus)
Sets the component that will receive focus initially.

getAccessibleDescription

public java.lang.String getAccessibleDescription()
Get the accessibleDescription of the WizardPage. When the user navigates to this WizardPage the accessibleDescription will be made available to the user.
See Also:
setAccessibleDescription(java.lang.String)

setAccessibleDescription

public void setAccessibleDescription(java.lang.String accessibleDescription)
Set the accessibleDescription of the WizardPage. When the user navigates to this WizardPage the accessibleDescription will be made available to the user.
See Also:
getAccessibleDescription()

addWizardValidateListener

public void addWizardValidateListener(WizardValidateListener listener)
Adds a listener for wizard validation events. The listener will receive validation events for this page only.
Parameters:
listener - the listener

removeWizardValidateListener

public void removeWizardValidateListener(WizardValidateListener listener)
Removes a listener for wizard validation events.
Parameters:
listener - the listener

toString

public java.lang.String toString()
Returns a string representation of the page.
Overrides:
toString in class java.lang.Object

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
Parameters:
listener - The PropertyChangeListener to be removed

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
Delivers a property change event to all registered listeners.
Parameters:
propertyName - The property name
oldValue - The old value of the property
newValue - The new value of the property

validatePage

protected boolean validatePage()
Sends a validate event, and checks whether any listener cancelled
Returns:
true if the validation succeeded, false if a listener cancelled.

processWizardValidateEvent

protected void processWizardValidateEvent(oracle.bali.ewt.wizard.WizardValidateEvent event)
Processes a WizardValidateEvent
Parameters:
event - the event

Oracle JEWT 4.2.10