public abstract class WizardPanel extends KPanel
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.WizardView
,
WizardPanelSequence
,
Serialized FormJPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected Config |
config
The configuration object for the
WizardPanelSequence that
owns this WizardPanel . |
private static Font |
defaultFont |
private KLabel |
l_title |
private ChangeSupport |
support |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WizardPanel()
Construct a new
WizardPanel . |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Add a
ChangeListener to this object's list of listeners. |
void |
beginFocus()
Begin focus in this component.
|
protected abstract 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(ChangeListener listener)
Remove a
ChangeListener from this object's list of
listeners. |
(package private) void |
setConfig(Config config) |
protected void |
setTitle(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. |
getComponentByName, paintComponent, setFocusOrder, setTexture
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, 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, update
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, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private ChangeSupport support
protected Config config
WizardPanelSequence
that
owns this WizardPanel
.private static Font defaultFont
public WizardPanel()
WizardPanel
.protected abstract 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(String title)
WizardPanel
. The title is displayed
at the top of the panel.title
- The new title, or null
if no title is needed.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(ChangeListener listener)
ChangeListener
to this object's list of listeners.listener
- The listener to add.public void removeChangeListener(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
.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses