|
Side of Software Wizard Library 1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--sos.wizard.JWizard
A visual component that takes the user through a sequence of pages.
It is comprised of a page panel, an accessory panel, and a button panel. The page panel gathers user input needed to carry out a task. The (optional) accessory panel can be any component or a default list of steps. The (optional) button panel contains a mix of the navigation buttons (Next, Back, and Last) and the action buttons (Finish, Cancel, Help, and Close).
Since the wizard is typically used in a standalone, modal dialog,
clients can invoke the convenience method showDialog
.
This method blocks until the dialog has been dismissed.
A JWizard
component relies on an underlying,
non-null
wizard model to determine
what pages, steps, and buttons to inclue. The methods
that deal with the model are:
JWizard( WizardModel model ); JWizard( WizardModel model, JComponent accessory ); WizardModel getModel(); void setModel( WizardModel );
JComponent getAccessory(); void setAccessory( JComponent accessory );If the accessory is
null
, then the value of the default accessory
property determines the side panel. If the value is
DEFAULT_ACCESSORY_NONE
, then no side panel is used; if
the value is DEFAULT_ACCESSORY_STEPS
, then a list of steps
is used. The methods that deal with the default accessory are
int getDefaultAccessory(); void setDefaultAccessory( int defaultAccessory );
getCurrentPage
method.
The pages are rendered and edited using a page editor.
For a given page, the wizard component determines which
editor to use in the getPageEditor(Page)
method.
Although subclasses may change the behavior, JWizard
's
implementation chooses the editor registered with the
first class along the page's class heirarchy (similar to
javax.swing.JTable
's default look-up mechanism). The
methods that register and retrieve page editors are:
PageEditor getDefaultPageEditor( Page ); void setDefaultPageEditor( Page page, PageEditor pageEditor );
JWizard
, however, can
influence the decision with the following methods:
boolean getHelpButtonIsShown(); void setHelpButtonIsShown( boolean shown ); boolean getControlButtonsAreShown(); void setControlButtonsAreShown( boolean shown );If all of the buttons are hidden-- via
setControlButtonsAreShown(false)
--
then it is the programmer's responsibility to
control the wizard by invoking the following methods,
as needed:
boolean doNext(); void doBack(); boolean doLast(); boolean doFinish(); void doCancel(); void doClose(); void doHelp();Each of the above methods sends a corresponding
java.awt.event.ActionEvent
. To respond to these
actions, register an action listener.
For example, the following code responds to the Help action:
wizard.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent event ) { String command = event.getActionCommand(); if( JWizard.HELP_ACTION.equals( command )) JOptionPane.showMessageDialog( wizard, "The programmer is responsible for responding to the " + "Help button." ); } } );
For more information on how to use and customize a JWizard
,
see Side of Software's online tutorial.
WizardModel
,
Page
,
PageEditor
Nested Class Summary | |
protected class |
JWizard.AccessibleJWizard
A class that implements accessibility support for a JWizard . |
Field Summary | |
static java.lang.String |
ACCESSORY_COMPONENT_PROPERTY
Constant used by property change events to signal that a JWizard 's accessory component has changed. |
static java.lang.String |
BACK_ACTION
Instruction to return to the previous step. |
static java.lang.String |
CANCEL_ACTION
Instruction to cancel the wizard. |
static java.lang.String |
CLOSE_ACTION
Instruction to close the finished wizard. |
static java.lang.String |
CONTROL_BUTTONS_ARE_SHOWN_PROPERTY
Constant used by property change events to signal that a JWizard 's desire to display the controls buttons has changed. |
static int |
DEFAULT_ACCESSORY_NONE
Constant that signals not to use a default accessory component. |
static java.lang.String |
DEFAULT_ACCESSORY_PROPERTY
Constant used by property change events to signal that a JWizard 's default accessory preference has changed. |
static int |
DEFAULT_ACCESSORY_STEPS
Constant that signals to use a list of steps as the default accessory component. |
static java.lang.String |
FINISH_ACTION
Instruction to finish the wizard. |
static java.lang.String |
FINISH_BUTTON_MNEMONIC_PROPERTY
Constant used by property change events to signal that a JWizard 's Finish button mnemonic has changed. |
static java.lang.String |
FINISH_BUTTON_TEXT_PROPERTY
Constant used by property change events to signal that a JWizard 's Finish button text has changed. |
static java.lang.String |
FINISH_BUTTON_TOOL_TIP_TEXT_PROPERTY
Constant used by property change events to signal that a JWizard 's Finish button tooltip text has changed. |
static java.lang.String |
HELP_ACTION
Instruction to provide additional help. |
static java.lang.String |
HELP_BUTTON_IS_SHOWN_PROPERTY
Constant used by property change events to signal that a JWizard 's ability to provide additional help has changed. |
static java.lang.String |
LAST_ACTION
Instruction to advance to the last step. |
static java.lang.String |
NEXT_ACTION
Instruction to advance to the next step. |
static java.lang.String |
PAGE_EDITOR_PROPERTY
Constant used by property change events to signal that a JWizard 's page editor has changed. |
static java.lang.String |
TITLE_FONT_PROPERTY
Constant used by property change events to signal that a JWizard 's title font has changed. |
static java.lang.String |
WIZARD_MODEL_PROPERTY
Constant used by property change events to signal that a JWizard 's model has changed. |
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 | |
JWizard()
Creates a JWizard with a default wizard model. |
|
JWizard(WizardModel wizardModel)
Creates a JWizard with the specified underlying wizard model
and no accessory panel. |
|
JWizard(WizardModel wizardModel,
javax.swing.JComponent accessory)
Creates a JWizard with the specified wizard model
and accessory panel. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds an ActionListener . |
protected WizardModel |
createDefaultWizardModel()
Creates and returns a default wizard model. |
javax.swing.JDialog |
createDialog(java.awt.Frame frame,
java.lang.String dialogTitle)
Creates and returns an instance of JDialog that contains this
wizard and that is centered in frame . |
void |
doBack()
Returns this wizard to the previous step. |
void |
doCancel()
Cancels this wizard. |
void |
doClose()
Closes this wizard. |
boolean |
doFinish()
Finishes this wizard. |
void |
doHelp()
Indicates that additional help is needed. |
boolean |
doLast()
Moves this wizard to the last page. |
boolean |
doNext()
Advances this wizard to the next step. |
void |
editPage(Page page)
Called by the UI to sets the specified page as being the currently edited page. |
protected void |
fireActionPerformed(java.lang.String command)
Notifies all listeners that have registered interest for notification on this event type. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JWizard . |
javax.swing.JComponent |
getAccessory()
Returns the accessory component. |
java.awt.event.ActionListener[] |
getActionListeners()
Returns an array of all the ActionListener s added
to this JWizard with addActionListener . |
boolean |
getControlButtonsAreShown()
Returns whether or not this wizard should show the Next button, Back button, Finish button, etc. |
int |
getDefaultAccessory()
Returns the constant that indicates the type of accessory panel to use if the installed accessory is null . |
PageEditor |
getDefaultPageEditor(java.lang.Class pageClass)
Returns the default page editor for the specified class. |
java.awt.Component |
getEditorComponent()
Returns the component editing the current page. |
int |
getFinishButtonMnemonic()
Returns the Finish button's mnemonic. |
java.lang.String |
getFinishButtonText()
Returns the Finish button's text. |
java.lang.String |
getFinishButtonToolTipText()
Returns the Finish button's tooltip text. |
boolean |
getHelpButtonIsShown()
Returns whether or not this wizard should contains a Help button. |
WizardModel |
getModel()
Returns the model underlying this wizard component. |
PageEditor |
getPageEditor()
Returns the page editor editing the current page. |
protected PageEditor |
getPageEditor(Page page)
Returns an editor that should edit the specified page. |
java.awt.Font |
getTitleFont()
Returns the font to use for this wizard's titles. |
WizardUI |
getUI()
Returns the look and feel delegate that renders this object. |
java.lang.String |
getUIClassID()
Returns the UIDefaults key used to look up the name
of the swing.plaf.ComponentUI class that defines the look and feel
for this component. |
protected void |
initializeDefaultPageEditors()
Creates default cell editors for objects, numbers, and boolean values. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes an ActionListener . |
void |
setAccessory(javax.swing.JComponent accessoryComponent)
Sets this wizard's accessory component, which gets displayed along side the current step. |
void |
setControlButtonsAreShown(boolean controlButtonsAreShown)
Sets whether of not this wizard should contains its Next button, Back button, Finish button, etc. |
void |
setDefaultAccessory(int defaultAccessory)
Set the constant that indicates the type of accessory panel to use when the installed accessory panel is null . |
void |
setDefaultPageEditor(java.lang.Class pageClass,
PageEditor editor)
Sets a default page editor to be used for pages of the specified class. |
void |
setFinishButtonMnemonic(char finishButtonMnemonic)
Sets the mnemonic key for this wizard's Finish button using a character. |
void |
setFinishButtonMnemonic(int finishButtonMnemonic)
Sets the mnemonic key for this wizard's Finish button using an integer. |
void |
setFinishButtonText(java.lang.String finishButtonText)
Sets the text of this wizard's Finish button. |
void |
setFinishButtonToolTipText(java.lang.String finishButtonToolTipText)
Sets the tooltip text of this wizard's Finish button. |
void |
setHelpButtonIsShown(boolean helpButtonIsShown)
Sets whether or not the Help button is rendererd. |
void |
setModel(WizardModel model)
Sets the model underlying this wizard component. |
void |
setPageEditor(PageEditor pageEditor)
Sets the current page editor. |
void |
setTitleFont(java.awt.Font titleFont)
Sets the title font to use in this wizard. |
void |
setUI(WizardUI newUI)
Sets the look and feel delegate for this wizard component. |
int |
showDialog(java.awt.Frame frame,
java.lang.String dialogTitle)
Places this wizard in a modal dialog and blocks until the dialog is either canceled and finished. |
void |
updateUI()
Resets the UI property with the 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, 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 |
public static final java.lang.String ACCESSORY_COMPONENT_PROPERTY
JWizard
's accessory component has changed.
setAccessory(javax.swing.JComponent)
,
Constant Field Valuespublic static final java.lang.String FINISH_BUTTON_MNEMONIC_PROPERTY
JWizard
's Finish button mnemonic has changed.
setFinishButtonMnemonic(int)
,
Constant Field Valuespublic static final java.lang.String FINISH_BUTTON_TEXT_PROPERTY
JWizard
's Finish button text has changed.
setFinishButtonText(java.lang.String)
,
Constant Field Valuespublic static final java.lang.String FINISH_BUTTON_TOOL_TIP_TEXT_PROPERTY
JWizard
's Finish button tooltip text has changed.
setFinishButtonToolTipText(java.lang.String)
,
Constant Field Valuespublic static final java.lang.String HELP_BUTTON_IS_SHOWN_PROPERTY
JWizard
's ability to provide additional help has changed.
setHelpButtonIsShown(boolean)
,
Constant Field Valuespublic static final java.lang.String CONTROL_BUTTONS_ARE_SHOWN_PROPERTY
JWizard
's desire to display the controls buttons has changed.
setControlButtonsAreShown(boolean)
,
Constant Field Valuespublic static final java.lang.String PAGE_EDITOR_PROPERTY
JWizard
's page editor has changed.
setPageEditor(sos.wizard.PageEditor)
,
Constant Field Valuespublic static final java.lang.String TITLE_FONT_PROPERTY
JWizard
's title font has changed.
setTitleFont(java.awt.Font)
,
Constant Field Valuespublic static final java.lang.String WIZARD_MODEL_PROPERTY
JWizard
's model has changed.
setModel(sos.wizard.WizardModel)
,
Constant Field Valuespublic static final java.lang.String DEFAULT_ACCESSORY_PROPERTY
JWizard
's default accessory preference has changed.
setDefaultAccessory(int)
,
Constant Field Valuespublic static final java.lang.String BACK_ACTION
public static final java.lang.String CANCEL_ACTION
public static final java.lang.String CLOSE_ACTION
public static final java.lang.String FINISH_ACTION
public static final java.lang.String HELP_ACTION
public static final java.lang.String LAST_ACTION
public static final java.lang.String NEXT_ACTION
public static final int DEFAULT_ACCESSORY_NONE
setDefaultAccessory(int)
,
Constant Field Valuespublic static final int DEFAULT_ACCESSORY_STEPS
setDefaultAccessory(int)
,
Constant Field ValuesConstructor Detail |
public JWizard()
JWizard
with a default wizard model.
JWizard(WizardModel)
public JWizard(WizardModel wizardModel)
JWizard
with the specified underlying wizard model
and no accessory panel.
wizardModel
- the underlying wizard model (can be null
)public JWizard(WizardModel wizardModel, javax.swing.JComponent accessory)
JWizard
with the specified wizard model
and accessory panel.
wizardModel
- the underlying wizard model (can be null
)accessory
- the accessory component to display next to the
wizard page (can be null
)Method Detail |
public void addActionListener(java.awt.event.ActionListener listener)
ActionListener
.
The ActionListener
will receive an ActionEvent
when one of the wizard component's buttons has been pressed.
listener
- the ActionListener
that is to be notifieddoNext()
,
doBack()
,
doCancel()
,
doClose()
,
doHelp()
,
doFinish()
,
doLast()
,
removeActionListener(java.awt.event.ActionListener)
protected WizardModel createDefaultWizardModel()
public javax.swing.JDialog createDialog(java.awt.Frame frame, java.lang.String dialogTitle)
JDialog
that contains this
wizard and that is centered in frame
.
To display the returned dialog invoke show
on it.
The dialog will automatically be closed and disposed of
when the underlying wizard model finishes. To determine if the dialog closed
because the wizard model finished or was canceled, invoke
getState
on the model.
The size of the returned dialog will be 660 x 400 (as suggested by the Java Look and Feel Design Guidelines Vol. 2) unless its preferred size is larger.
frame
- frame for which the returned dialog will be a child
and will be centereddialogTitle
- title to be used for the dialog
public void doCancel()
ActionEvent
with the action
command CANCEL_ACTION
.
CANCEL_ACTION
public void doClose()
ActionEvent
with the action
command CLOSE_ACTION
.
CLOSE_ACTION
public boolean doFinish()
ActionEvent
with the action
command FINISH_ACTION
.
true
if this wizard successfully stopped the current
editing and invoked finish
on the modelFINISH_ACTION
public void doHelp()
ActionEvent
with the action
command HELP_ACTION
.
HELP_ACTION
public boolean doLast()
ActionEvent
with the action
command LAST_ACTION
.
true
if this wizard successfully stopped the current
editing and advanced to the last pageLAST_ACTION
public boolean doNext()
ActionEvent
with the action
command NEXT_ACTION
.
true
if this wizard successfully stopped the current
editing and advanced to the next pageNEXT_ACTION
public void doBack()
ActionEvent
with the action
command BACK_ACTION
.
BACK_ACTION
public void editPage(Page page)
This implementation invokes getPageEditor(Page)
to determine the editor to use.
page
- page to be edited
java.lang.NullPointerException
- if page
is null
getPageEditor(Page)
protected void fireActionPerformed(java.lang.String command)
command
parameter.
public javax.accessibility.AccessibleContext getAccessibleContext()
AccessibleContext
associated with this JWizard
.
getAccessibleContext
in interface javax.accessibility.Accessible
getAccessibleContext
in class javax.swing.JComponent
AccessibleContext
associated with this JWizard
public javax.swing.JComponent getAccessory()
setAccessory(javax.swing.JComponent)
public java.awt.event.ActionListener[] getActionListeners()
ActionListener
s added
to this JWizard
with addActionListener
.
ActionListener
s added or an empty
array if no listeners have been addedpublic boolean getControlButtonsAreShown()
true
if this wizard should show the control buttonssetControlButtonsAreShown(boolean)
public int getDefaultAccessory()
null
.
ACCESSORY_NONE
if this wizard should not have an
accessory panel; ACCESSORY_STEPS
if this wizard should display
a list of steps in the accessory panelsetDefaultAccessory(int)
public PageEditor getDefaultPageEditor(java.lang.Class pageClass)
pageClass
explicitly,
then the page editor registered with the superclass is returned.
If no page editor is registered for any class along the class
hierarchy, then null
is returned.
pageClass
- the class for which to find the registered
default page editor
pageClass
setDefaultPageEditor(java.lang.Class, sos.wizard.PageEditor)
public java.awt.Component getEditorComponent()
public int getFinishButtonMnemonic()
setFinishButtonMnemonic
has not been
called on this wizard. A value of 0 indicates that
the UI should determine the button's mnemonic.
setFinishButtonMnemonic(int)
,
setFinishButtonMnemonic(char)
public java.lang.String getFinishButtonText()
null
if setFinishButtonText
has not been
called on this wizard. A value of null
indicates that
the UI should determine the button's text.
setFinishButtonText(java.lang.String)
public java.lang.String getFinishButtonToolTipText()
null
if setFinishButtonToolTipText
has not been
called on this wizard. A value of null
indicates that
the UI should determine the button's tooltip text.
setFinishButtonToolTipText(java.lang.String)
public boolean getHelpButtonIsShown()
true
if this wizard should include a Help buttonsetHelpButtonIsShown(boolean)
public WizardModel getModel()
setModel(sos.wizard.WizardModel)
public PageEditor getPageEditor()
protected PageEditor getPageEditor(Page page)
page
- the page to be edited
page
java.lang.NullPointerException
- if page
is null
setDefaultPageEditor(java.lang.Class, sos.wizard.PageEditor)
public java.awt.Font getTitleFont()
setTitleFont(java.awt.Font)
public WizardUI getUI()
public java.lang.String getUIClassID()
UIDefaults
key used to look up the name
of the swing.plaf.ComponentUI
class that defines the look and feel
for this component.
getUIClassID
in class javax.swing.JComponent
UIDefaults
key for a ComponentUI
subclassprotected void initializeDefaultPageEditors()
DefaultCellEditor
public void removeActionListener(java.awt.event.ActionListener listener)
ActionListener
.
listener
- the ActionListener
to removeaddActionListener(java.awt.event.ActionListener)
public void setAccessory(javax.swing.JComponent accessoryComponent)
null
value indicates that there is no accessory component.
accessoryComponent
- component to display next to the
current page (may be null
)getAccessory()
public void setControlButtonsAreShown(boolean controlButtonsAreShown)
controlButtonsAreShown
- true if this wizard should show
its control buttonsgetControlButtonsAreShown()
public void setDefaultAccessory(int defaultAccessory)
null
.
This implementation recognizes the following constants:
DEFAULT_ACCESSORY_NONE
if this wizard should not have an accessory panel
and DEFAULT_ACCESSORY_STEPS
if this wizard should have a list of steps.
defaultAccessory
- getDefaultAccessory()
,
DEFAULT_ACCESSORY_NONE
,
DEFAULT_ACCESSORY_STEPS
,
setAccessory(javax.swing.JComponent)
public void setDefaultPageEditor(java.lang.Class pageClass, PageEditor editor)
editor
is null
,
removes the default editor for the page class.
pageClass
- pages with this class should by default use editor
editor
- default page editor to be used for this pageClassgetDefaultPageEditor(java.lang.Class)
public void setFinishButtonMnemonic(int finishButtonMnemonic)
finishButtonMnemonic
is 0, the UI will determine
the button's mnemonic.The following sample code sets the Finish button's mnemonic to "L"
wizard.setFinishButtonMnemonic( KeyEvent.VK_L );
finishButtonMnemonic
- integer value of the Finish button's
mnemonic keysetFinishButtonMnemonic(char)
,
getFinishButtonMnemonic()
public void setFinishButtonMnemonic(char finishButtonMnemonic)
finishButtonMnemonic
- character value of the Finish button's
mnemonic keysetFinishButtonMnemonic(int)
,
getFinishButtonMnemonic()
public void setFinishButtonText(java.lang.String finishButtonText)
finishButtonText
is null
, the UI will determine
the button's text.
finishButtonText
- the Finish button's text (may be null
)setFinishButtonText(java.lang.String)
,
getFinishButtonText()
public void setFinishButtonToolTipText(java.lang.String finishButtonToolTipText)
finishButtonToolTipText
is null
, the UI will determine
the button's tooltip text.
finishButtonToolTipText
- the Finish button's tooltip text (may be null
)setFinishButtonToolTipText(java.lang.String)
,
getFinishButtonToolTipText()
public void setHelpButtonIsShown(boolean helpButtonIsShown)
helpButtonIsShown
- true
if the Help button should be showngetHelpButtonIsShown()
public void setModel(WizardModel model)
model
- model on which this wizard component should be basedgetModel()
public void setPageEditor(PageEditor pageEditor)
pageEditor
- new editor to edit the current pagegetPageEditor()
public void setTitleFont(java.awt.Font titleFont)
titleFont
- font to use in wizard titlesgetTitleFont()
public void setUI(WizardUI newUI)
newUI
- the new UI delegatepublic int showDialog(java.awt.Frame frame, java.lang.String dialogTitle)
frame
- dialog's parentdialogTitle
- dialog's title
WizardModel.getState()
public void updateUI()
updateUI
in class javax.swing.JComponent
|
Side of Software Wizard Library 1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |