com.zfqjava.swing
Class JWizardPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.zfqjava.swing.JWizardPane
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class JWizardPane
extends javax.swing.JComponent
implements javax.accessibility.Accessible

JWizardPane provides a wizard component.
For the better Look and Feel with the JWizardPane, the side image preferred size is 164x314, the banner image preferred size is 495x62, the logo icon preferred size is 54x54.

In order to provides the better control for wizard, should attach a WizardListener.

The methods showDialog(Component) and showFrame() is easy to use, all window close event has dispathed to cancel() method, that means you can veto dialog or frame close by throws one ActionVetoException in WizardListener.beforeCancel(com.zfqjava.swing.event.WizardEvent) methods.

Client Property:
NameValueDefault Value
JWizardPane.interiorPageStyle
  • BannerTip
  • StepTip
BannerTip

See Also:
Serialized Form

Inner Class Summary
protected  class JWizardPane.AccessibleJWizardPane
          This class implements accessibility support for the JWizardPane class.
protected  class JWizardPane.ModelListener
          We pass ModelChanged events along to the listeners with the wizardpane (instead of the model itself) as the event source.
 
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
 
Field Summary
static int BACK_CONTROL
          Type used for back button on the wizard.
static int CANCEL_CONTROL
          Type used for cancel button on the wizard.
static int FINISH_CONTROL
          Type used for finish button on the wizard.
static int HELP_CONTROL
          Type used for help button on the wizard.
static int NEXT_CONTROL
          Type used for next button on the wizard.
 
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
JWizardPane()
          Constructs a JWizardPane.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a ChangeListener to this wizardpane.
protected  void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
           
 void addPage(java.awt.Component comp)
          Adds a page component, appends to end page.
 void addPage(java.lang.String header, java.lang.String description, java.awt.Component comp)
          Adds a page component with header and description, appends to end page.
 void addPageAt(java.lang.String header, java.lang.String description, java.awt.Component comp, int index)
          Adds a page component with header and description and specify index.
 void addWizardListener(WizardListener l)
          Adds a listener for WizardEvent events.
 void back()
          Called by JWizardPane when the user hits the Back button.
 void cancel()
          Called by JWizardPane when the user hits the Cancel button.
protected  javax.swing.event.ChangeListener createChangeListener()
          Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
protected  javax.swing.JDialog createDialog(java.awt.Component parent, java.lang.String title)
          Creates a dialog for the JWizardPane.
protected  javax.swing.JFrame createFrame(java.lang.String title)
          Creates a frame for the JWizardPane.
 void finish()
          Called by JWizardPane when the user hits the Finish button.
protected  void fireAfterBack()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireAfterCancel()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireAfterFinish()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireAfterHelp()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireAfterNext()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireBeforeBack()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireBeforeCancel()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireBeforeFinish()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireBeforeHelp()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireBeforeNext()
          Notifies all listeners that have registered interest for notification on this event type.
protected  void fireStateChanged()
          Sends a ChangeEvent, whose source is this wizardpane, to each listener.
 javax.accessibility.AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this JWizardPane.
 java.awt.Image getBannerImage()
          Returns the banner image used in top side of wizard pane.
 javax.swing.ImageIcon getBannerImageIcon()
          Returns the banner image used in top side of wizard pane.
 javax.swing.event.ChangeListener[] getChangeListeners()
          Returns an array of all the ChangeListeners added to this JWizardPane with addChangeListener.
 java.awt.Component getComponentAt(int index)
          Gets the component at the specified page index.
 javax.swing.JButton getControlButton(int controlType)
          Gets the control button of the type.
 java.lang.String getDescriptionAt(int index)
          Gets the long description at the speficied page.
 java.lang.String getHeaderAt(int index)
          Gets the short description at the specified page.
 javax.swing.Icon getLogoIcon()
          Returns the logo icon for this wizard.
 java.lang.String getLogoText()
          Returns the logo text for this wizard.
 int getPageCount()
          Returns the page count.
 java.awt.Component getSelectedComponent()
          Returns the currently selected component for this wizard pane.
 int getSelectedIndex()
          Returns the page's selection.
 javax.swing.SingleSelectionModel getSelectionModel()
          Returns the selection model associated with this wizardpane.
 java.awt.Image getSideImage()
          Returns the side image used in left side of wizard pane.
 javax.swing.ImageIcon getSideImageIcon()
          Returns the side image used in left side of wizard pane.
 WizardPaneUI getUI()
          Returns the UI object which implements the L&F for this component.
 java.lang.String getUIClassID()
          Returns the name of the UI class that implements the L&F for this component.
 WizardListener[] getWizardListeners()
          Returns an array of all the WizardListeners added to this JWizardPane with addWizardListener().
 void help()
          Called by JWizardPane when the user hits the Help button.
 int indexOfComponent(java.awt.Component comp)
          Gets the index of that component.
 int indexOfDescription(java.lang.String desc)
          Gets the first index with a given desc, or -1 if no page has this description.
 int indexOfHeader(java.lang.String header)
          Gets the first index with a given header, or -1 if no page has this header.
 void next()
          Called by JWizardPane when the user hits the Next button.
protected  java.lang.String paramString()
          Returns a string representation of this JWizardPane.
 void removeAllPage()
          Removes all page component at JWizardPane.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a ChangeListener from this wizardpane.
 void removePage(java.awt.Component page)
          Removes the page component at JWizardPane.
 void removePageAt(int index)
          Removes the page component at the specify index.
 void removeWizardListener(WizardListener l)
          Removes a listener for WizardEvent events.
 void setBannerImage(java.awt.Image bannerImage)
          Sets the banner image used in top side of wizard pane.
 void setBannerImageIcon(javax.swing.ImageIcon bannerImageIcon)
          Sets the banner image used in top side of wizard pane.
 void setComponentAt(int index, java.awt.Component comp)
          Sets the component at the specified page index.
 void setDescriptionAt(int index, java.lang.String description)
          Sets the page description text at the specified page index.
 void setHeaderAt(int index, java.lang.String header)
          Sets the page header text at the specified page index.
 void setLogoIcon(javax.swing.Icon logoIcon)
          Sets the logo icon for this wizard.
 void setLogoText(java.lang.String logoText)
          Sets the logo text for this wizard.
 void setSelectedComponent(java.awt.Component c)
          Sets the selected component for this wizardpane.
 void setSelectedIndex(int index)
          Sets the page's selected index to index.
 void setSelectionModel(javax.swing.SingleSelectionModel model)
          Sets the selection model to be used with this wizardpane.
 void setSideImage(java.awt.Image sideImage)
          Sets the side image used in left side of wizard pane.
 void setSideImageIcon(javax.swing.ImageIcon sideImageIcon)
          Sets the side image used in left side of wizard pane.
 void setUI(WizardPaneUI ui)
          Sets the UI object which implements the L&F for this component.
 void showDialog(java.awt.Component parent)
          Pops up a dialog contains the JWizardPane and parented to parent with the dialog having a default title.
 void showDialog(java.awt.Component parent, java.lang.String title)
          Pops up a dialog contains the JWizardPane and parented to parent with the dialog having a title title.
 void showFrame()
          Pops up a frame contains the JWizardPane with the frame having a default title.
 void showFrame(java.lang.String title)
          Pops up a frame contains the JWizardPane and with the frame having a title title.
 void updateUI()
          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, 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, setUI, 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, processEvent, 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, setLocale, 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
 

Field Detail

BACK_CONTROL

public static final int BACK_CONTROL
Type used for back button on the wizard.

NEXT_CONTROL

public static final int NEXT_CONTROL
Type used for next button on the wizard.

CANCEL_CONTROL

public static final int CANCEL_CONTROL
Type used for cancel button on the wizard.

FINISH_CONTROL

public static final int FINISH_CONTROL
Type used for finish button on the wizard.

HELP_CONTROL

public static final int HELP_CONTROL
Type used for help button on the wizard.
Constructor Detail

JWizardPane

public JWizardPane()
Constructs a JWizardPane.
Method Detail

getUI

public WizardPaneUI getUI()
Returns the UI object which implements the L&F for this component.
Returns:
a WizardPaneUI object
See Also:
setUI(com.zfqjava.swing.plaf.WizardPaneUI)

setUI

public void setUI(WizardPaneUI ui)
Sets the UI object which implements the L&F for this component.
Parameters:
ui - the new UI object
See Also:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel.
Overrides:
updateUI in class javax.swing.JComponent
See Also:
JComponent.updateUI()

getUIClassID

public java.lang.String getUIClassID()
Returns the name of the UI class that implements the L&F for this component.
Overrides:
getUIClassID in class javax.swing.JComponent
Returns:
the string "WizardPaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getSelectionModel

public javax.swing.SingleSelectionModel getSelectionModel()
Returns the selection model associated with this wizardpane.
See Also:
setSelectionModel(javax.swing.SingleSelectionModel)

setSelectionModel

public void setSelectionModel(javax.swing.SingleSelectionModel model)
Sets the selection model to be used with this wizardpane.
Parameters:
model - the selection model to be used
See Also:
getSelectionModel()

getSelectedIndex

public int getSelectedIndex()
Returns the page's selection.
Returns:
the page's selection, or -1 if there is no selection
See Also:
setSelectedIndex(int)

setSelectedIndex

public void setSelectedIndex(int index)
Sets the page's selected index to index. Notifies any listeners if the page changes
Parameters:
an - int specifying the page selection
See Also:
getSelectedIndex(), addChangeListener(javax.swing.event.ChangeListener)

getSelectedComponent

public java.awt.Component getSelectedComponent()
Returns the currently selected component for this wizard pane. Returns null if there is no currently selected page.
Returns:
the component corresponding to the selected page
See Also:
setSelectedComponent(java.awt.Component)

setSelectedComponent

public void setSelectedComponent(java.awt.Component c)
Sets the selected component for this wizardpane. This will automatically set the selectedIndex to the index corresponding to the specified component.
Throws:
java.lang.IllegalArgumentException - if component not found in wizard pane
See Also:
getSelectedComponent()

setLogoText

public void setLogoText(java.lang.String logoText)
Sets the logo text for this wizard.
Parameters:
logoText - the logo text
Since:
JWizardPane 1.1
See Also:
getLogoText()

getLogoText

public java.lang.String getLogoText()
Returns the logo text for this wizard.
Returns:
the logo text
Since:
JWizardPane 1.1
See Also:
setLogoText(java.lang.String)

setLogoIcon

public void setLogoIcon(javax.swing.Icon logoIcon)
Sets the logo icon for this wizard.
Parameters:
logoIcon - the logo icon
See Also:
getLogoIcon()

getLogoIcon

public javax.swing.Icon getLogoIcon()
Returns the logo icon for this wizard.
Returns:
the logo icon
See Also:
setLogoIcon(javax.swing.Icon)

setSideImage

public void setSideImage(java.awt.Image sideImage)
Sets the side image used in left side of wizard pane.
Parameters:
sideIcon - the left side image
See Also:
getSideImage()

getSideImage

public java.awt.Image getSideImage()
Returns the side image used in left side of wizard pane.
Returns:
the left side Image.
See Also:
setSideImage(java.awt.Image)

setSideImageIcon

public void setSideImageIcon(javax.swing.ImageIcon sideImageIcon)
Sets the side image used in left side of wizard pane.
Parameters:
sideIcon - the left side image
Since:
JWizardPane 1.3
See Also:
getSideImageIcon()

getSideImageIcon

public javax.swing.ImageIcon getSideImageIcon()
Returns the side image used in left side of wizard pane.
Returns:
the left side Image.
Since:
JWizardPane 1.3
See Also:
setSideImageIcon(javax.swing.ImageIcon)

setBannerImage

public void setBannerImage(java.awt.Image bannerImage)
Sets the banner image used in top side of wizard pane.
Parameters:
bannerImage - the banner image to use
Since:
JWizardPane 1.1
See Also:
getBannerImage()

getBannerImage

public java.awt.Image getBannerImage()
Returns the banner image used in top side of wizard pane.
Returns:
the banner image
Since:
JWizardPane 1.1
See Also:
setBannerImage(java.awt.Image)

setBannerImageIcon

public void setBannerImageIcon(javax.swing.ImageIcon bannerImageIcon)
Sets the banner image used in top side of wizard pane.
Parameters:
bannerImageIcon - the banner image to use
Since:
JWizardPane 1.3
See Also:
getBannerImageIcon()

getBannerImageIcon

public javax.swing.ImageIcon getBannerImageIcon()
Returns the banner image used in top side of wizard pane.
Returns:
the banner image
Since:
JWizardPane 1.3
See Also:
setBannerImageIcon(javax.swing.ImageIcon)

showDialog

public void showDialog(java.awt.Component parent)
Pops up a dialog contains the JWizardPane and parented to parent with the dialog having a default title.
Parameters:
parent - the parent of the dialog
See Also:
showDialog(Component,String), showFrame(), showFrame(String)

showDialog

public void showDialog(java.awt.Component parent,
                       java.lang.String title)
Pops up a dialog contains the JWizardPane and parented to parent with the dialog having a title title.
Parameters:
parent - the parent of the dialog
title - the title of the dialog
See Also:
showDialog(Component), showFrame(), showFrame(String)

createDialog

protected javax.swing.JDialog createDialog(java.awt.Component parent,
                                           java.lang.String title)
Creates a dialog for the JWizardPane.
Parameters:
parent - the parent of the dialog
title - the title of the dialog
Since:
JWizardPane 1.2
See Also:
showDialog(Component,String), showDialog(Component)

showFrame

public void showFrame()
Pops up a frame contains the JWizardPane with the frame having a default title.
See Also:
showDialog(Component), showDialog(Component,String), showFrame(String)

showFrame

public void showFrame(java.lang.String title)
Pops up a frame contains the JWizardPane and with the frame having a title title.
Parameters:
title - the title of the frame
See Also:
showDialog(Component), showDialog(Component,String), showFrame()

createFrame

protected javax.swing.JFrame createFrame(java.lang.String title)
Creates a frame for the JWizardPane.
Parameters:
title - the title of the frame
Since:
JWizardPane 1.2
See Also:
showFrame(), showFrame(String)

addPage

public void addPage(java.awt.Component comp)
Adds a page component, appends to end page.
Parameters:
comp - the page component to add
See Also:
addPage(String,String,Component), addPageAt(String,String,Component,int)

addPage

public void addPage(java.lang.String header,
                    java.lang.String description,
                    java.awt.Component comp)
Adds a page component with header and description, appends to end page.
Parameters:
header - the page header
description - the page description
comp - the page component to add
See Also:
addPage(Component), addPageAt(String,String,Component,int)

addPageAt

public void addPageAt(java.lang.String header,
                      java.lang.String description,
                      java.awt.Component comp,
                      int index)
Adds a page component with header and description and specify index.
Parameters:
header - the page header
description - the page description
comp - the page component to add
index - the page index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index > page count)
See Also:
addPage(Component), addPage(String,String,Component)

removePageAt

public void removePageAt(int index)
Removes the page component at the specify index.
Parameters:
index - the page index
See Also:
removePage(Component), removeAllPage()

removePage

public void removePage(java.awt.Component page)
Removes the page component at JWizardPane.
Parameters:
page - the page component to remove
See Also:
removePageAt(int), removeAllPage()

removeAllPage

public void removeAllPage()
Removes all page component at JWizardPane.
Parameters:
page - the page component to remove
See Also:
removePage(Component), removePageAt(int)

addImpl

protected void addImpl(java.awt.Component comp,
                       java.lang.Object constraints,
                       int index)
Overrides:
addImpl in class java.awt.Container

getPageCount

public int getPageCount()
Returns the page count.
Returns:
the page count

indexOfComponent

public int indexOfComponent(java.awt.Component comp)
Gets the index of that component. If no page contains page component, -1 is return.
Parameters:
page - the component
Returns:
the index of the component

indexOfHeader

public int indexOfHeader(java.lang.String header)
Gets the first index with a given header, or -1 if no page has this header.
Parameters:
header - the header for the page
Returns:
the first page index which matches header, or -1 if no page has this header

indexOfDescription

public int indexOfDescription(java.lang.String desc)
Gets the first index with a given desc, or -1 if no page has this description.
Parameters:
header - the description for the page
Returns:
the first page index which matches desc, or -1 if no page has this description

getComponentAt

public java.awt.Component getComponentAt(int index)
Gets the component at the specified page index.
Parameters:
index - the specified page index
Returns:
the component at that index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
setComponentAt(int, java.awt.Component)

setComponentAt

public void setComponentAt(int index,
                           java.awt.Component comp)
Sets the component at the specified page index.
Parameters:
index - the specified page index
page - the component at that index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
getComponentAt(int)

getHeaderAt

public java.lang.String getHeaderAt(int index)
Gets the short description at the specified page.
Parameters:
index - the page index
Returns:
the short description of that page
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
setHeaderAt(int, java.lang.String)

setHeaderAt

public void setHeaderAt(int index,
                        java.lang.String header)
Sets the page header text at the specified page index.
Parameters:
index - the specified page index
page - the header text at that index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
getHeaderAt(int)

getDescriptionAt

public java.lang.String getDescriptionAt(int index)
Gets the long description at the speficied page.
Parameters:
index - the page index
Returns:
the long description of that page
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
setDescriptionAt(int, java.lang.String)

setDescriptionAt

public void setDescriptionAt(int index,
                             java.lang.String description)
Sets the page description text at the specified page index.
Parameters:
index - the specified page index
page - the description text at that index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= page count)
See Also:
getDescriptionAt(int)

getControlButton

public javax.swing.JButton getControlButton(int controlType)
Gets the control button of the type.
Parameters:
controlType - the type of the button to be selected:
  • JWizardPane.BACK_CONTROL
  • JWizardPane.NEXT_CONTROL
  • JWizardPane.CANCEL_CONTROL
  • JWizardPane.FINISH_CONTROL
  • JWizardPane.HELP_CONTROL

next

public void next()
Called by JWizardPane when the user hits the Next button. This can also be called by the programmer. This method causes a wizard event to fire.

back

public void back()
Called by JWizardPane when the user hits the Back button. This can also be called by the programmer. This method causes a wizard event to fire.

cancel

public void cancel()
Called by JWizardPane when the user hits the Cancel button. This can also be called by the programmer. This method causes a wizard event to fire.

finish

public void finish()
Called by JWizardPane when the user hits the Finish button. This can also be called by the programmer. This method causes a wizard event to fire.

help

public void help()
Called by JWizardPane when the user hits the Help button. This can also be called by the programmer. This method causes a wizard event to fire.

fireAfterNext

protected void fireAfterNext()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireAfterBack

protected void fireAfterBack()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireBeforeNext

protected void fireBeforeNext()
                       throws ActionVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireBeforeBack

protected void fireBeforeBack()
                       throws ActionVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireBeforeCancel

protected void fireBeforeCancel()
                         throws ActionVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireAfterCancel

protected void fireAfterCancel()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireBeforeFinish

protected void fireBeforeFinish()
                         throws ActionVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireAfterFinish

protected void fireAfterFinish()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireBeforeHelp

protected void fireBeforeHelp()
                       throws ActionVetoException
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

fireAfterHelp

protected void fireAfterHelp()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.
See Also:
EventListenerList

addWizardListener

public void addWizardListener(WizardListener l)
Adds a listener for WizardEvent events. param l a WizardListener that will be notified when the wizard event fired.

removeWizardListener

public void removeWizardListener(WizardListener l)
Removes a listener for WizardEvent events.
Parameters:
l - the WizardListener to remove

getWizardListeners

public WizardListener[] getWizardListeners()
Returns an array of all the WizardListeners added to this JWizardPane with addWizardListener().

createChangeListener

protected javax.swing.event.ChangeListener createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
See Also:
fireStateChanged()

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to this wizardpane.
Parameters:
l - the ChangeListener to add
See Also:
fireStateChanged(), removeChangeListener(javax.swing.event.ChangeListener)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from this wizardpane.
Parameters:
l - the ChangeListener to remove
See Also:
fireStateChanged(), addChangeListener(javax.swing.event.ChangeListener)

getChangeListeners

public javax.swing.event.ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners added to this JWizardPane with addChangeListener.
Returns:
all of the ChangeListeners added or an empty array if no listeners have been added

fireStateChanged

protected void fireStateChanged()
Sends a ChangeEvent, whose source is this wizardpane, to each listener. This method method is called each time a ChangeEvent is received from the model.
See Also:
addChangeListener(javax.swing.event.ChangeListener), EventListenerList

paramString

protected java.lang.String paramString()
Returns a string representation of this JWizardPane. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
Overrides:
paramString in class javax.swing.JComponent
Returns:
a string representation of this JWizardPane.

getAccessibleContext

public javax.accessibility.AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JWizardPane. For JWizardPanes, the AccessibleContext takes the form of an AccessibleJWizardPane. A new AccessibleJWizardPane instance is created if necessary.
Specified by:
getAccessibleContext in interface javax.accessibility.Accessible
Overrides:
getAccessibleContext in class javax.swing.JComponent
Returns:
an AccessibleJWizardPane that serves as the AccessibleContext of this JWizardPane


Copyright © 2001-2003 Extreme Component, Inc. All rights reserved.