org.fife.ui.app
Class WizardDialogInfoPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.fife.ui.app.WizardDialogInfoPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class WizardDialogInfoPanel
extends javax.swing.JPanel

The type of panel you add via a WizardPlugin to a WizardPluginDialog.

Version:
0.1
Author:
Robert Futrell
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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
WizardDialogInfoPanel(java.lang.String header)
          Constructor.
 
Method Summary
 java.lang.String getHeader()
          Returns the "header text" for this dialog panel.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this panel.
protected  WizardPluginDialog getWizard()
          Returns the wizard dialog that contains this panel.
 void isAccepted()
          Called when this panel is "accepted" in the wizard (e.g., the user clicks "Next" and validateInput returns null).
 void isDisplayed()
          Called when this panel is displayed in the wizard.
protected  void saveUserInput(WizardPluginDialog dialog)
          Saves input from the user.
 void setHeader(java.lang.String header)
          Returns the "header text" for this dialog panel.
protected  void setNextButtonEnabled(boolean enabled)
          Enables or disables the "Next" button in the wizard dialog.
 java.lang.String validateInput()
          Ensures all of the data entered by the user is valid.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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
 
Methods inherited from class java.awt.Container
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, 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, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WizardDialogInfoPanel

public WizardDialogInfoPanel(java.lang.String header)
Constructor.

Parameters:
header - The header for this panel.
Method Detail

getHeader

public java.lang.String getHeader()
Returns the "header text" for this dialog panel. The header text is the text displayed at the top of the panel, and is usually a short description of the step represented by this panel.

Returns:
The panel's header.
See Also:
setHeader(String)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of this panel. This is overridden just so wizard dialogs don't get too large.

Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
This panel's preferred size.

getWizard

protected WizardPluginDialog getWizard()
Returns the wizard dialog that contains this panel. Note that this method can only be called after this panel has been added to a wizard dialog.

Returns:
The wizard dialog.

isAccepted

public void isAccepted()
Called when this panel is "accepted" in the wizard (e.g., the user clicks "Next" and validateInput returns null). This gives the panel to do anything "extra" it wants to do.

The default implementation does nothing.

See Also:
isDisplayed()

isDisplayed

public void isDisplayed()
Called when this panel is displayed in the wizard. This gives the panel to do anything "extra" it wants to do, such as disable the "Next" button.

The default implementation does nothing.

See Also:
isAccepted()

setHeader

public void setHeader(java.lang.String header)
Returns the "header text" for this dialog panel. The header text is the text displayed at the top of the panel, and is usually a short description of the step represented by this panel.

Parameters:
header - The panel's header.
See Also:
getHeader()

setNextButtonEnabled

protected void setNextButtonEnabled(boolean enabled)
Enables or disables the "Next" button in the wizard dialog. This method can be used by dialog panels that wish to prevent the user from advancing to the next step in the wizard without first completing the current step.

Parameters:
enabled - Whether or not the "Next" button should be enabled.

saveUserInput

protected void saveUserInput(WizardPluginDialog dialog)
Saves input from the user. This method is called when the user clicks the "Next" button after giving any input needed for this panel. The panel should use the setWizardProperty method of the wizard dialog to save entered data.

The default implementation of this method does nothing.

Parameters:
dialog - The wizard dialog.

validateInput

public java.lang.String validateInput()
Ensures all of the data entered by the user is valid. If it is, null should be returned. If it isn't, then a message is returned that is displayed, instructing the user on how to correct the error.

Returns:
null if all input in this panel is correct, or a message explaining an error if errors exist. The default method returns null.