info.aduna.autofocus.gui.sourcewizard
Class NameSheet

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 info.aduna.swing.wizard.WizardSheet
                      extended by info.aduna.autofocus.gui.sourcewizard.SourceSheet
                          extended by info.aduna.autofocus.gui.sourcewizard.NameSheet
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class NameSheet
extends SourceSheet

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class info.aduna.autofocus.gui.sourcewizard.SourceSheet
contentActionListener, contentChangeListener, contentDocumentListener, INITIAL_DATASOURCE_URI, repositoryConfig, TITLE_COLOR
 
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
NameSheet(SourceWizard wizard)
           
 
Method Summary
 void clear()
          A WizardSheet is cleared by the Wizard that contains it when the Wizard is reset to its initial sheet.
protected  JComponent createContent()
           
 Set<? extends WizardSheet> getSubsequentSheets()
          Returns a List that contains all WizardSheet instances that may possibly be returned by the next() method of this WizardSheet.
 boolean hasNext()
          Determines whether there is a next WizardSheet coming after this WizardSheet.
 void initialize()
          This method is invoked just before the WizardSheet is shown, so that it can initialize itself.
 boolean isComplete()
          Determine whether the current state of the input components of this WizardSheet should allow the user to proceed to the next sheet or allow the wizard to finish.
 void madeVisible()
          This method is invoked after is has been made visible, so that it can adapt e.g.
 WizardSheet next()
          Returns the next sheet that should be displayed.
 boolean prepareForNext()
          This method is called just before next() is invoked.
 
Methods inherited from class info.aduna.autofocus.gui.sourcewizard.SourceSheet
createTextArea, getCrawlConfig, getWizard, setRepositoryConfig
 
Methods inherited from class info.aduna.swing.wizard.WizardSheet
addWizardSheetListener, finish, getAllSheets, isCloseable, notifyStateChanged, removeWizardSheetListener, undoIntermediateSettings
 
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, getPreferredSize, 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

NameSheet

public NameSheet(SourceWizard wizard)
Method Detail

getSubsequentSheets

public Set<? extends WizardSheet> getSubsequentSheets()
Description copied from class: WizardSheet
Returns a List that contains all WizardSheet instances that may possibly be returned by the next() method of this WizardSheet. This is used in the initialization of the Wizard, when it needs to gather all WizardSheets it may encounter.

This method and its intended use imply that, before a WizardSheet is shown to the user, all possible WizardSheets are created in advance.

Specified by:
getSubsequentSheets in class WizardSheet

initialize

public void initialize()
Description copied from class: WizardSheet
This method is invoked just before the WizardSheet is shown, so that it can initialize itself.

Specified by:
initialize in class WizardSheet

madeVisible

public void madeVisible()
Description copied from class: WizardSheet
This method is invoked after is has been made visible, so that it can adapt e.g. the focused component. This default implementation does nothing.

Overrides:
madeVisible in class WizardSheet

isComplete

public boolean isComplete()
Description copied from class: WizardSheet
Determine whether the current state of the input components of this WizardSheet should allow the user to proceed to the next sheet or allow the wizard to finish.

Specified by:
isComplete in class WizardSheet

hasNext

public boolean hasNext()
Description copied from class: WizardSheet
Determines whether there is a next WizardSheet coming after this WizardSheet.

The outcome of this method is only applicable when isComplete returns true, since the appropriateness of a subsequent WizardSheet may depend on the input entered in this WizardSheet (e.g. depending on the selection of a button in a set of radio buttons, this may or may not be the last WizardSheet).

Specified by:
hasNext in class WizardSheet

prepareForNext

public boolean prepareForNext()
Description copied from class: WizardSheet
This method is called just before next() is invoked. This may result in certain settings being applied to the underlying component managed by the Wizard or to subsequent WizardSheets when traversing from one WizardSheet to the next (e.g. a file whose location has just been entered may be loaded when the "Next" button is pressed).

This method returns false when something went wrong while applying these intermediate settings (e.g. when the file just entered did not exist). The Wizard should not move to the next WizardSheet when this happens. The WizardSheet itself however is still responsible for taking appropriate actions when this happens (e.g. for reporting the error to the user). The Wizard should respond to this case by not progressing to the next WizardSheet.

The undoIntermediateSettings method of this WizardSheet is required to undo the settings to the underlying component and subsequent WizardSheets that result from the invocation of this method. Of course, the settings done in subsequent WizardSheet may be neglected when they will be overwritten by the next invocation of prepareForNext on this WizardSheet.

Be aware that prepareForNext is never invoked on the last WizardSheet in the Wizard (it is "finish"-ed);

Specified by:
prepareForNext in class WizardSheet

next

public WizardSheet next()
Description copied from class: WizardSheet
Returns the next sheet that should be displayed. This should only be invoked when isComplete, hasNext and prepareForNext all have returned true and in the mean time no changes have occurred in the contents of the WizardSheet.

Note that this method is never invoked on the last WizardSheet in the Wizard.

Specified by:
next in class WizardSheet

clear

public void clear()
Description copied from class: WizardSheet
A WizardSheet is cleared by the Wizard that contains it when the Wizard is reset to its initial sheet. This allows the sheets to release any objects no longer necessary.

Specified by:
clear in class WizardSheet

createContent

protected JComponent createContent()
Specified by:
createContent in class SourceSheet


Copyright © 1997-2008 Aduna. All Rights Reserved.