|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
kiwi.ui.KPanel
kiwi.ui.WizardView
A wizard-style component. WizardView
essentially displays a
sequence of panels (or "cards") to the user; each panel typically
contains messages and/or input elements. A WizardPanelSequence
object functions as the source of these panels, and determines the order
in which the panels are presented to the user, and the conditions under
which forward and backward movement is allowed between consecutive panels.
This component is arranged as follows. The leftmost portion of the
component is used to display an image (which for best results should be
transparent). Animated GIFs are acceptable. The bottom portion of the
component displays the Back, Next, and Cancel
buttons. The remaining space is occupied by the current
WizardPanel
provided by the WizardPanelSequence
object.
The WizardPanelSequence
determines when the user may move to
the next or previous panel. Whenever these conditions change, the
WizardPanelSequence
fires a ChangeEvent
to
notify the WizardView
, which responds by dimming or
undimming the Next and Back buttons, as appropriate. When
the final panel in the sequence is reached, the Next button changes
to a Finish button.
If the Cancel button is pressed, an ActionEvent
is
fired with an action command of "cancel". If the Finish button is
pressed, an ActionEvent
is fired with an action command of
"finish".
The goal of the Wizard
family of classes was to provide a
framework for creating wizards that was as flexible as possible, without
creating a large amount of classes and interfaces to achieve that goal.
Therefore the APIs for these classes may at first appear counterintuitive
or inelegant. If they are found to be too cumbersome, they will be changed
in a future release of Kiwi.
ChangeEvent
,
WizardPanelSequence
,
Serialized FormNested Class Summary | |
private class |
WizardView._ActionListener
|
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private WizardView._ActionListener |
actionListener
|
private KButton |
b_cancel
|
private KButton |
b_next
|
private KButton |
b_prev
|
private KPanel |
content
|
private int |
count
|
private WizardPanel |
curPanel
|
private boolean |
finish
|
private javax.swing.Icon |
i_next
|
private KLabel |
iconLabel
|
private ButtonPanel |
p_buttons
|
private int |
pos
|
private java.lang.String |
s_back
|
private java.lang.String |
s_cancel
|
private java.lang.String |
s_finish
|
private java.lang.String |
s_next
|
private WizardPanelSequence |
sequence
|
private ActionSupport |
support
|
Fields inherited from class kiwi.ui.KPanel |
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
WizardView(WizardPanelSequence sequence)
Construct a new WizardView . |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener listener)
Add an ActionListener to this component's list of listeners. |
void |
addButton(javax.swing.JButton button,
int pos)
Add a button to the WizardView at the specified position. |
javax.swing.JButton |
getCancelButton()
Get a reference to the Cancel button. |
javax.swing.JButton |
getFinishButton()
Get a reference to the Finish button. |
private void |
refresh()
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Add an ActionListener to this component's list of listeners. |
void |
removeButton(int pos)
Remove a button from the specified position in the ButtonPanel . |
void |
reset()
Reset the WizardView . |
void |
setIcon(javax.swing.Icon icon)
Set the component's icon. |
private void |
showPanel(WizardPanel panel)
|
Methods inherited from class kiwi.ui.KPanel |
getComponentByName, paintComponent, setFocusOrder, setTexture |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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, paintImmediately, paintImmediately, 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 |
private KButton b_prev
private KButton b_next
private KButton b_cancel
private KLabel iconLabel
private WizardPanelSequence sequence
private KPanel content
private WizardPanel curPanel
private int pos
private int count
private javax.swing.Icon i_next
private boolean finish
private ActionSupport support
private java.lang.String s_next
private java.lang.String s_back
private java.lang.String s_finish
private java.lang.String s_cancel
private WizardView._ActionListener actionListener
private ButtonPanel p_buttons
Constructor Detail |
public WizardView(WizardPanelSequence sequence)
WizardView
.
sequence
- The WizardPanelSequence
that will provide
WizardPanel
s for the wizard.Method Detail |
public javax.swing.JButton getCancelButton()
public javax.swing.JButton getFinishButton()
public void addButton(javax.swing.JButton button, int pos) throws java.lang.IllegalArgumentException
WizardView
at the specified position.
button
- The button to add.pos
- The position at which to add the button. The value 0 denotes
the first position, and -1 denotes the last position.
java.lang.IllegalArgumentException
- If the value of
pos
is invalid.public void removeButton(int pos) throws java.lang.IllegalArgumentException
ButtonPanel
.
pos
- The position of the button to remove, where 0 denotes the
first position.
java.lang.IllegalArgumentException
- If an attempt is made
to remove one of the predefined wizard buttons.public void setIcon(javax.swing.Icon icon)
WizardView
s.
icon
- The new icon to use, or null
if no icon is
needed.private void showPanel(WizardPanel panel)
public void reset()
WizardView
. Resets the component so that the first
panel is displayed. This method also calls the
WizardPanelSequence
's reset()
method.
WizardPanelSequence.reset()
private void refresh()
public void addActionListener(java.awt.event.ActionListener listener)
ActionListener
to this component's list of listeners.
listener
- The listener to add.public void removeActionListener(java.awt.event.ActionListener listener)
ActionListener
to this component's list of listeners.
listener
- The listener to add.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |