|
||||||||||
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
org.openswing.swing.wizard.client.WizardPanel
Title: OpenSwing Framework
Description: Panel that contains two areas: - a list of panels showed alternatively and - a buttons panel, that typically contains a back, next and cancel buttons. A panel may optionally have at the left an image. As default setting, three buttons are showed in the panel: "Back", "Next" and "Cancel". The "Cancel" button is automatically renamed to "Finish" when the wizard shows the last panel. A programmer must add a list of WizardInnerPanel objects though the addPanel() method and could define navigation logic through the method setNavigationLogic(). If this method is not called then a default navigation logic is defined: shows panels from the first added to the last added. When user clicks on the "Next" button the WizardController.getNextPanelId() is called and the related panel is showed. If null is returned then no panel is showed (the current panel is still visible). When user clicks on the "Back" button the WizardController.getBackPanelId() is called and the related panel is showed. If null is returned then no panel is showed (the current panel is still visible). "Back" and "Next" buttons are enabled/disabled automatically, according to WizardController.getFirstPanelId() and WizardController.getLastPanelId() return values. When a panel is showed the init() method is automatically invoked (after "Back"/"Next" buttons abilitations).
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
WizardPanel()
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent actionEvent)
Listen for additional buttons clicks. |
void |
addActionListener(java.awt.event.ActionListener listener)
Add a listener of buttons clicking events. |
void |
addButton(javax.swing.JButton button,
int pos)
Add a button in the specified position. |
void |
addNotify()
Method called when the this panel is set to visible: it calls commitColumnContainer method. |
void |
addPanel(WizardInnerPanel panel)
Register a panel that must be showed inside the wizard panel. |
javax.swing.JButton |
getBackButton()
|
java.lang.String |
getBackImageName()
|
javax.swing.JPanel |
getButtonsPanel()
|
javax.swing.JButton |
getCancelButton()
|
java.lang.String |
getCancelImageName()
|
WizardInnerPanel |
getCurrentVisiblePanel()
|
java.lang.String |
getFinishImageName()
|
java.lang.String |
getImageName()
|
WizardController |
getNavigationLogic()
|
javax.swing.JButton |
getNextButton()
|
java.lang.String |
getNextImageName()
|
WizardInnerPanel |
getPanel(java.lang.String panelId)
|
WizardInnerPanel[] |
getPanels()
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Remove a listener of buttons clicking events. |
void |
removeButton(javax.swing.JButton button)
Remove a button already added. |
void |
setBackImageName(java.lang.String backImageName)
Set image name for "Back" button. |
void |
setCancelImageName(java.lang.String cancelImageName)
Set image name for "Cancel" button. |
void |
setFinishImageName(java.lang.String finishImageName)
Set image name for "Finish" button. |
void |
setImageName(java.lang.String imageName)
This method allows to define an image that will be showed at the left of each inner panel This setting is overrided by the getImageName() method defined for each inner panel. |
void |
setNavigationLogic(WizardController wizardController)
Define a navigation logic. |
void |
setNextImageName(java.lang.String nextImageName)
Set image name for "Next" button. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, 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, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WizardPanel()
Method Detail |
public final void addNotify()
public final javax.swing.JPanel getButtonsPanel()
public final void addButton(javax.swing.JButton button, int pos)
button
- button to addpos
- position inside the buttons panelpublic final void removeButton(javax.swing.JButton button)
button
- button to removepublic final void addActionListener(java.awt.event.ActionListener listener)
listener
- action listenerpublic final void removeActionListener(java.awt.event.ActionListener listener)
listener
- action listener to removepublic final void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed
in interface java.awt.event.ActionListener
public final javax.swing.JButton getBackButton()
public final javax.swing.JButton getCancelButton()
public final javax.swing.JButton getNextButton()
public final void addPanel(WizardInnerPanel panel)
panel
- panel to addpublic final void setNavigationLogic(WizardController wizardController)
public final WizardController getNavigationLogic()
public WizardInnerPanel[] getPanels()
public final WizardInnerPanel getCurrentVisiblePanel()
public final WizardInnerPanel getPanel(java.lang.String panelId)
panelId
- panel identifier
public final void setImageName(java.lang.String imageName)
imageName
- image name; null if no image is requiredpublic final java.lang.String getImageName()
public final java.lang.String getCancelImageName()
public final void setCancelImageName(java.lang.String cancelImageName)
cancelImageName
- image name for "Cancel" buttonpublic final java.lang.String getBackImageName()
public final void setBackImageName(java.lang.String backImageName)
backImageName
- image name for "Back" buttonpublic final java.lang.String getFinishImageName()
public final void setFinishImageName(java.lang.String finishImageName)
finishImageName
- image name for "Finish" buttonpublic final java.lang.String getNextImageName()
public final void setNextImageName(java.lang.String nextImageName)
nextImageName
- image name for "Next" button
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |