|
|||||||||||
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.WizardPanel
This class represents a single user interface panel for a
WizardView
component. Subclassers should not construct the
panel's user interface in the constructor, but rather, should provide an
implementation for buildUI()
that fills this purpose.
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.
WizardView
,
WizardPanelSequence
,
Serialized FormNested Class Summary |
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 | |
protected Config |
config
The configuration object for the WizardPanelSequence that
owns this WizardPanel . |
private static java.awt.Font |
defaultFont
|
private KLabel |
l_title
|
private ChangeSupport |
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 | |
WizardPanel()
Construct a new WizardPanel . |
Method Summary | |
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Add a ChangeListener to this object's list of listeners. |
void |
beginFocus()
Begin focus in this component. |
protected abstract java.awt.Component |
buildUI()
Build the user interface for this WizardPanel . |
boolean |
canMoveBackward()
Determine if the user can move backward to the previous panel. |
boolean |
canMoveForward()
Determine if the user can move forward to the next panel. |
protected void |
fireChangeEvent()
Fire a change event. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a ChangeListener from this object's list of
listeners. |
(package private) void |
setConfig(Config config)
|
protected void |
setTitle(java.lang.String title)
Set the title for this WizardPanel . |
abstract void |
syncData()
Synchronize this WizardPanel 's data. |
abstract void |
syncUI()
Synchronize this WizardPanel 's user interface. |
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 ChangeSupport support
private KLabel l_title
protected Config config
WizardPanelSequence
that
owns this WizardPanel
.
private static java.awt.Font defaultFont
Constructor Detail |
public WizardPanel()
WizardPanel
.
Method Detail |
protected abstract java.awt.Component buildUI()
WizardPanel
. This method
must build and return the component that will be displayed in this
WizardPanel
. Typically the implementor will instantiate
a container such as KPanel
, add interface components to it,
and then return that container.
public abstract void syncUI()
WizardPanel
's user interface. This method
is called by the WizardView
immediately before this panel is
made visible to the user. This allows the implementor to update the
state of the components that make up this panel's interface, perhaps
based on the current values of the WizardPanelSequence
's
Config
properties.
public abstract void syncData()
WizardPanel
's data. This method is called
by the WizardView
immediately after this panel is made
invisible (such as when the user moves to the next or previous panel).
This allows the implementor to update the Config
properties
based on the values entered in the panel's user interface.
protected final void setTitle(java.lang.String title)
WizardPanel
. The title is displayed
at the top of the panel.
title
- The new title, or null
if no title is needed.final void setConfig(Config config)
public void beginFocus()
WizardView
immediately after this panel is made visible to
the user. It allows the panel to give input focus to the appropriate
component in its user interface. The default implementation requests
focus for the panel's first child component.
public void addChangeListener(javax.swing.event.ChangeListener listener)
ChangeListener
to this object's list of listeners.
listener
- The listener to add.public void removeChangeListener(javax.swing.event.ChangeListener listener)
ChangeListener
from this object's list of
listeners.
listener
- The listener to remove.protected void fireChangeEvent()
WizardPanel
s should fire
ChangeEvent
s whenever a change in their internal state
would affect the appearance of the WizardView
. For example,
the user may complete data entry in a panel, which should undim the
WizardView
's Next button to allow the user to proceed
to the next panel.
public boolean canMoveForward()
true
if the next panel can be shown, and
false
otherwise. The default implementation returns
true
.public boolean canMoveBackward()
true
if the previous panel can be shown, and
false
otherwise. The default implementation returns
true
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |