org.globus.cog.gui.setup.components
Class AbstractSetupComponent

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byorg.globus.cog.gui.util.GridContainer
                  extended byorg.globus.cog.gui.setup.components.AbstractSetupComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, SetupComponent
Direct Known Subclasses:
CertificateAuthorityComponent, DateComponent, IPAddressComponent, LicenseComponent, LocalProxyComponent, PreviousSetupComponent, PrivateKeyComponent, PropertiesFileComponent, RegistrationComponent, UserCertificateComponent

public abstract class AbstractSetupComponent
extends GridContainer
implements SetupComponent

Implementation of the basic methods for a SetupComponent

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, 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
AbstractSetupComponent(String title, String descPath)
          Constructor for the AbstractSetupComponent object
 
Method Summary
 void addComponentStatusChangedListener(ComponentStatusChangedListener CSCL)
          Adds a listener to be notified of status changes for this component
 void addDependency(SetupComponent SC)
          Adds a dependency for this component.
 boolean canFinish()
          Verifies if this component allows the termination of the setup
 boolean completed()
          Completed means that it can have a passed/failed status
 boolean confirmBogusSettings()
          Displays a dialog allowing the user to confirm settings that appear not to be correct
 void displayErrorMessage()
          Displays an error message.
 void enter()
          Called to activate this component
 boolean finish()
          Called after the user pressed the finish button
protected  void fireComponentStatusChangedEvent()
           
 LinkedList getDependencies()
          Returns the dependencies of this component
 Component getLabel()
          Returns this component's label
 String getTitle()
          Returns the title of this component
 Object getVisualComponent()
          Returns the visual (swing) component of this component
 boolean isCompleted()
           
 boolean leave()
          Called before de-activating this component If this method fails (by returning false) the parent container should not continue the activation of the next component.
 void setCompleted(boolean b)
           
 void setErrorMessage(String Message)
          Sets the error message to be (eventually) later used by confirmBogusSettings() or displayErrorMessage()
 void setLabel(Component label)
          Sets the label of this component.
 boolean verify()
          Verifies if the settings in this component appear to be correct
 
Methods inherited from class org.globus.cog.gui.util.GridContainer
getPreferredSize, setGridSize, setPreferredSize, setPreferredSize
 
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, getAccessibleContext, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
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
 

Constructor Detail

AbstractSetupComponent

public AbstractSetupComponent(String title,
                              String descPath)
Constructor for the AbstractSetupComponent object

Parameters:
title - The title of the component
descPath - The path to the main text
Method Detail

addDependency

public void addDependency(SetupComponent SC)
Adds a dependency for this component. The container should check the dependencies and enable this component when the verify methods of the dependencies are all true

Specified by:
addDependency in interface SetupComponent
Parameters:
SC - The dependency to be added

enter

public void enter()
Called to activate this component

Specified by:
enter in interface SetupComponent

leave

public boolean leave()
Called before de-activating this component If this method fails (by returning false) the parent container should not continue the activation of the next component.

Specified by:
leave in interface SetupComponent
Returns:
true if the de-activation is confirmed

getTitle

public String getTitle()
Description copied from interface: SetupComponent
Returns the title of this component

Specified by:
getTitle in interface SetupComponent
Returns:

getVisualComponent

public Object getVisualComponent()
Description copied from interface: SetupComponent
Returns the visual (swing) component of this component

Specified by:
getVisualComponent in interface SetupComponent
Returns:

addComponentStatusChangedListener

public void addComponentStatusChangedListener(ComponentStatusChangedListener CSCL)
Description copied from interface: SetupComponent
Adds a listener to be notified of status changes for this component

Specified by:
addComponentStatusChangedListener in interface SetupComponent
Parameters:
CSCL -

fireComponentStatusChangedEvent

protected void fireComponentStatusChangedEvent()

getDependencies

public LinkedList getDependencies()
Description copied from interface: SetupComponent
Returns the dependencies of this component

Specified by:
getDependencies in interface SetupComponent
Returns:

completed

public boolean completed()
Completed means that it can have a passed/failed status

Specified by:
completed in interface SetupComponent
Returns:
Description of the Return Value

setLabel

public void setLabel(Component label)
Description copied from interface: SetupComponent
Sets the label of this component. A label is a Swing component providing a representation of this component.

Specified by:
setLabel in interface SetupComponent
Parameters:
label - A Swing Component to be used as the label

canFinish

public boolean canFinish()
Verifies if this component allows the termination of the setup

Specified by:
canFinish in interface SetupComponent
Returns:
Description of the Return Value

getLabel

public Component getLabel()
Description copied from interface: SetupComponent
Returns this component's label

Specified by:
getLabel in interface SetupComponent
Returns:

confirmBogusSettings

public boolean confirmBogusSettings()
Displays a dialog allowing the user to confirm settings that appear not to be correct

Returns:
Description of the Return Value

displayErrorMessage

public void displayErrorMessage()
Displays an error message. This method is used for components that cannot be skipped without the correct settings


setErrorMessage

public void setErrorMessage(String Message)
Sets the error message to be (eventually) later used by confirmBogusSettings() or displayErrorMessage()

Parameters:
Message - The new errorMessage value

verify

public boolean verify()
Description copied from interface: SetupComponent
Verifies if the settings in this component appear to be correct

Specified by:
verify in interface SetupComponent
Returns:
Description of the Return Value

finish

public boolean finish()
Called after the user pressed the finish button

Specified by:
finish in interface SetupComponent
Returns:
Description of the Return Value

isCompleted

public boolean isCompleted()

setCompleted

public void setCompleted(boolean b)