Oracle JEWT 4.2.10

oracle.bali.ewt.wizard
Class ReentrantWizard

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--oracle.bali.ewt.painter.PaintContextComponent
                          |
                          +--oracle.bali.ewt.LWComponent
                                |
                                +--oracle.bali.ewt.wizard.BaseWizard
                                      |
                                      +--oracle.bali.ewt.wizard.ReentrantWizard
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ReentrantWizard
extends BaseWizard

The ReentrantWizard class augments standard wizards with a tabbed interface that lets users jump from one page to any other (visible and enabled) page. They have several other user interface and programmatic differences with the Wizard class.

First, ReentrantWizards always deliver VALIDATE_PAGE events before the user navigates from one page to another, even if the user hits the Previous button; other Wizard classes don't deliver VALIDATE_PAGE events in response to the Previous button.

The Finish button is always enabled in ReentrantWizards, and, by default, ReentrantWizards have an Apply button, though the apply button can be hidden via setCanApply().

Because the user can jump from one page to any other at any time, it is important to enable/disable/show/hide pages as soon as the user makes the decision that affects this (e.g., in an ItemListener on the Checkbox), and not in response to a VALIDATE_PAGE event. Also, clients should never dynamically add and remove pages from a ReentrantWizard. This may make it even more desirable to create the components in a WizardPage's content as late as possible.

See Also:
BaseWizard, Wizard, Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Fields inherited from class oracle.bali.ewt.wizard.BaseWizard
MNEMONIC_APPLY, MNEMONIC_CANCEL, MNEMONIC_FINISH, MNEMONIC_HELP, MNEMONIC_NEXT, MNEMONIC_PREVIOUS
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ReentrantWizard()
          Creates an empty wizard with default values.
ReentrantWizard(boolean sequential)
          Deprecated. The Oracle UI specification states that reentrant wizards should not have back and next buttons. Clients should never use this constructor and instead should use the empty constructor.
 
Method Summary
 WizardPage addPage(WizardPage page, WizardPage beforeWhichPage)
          Adds a page to the wizard.
 void dispose()
          Dispose any memory associated with the ReentrantWizard.
protected  void doNext()
          Handles the user hitting the "Next" button.
protected  void doPrevious()
          Handles the user hitting the "Previous" button.
protected  void enableButtons()
          Enables/disables the wizard's buttons depending on the state of the wizard pages
protected  boolean getMustFinish()
          Checks whether the user can finish at any time, or must reach the last page before finshing.
 java.awt.Dimension getPreferredSize()
          Override to return size defined in Wizard UI Spec.
protected  void pagePropertyChange(WizardPage page, java.beans.PropertyChangeEvent event)
          Called when any owned wizard page fires a PropertyChangeEvent.
protected  boolean pageSelectionChanging(WizardPage to)
          Called before the selection in the ReentrantWizard has changed, either in response to a programmatic call, or in response to a user action.
 void removeAllPages()
          Removes all of the pages from the wizard.
 void removePage(WizardPage page)
          Removes a page from the wizard.
protected  void resetFocus(WizardPage page)
          Re-defaults the focus, based on a wizard page.
protected  void selectPage(WizardPage page, boolean doValidate)
          Selects the page, conditionally validating the selection before allowing it
 
Methods inherited from class oracle.bali.ewt.wizard.BaseWizard
addCustomButton, addImpl, addNotify, addPage, addPageImpl, addPages, addWizardListener, disable, doApply, doCancel, doFinish, doHelp, enable, getAccessibleContext, getButtonMnemonic, getCanAdvance, getCanApply, getCanGoBack, getCurrentPageIndex, getFinishMnemonic, getFinishText, getNextPage, getPageAt, getPageCount, getPreviousPage, getReservedButtonSpaces, getSelectedPage, getUIClassID, isHelpAvailable, paramString, processEventImpl, processWizardEvent, removeCustomButton, removeWizardListener, restart, selectPage, setCanApply, setCurrentPageIndex, setFinishMnemonic, setFinishText, setHelpAvailable, setLocale, setReservedButtonSpaces, setSelectedPage, updateReadingDirection, updateUI, validateSelectedPage
 
Methods inherited from class oracle.bali.ewt.LWComponent
clipToParents, freezeRepaints, getActualAlignment, getActualReadingDirection, getAlignment, getBorderInsets, getDocumentSize, getFill, getPageBounds, getPrintPaintContext, isFocusTraversable, paintChildren, paintComponent, paintImmediateInterior, paintImmediateInterior, paintImmediately, paintOverChildren, printPage, processEvent, repaint, repaintInterior, repaintInterior, setAlignment, setFill, unfreezeRepaints
 
Methods inherited from class oracle.bali.ewt.painter.PaintContextComponent
getBorderContext, getPaintContext, getPaintData, getPaintState, getUIDefaults, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReentrantWizard

public ReentrantWizard()
Creates an empty wizard with default values.

Defaults:


ReentrantWizard

public ReentrantWizard(boolean sequential)
Deprecated. The Oracle UI specification states that reentrant wizards should not have back and next buttons. Clients should never use this constructor and instead should use the empty constructor.

Method Detail

addPage

public WizardPage addPage(WizardPage page,
                          WizardPage beforeWhichPage)
Adds a page to the wizard.
Overrides:
addPage in class BaseWizard
Parameters:
page - the page to be added.
beforeWhichPage - the page before which the new page should be added. If null, the page is added at the end.
Returns:
the added page.

removePage

public void removePage(WizardPage page)
Removes a page from the wizard.
Overrides:
removePage in class BaseWizard
Parameters:
page - the wizard page

removeAllPages

public void removeAllPages()
Removes all of the pages from the wizard.
Overrides:
removeAllPages in class BaseWizard

getPreferredSize

public java.awt.Dimension getPreferredSize()
Override to return size defined in Wizard UI Spec.
Overrides:
getPreferredSize in class BaseWizard

dispose

public void dispose()
Dispose any memory associated with the ReentrantWizard. Once this method is called the ReentrantWizard is unusable and clients should not call any methods on ReentrantWizard.
Overrides:
dispose in class BaseWizard

doPrevious

protected void doPrevious()
Handles the user hitting the "Previous" button.
Overrides:
doPrevious in class BaseWizard

doNext

protected void doNext()
Handles the user hitting the "Next" button.
Overrides:
doNext in class BaseWizard

getMustFinish

protected boolean getMustFinish()
Checks whether the user can finish at any time, or must reach the last page before finshing. Overridden to return false.
Overrides:
getMustFinish in class BaseWizard

selectPage

protected void selectPage(WizardPage page,
                          boolean doValidate)
Selects the page, conditionally validating the selection before allowing it
Overrides:
selectPage in class BaseWizard
Following copied from class: oracle.bali.ewt.wizard.BaseWizard
Parameters:
page - the page to select
boolean - if true, validate the currently selected page before changing selection
See Also:
BaseWizard.getSelectedPage()

pageSelectionChanging

protected boolean pageSelectionChanging(WizardPage to)
Called before the selection in the ReentrantWizard has changed, either in response to a programmatic call, or in response to a user action. Returning false prevents the selection from changing. Most clients should use the VALIDATE_PAGE event, which is delivered after this function is called, but some clients may find this hook useful.
Parameters:
to - the page to which the selection is changing

resetFocus

protected void resetFocus(WizardPage page)
Re-defaults the focus, based on a wizard page.
Overrides:
resetFocus in class BaseWizard

enableButtons

protected void enableButtons()
Enables/disables the wizard's buttons depending on the state of the wizard pages
Overrides:
enableButtons in class BaseWizard

pagePropertyChange

protected void pagePropertyChange(WizardPage page,
                                  java.beans.PropertyChangeEvent event)
Called when any owned wizard page fires a PropertyChangeEvent. Subclassers must call super.pagePropertyChange().
Overrides:
pagePropertyChange in class BaseWizard
Parameters:
page - the WizardPage whose property's are changing
event - a PropertyChangeEvent

Oracle JEWT 4.2.10