JIDE 3.5.15

com.jidesoft.wizard
Class AbstractWizardPage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.dialog.AbstractPage
                      extended by com.jidesoft.dialog.AbstractDialogPage
                          extended by com.jidesoft.wizard.AbstractWizardPage
All Implemented Interfaces:
Laziness, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
DefaultWizardPage

public abstract class AbstractWizardPage
extends AbstractDialogPage

AbstractWizardPage is the base class for wizard page. It extends AbstractDialogPage. In addition, it has two more abstract methods.

It only has several methods which you can override to get certain features.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JComponent _wizardContent
           
static int LEFTPANE_CUSTOM
          Show any customized content on left pane.
static int LEFTPANE_EMPTY
          Show left pane but with nothing in it.
static int LEFTPANE_GRAPHIC
          Show an image on left pane.
static int LEFTPANE_HELP
          Show help on left pane.
static int LEFTPANE_NONE
          Do not show left pane.
static int LEFTPANE_STEPS
          Show steps on left pane.
 
Fields inherited from class com.jidesoft.dialog.AbstractDialogPage
_buttonEvent, _description, _icon, _pageEnabled, _parentPage, _title, DESCRIPTION_PROPERTY, ICON_PROPERTY, PROPERTY_PAGE_ENABLED, TITLE_PROPERTY
 
Fields inherited from class com.jidesoft.dialog.AbstractPage
_pageEvent, INVOKE_ON_ALL, INVOKE_ON_NONE, INVOKE_ON_PAINT, INVOKE_ON_REPAINT, INVOKE_ON_UPDATE, INVOKE_ON_VALIDATE
 
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
AbstractWizardPage(String title)
          Creates a wizard page with title.
AbstractWizardPage(String title, Icon icon)
          Creates a wizard page with title and icon.
AbstractWizardPage(String title, String description)
          Creates a wizard page with title and description.
AbstractWizardPage(String title, String description, Icon icon)
          Creates a wizard page with title, description and icon.
 
Method Summary
abstract  JComponent createWizardContent()
          Subclass should implement this method to creates content of a wizard page.
 Border getContentThickBorder()
          Gets the value from UIDefaults with key "Wizard.thickPageBorder".
 Border getContentThinBorder()
          Gets the value from UIDefaults with key "Wizard.thinPageBorder".
 JComponent getCustomLeftPane()
          Gets the component that will be displayed on the left pane.
 Image getGraphic()
          Gets the graphic that will be displayed on the left pane.
 String getHelpText()
          Gets the help text.
 int getLeftPaneItems()
          Gets what items to be shown on left pane.
 WizardDialogPane getOwner()
          Gets the owner of this page.
 int getSelectedStepIndex()
          Gets the selected step index.
 List<String> getSteps()
          Gets the steps to be show in step pane.
 JComponent getWizardContent()
          Retrieves the wizard content.
 void lazyInitialize()
          Initialize the wizard page.
 void setHelpText(String text)
          Sets the help text.
 void setLeftPaneItems(int leftPaneItems)
          Sets what to show in left pane.
abstract  void setupWizardButtons()
          Subclass should implement this method to setup the buttons.
 boolean showBannerPane()
          Subclass can implement this method to decide if the banner panel should be visible when this page is displayed in wizard.
protected  void updateHeaderPanel(JComponent headerPanel, AbstractDialogPage page)
          Updates the banner panel based on current page.
 
Methods inherited from class com.jidesoft.dialog.AbstractDialogPage
addButtonListener, fireButtonEvent, fireButtonEvent, fireButtonEvent, focusDefaultFocusComponent, getButtonListeners, getDefaultFocusComponent, getDescription, getFullTitle, getIcon, getParentPage, getTitle, isPageEnabled, removeButtonListener, setDefaultFocusComponent, setDescription, setIcon, setPageEnabled, setParentPage, setTitle
 
Methods inherited from class com.jidesoft.dialog.AbstractPage
addPageListener, allowClosing, firePageEvent, firePageEvent, getInvokeCondition, getPageListeners, initialize, invalidate, paint, paintAll, paintComponents, removePageListener, repaint, repaint, repaint, repaint, reset, revalidate, setAllowClosing, setInvokeCondition, update
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEFTPANE_NONE

public static final int LEFTPANE_NONE
Do not show left pane.

See Also:
Constant Field Values

LEFTPANE_EMPTY

public static final int LEFTPANE_EMPTY
Show left pane but with nothing in it.

See Also:
Constant Field Values

LEFTPANE_GRAPHIC

public static final int LEFTPANE_GRAPHIC
Show an image on left pane.

See Also:
Constant Field Values

LEFTPANE_STEPS

public static final int LEFTPANE_STEPS
Show steps on left pane.

See Also:
Constant Field Values

LEFTPANE_HELP

public static final int LEFTPANE_HELP
Show help on left pane.

See Also:
Constant Field Values

LEFTPANE_CUSTOM

public static final int LEFTPANE_CUSTOM
Show any customized content on left pane.

See Also:
Constant Field Values

_wizardContent

protected JComponent _wizardContent
Constructor Detail

AbstractWizardPage

public AbstractWizardPage(String title)
Creates a wizard page with title.

Parameters:
title - the title of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page above the separate line (in Java L&F standard)

AbstractWizardPage

public AbstractWizardPage(String title,
                          String description)
Creates a wizard page with title and description.

Parameters:
title - the title of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page above the separate line (in Java L&F standard)
description - the description of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page below the separate line (in Java L&F standard)

AbstractWizardPage

public AbstractWizardPage(String title,
                          Icon icon)
Creates a wizard page with title and icon.

Parameters:
title - the title of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page above the separate line (in Java L&F standard)
icon - the icon of the page. It will be displayed in banner (in Wizard 97 standard)

AbstractWizardPage

public AbstractWizardPage(String title,
                          String description,
                          Icon icon)
Creates a wizard page with title, description and icon.

Parameters:
title - the title of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page above the separate line (in Java L&F standard)
description - the description of the page. It will be displayed in banner (in Wizard 97 standard) or top of the content page below the separate line (in Java L&F standard)
icon - the icon of the page. It will be displayed in banner (in Wizard 97 standard)
Method Detail

getOwner

public WizardDialogPane getOwner()
Gets the owner of this page. When this page is added to PageList and set to a wizard dialog, getOwner will return the wizard dialog. Or it will return null since it hasn't be set.

Returns:
the wizard dialog which this page is added to

createWizardContent

public abstract JComponent createWizardContent()
Subclass should implement this method to creates content of a wizard page.

Returns:
wizard content component

setupWizardButtons

public abstract void setupWizardButtons()
Subclass should implement this method to setup the buttons. All you need to do when implements this method is to fireButtonEvent.


getWizardContent

public JComponent getWizardContent()
Retrieves the wizard content. This will return the wizard content created by createWizardContent(). It will return null if the wizard page is not visible because of lazy loading.

Returns:
the wizard content.

showBannerPane

public boolean showBannerPane()
Subclass can implement this method to decide if the banner panel should be visible when this page is displayed in wizard.

By default, it will return true in Wizard 97 for interior pages and false for Java L&F standard wizard.

Returns:
true if banner panel should be visible. False other wise.

lazyInitialize

public void lazyInitialize()
Initialize the wizard page. By default, it will create wizard content and put into center of a JPanel. The JPanel will have the border read from UIDefaults "Wizard.pageBorder".

In Java L&F wizard standard, a page header will be added to the north of the JPanel to show the title and description of this page.


updateHeaderPanel

protected void updateHeaderPanel(JComponent headerPanel,
                                 AbstractDialogPage page)
Updates the banner panel based on current page. Banner panel is used to display the title, subtitle or icon of current page. If you use the default banner panel we provided, all these are done automatically. However if you provide your own banner panel and didn't use BannerPanel as the base class, you need to override this method to update title, subtitle, or icon by yourself.

Parameters:
headerPanel - the header panel
page - the dialog page

getContentThinBorder

public Border getContentThinBorder()
Gets the value from UIDefaults with key "Wizard.thinPageBorder". According to Wizard 97 standard, a page can have two different margin. One is wider which is can be get using getContentThickBorder(). The other is thinner which can be get using this method.

Returns:
the border from UIDefaults with key "Wizard.thinPageBorder".

getContentThickBorder

public Border getContentThickBorder()
Gets the value from UIDefaults with key "Wizard.thickPageBorder". According to Wizard 97 standard, a page can have two different margin. One is thinner which is can be get using getContentThinBorder(). The other is wider which can be get using this method.

Returns:
the border from UIDefaults with key "Wizard.thickPageBorder".

getLeftPaneItems

public int getLeftPaneItems()
Gets what items to be shown on left pane. Subclass can override to return the value it wants. It's a bitwise OR of LEFTPANE_XXX but not all combinations are valid. Valid combinations are

By default, it will return LEFTPANE_STEPS in Java L&F standard wizard and LEFTPANE_NONE in Wizard 97 standard.

Returns:
what to show on left pane.

setLeftPaneItems

public void setLeftPaneItems(int leftPaneItems)
Sets what to show in left pane.

Parameters:
leftPaneItems - the left pane item bitmap

getSteps

public List<String> getSteps()
Gets the steps to be show in step pane. This method will be called by WizardDialog only when leftPaneItem's LEFTPANE_STEPS bit is on.

By default, it will return the pages title as java.util.List.

Returns:
the steps as java.util.List.

getSelectedStepIndex

public int getSelectedStepIndex()
Gets the selected step index.

Returns:
the selected step index.

setHelpText

public void setHelpText(String text)
Sets the help text. It will only have effect when getLeftPaneItems() return a value when LEFTPANE_HELP bit is on.

Parameters:
text - new help text

getHelpText

public String getHelpText()
Gets the help text.

Returns:
current help text.

getGraphic

public Image getGraphic()
Gets the graphic that will be displayed on the left pane. It Subclass can override this method to return any graphic. It is only used when getLeftPaneItems() == LEFTPANE_GRAPHIC

Returns:
the graphic that will be displayed in left pane.

getCustomLeftPane

public JComponent getCustomLeftPane()
Gets the component that will be displayed on the left pane. It Subclass can override this method to return any JComponen t. However it will only have effect when getLeftPaneItems == LEFTPANE_CUSTOM.

Returns:
the left pane.

JIDE 3.5.15