info.aduna.swing.config
Class ConfigSheetBase
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
info.aduna.swing.config.ConfigSheet
info.aduna.swing.config.ConfigSheetBase
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible
- Direct Known Subclasses:
- ClusterConfigSheet, LinkConfigSheet
public abstract class ConfigSheetBase
- extends ConfigSheet
ConfigSheetBase is a refinement of ConfigSheet that should make life easier
for most ConfigSheet implementators. It implements all abstract methods from
ConfigSheet and defines three on its own. These three methods represent the
three actions of copying settings from and to the represented datastructure
and setting its defaults in the most pure sense. The code in ConfigSheetBase
than takes care of internal administration, GUI updating, etc.
ConfigSheetBase defines instances of the ActionListener and DocumentListener
interfaces that are able to notify ConfigSheetListeners when their event
methods are invoked. Use these objects as ActionListener or DocumentListener
on radio buttons, check boxes, text fields, etc.
- See Also:
- Serialized Form
|
Field Summary |
protected ActionListener |
contentChangeActionListener
A utility ActionListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing. |
protected ChangeListener |
contentChangeChangeListener
A utility ChangeListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing. |
protected DocumentListener |
contentChangeDocumentListener
A utility DocumentListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing. |
protected boolean |
initializing
Flag that indicates that the initializeSettings method is currently
operating and that any events from GUI objects should probably be
ignored. |
|
Method Summary |
void |
applySettings()
Invokes _copySettingsToModel and unsets the contents changed flag. |
abstract void |
copyDefaultsToModel()
Gives the properties of the underlying datastructure that are represented
in this ConfigSheetBase their default value. |
abstract void |
copySettingsFromModel()
Copies the settings from the underlying datastructure to the GUI
components in this ConfigSheetBase. |
abstract void |
copySettingsToModel()
Copies the settings from the GUI components of this ConfigSheetBase to
the underlying datastructure. |
void |
initializeSettings()
Turns on the initialization flag, invoked _copySettingsFromModel and
unsets the contents changed flag. |
boolean |
isChanged()
Returns the value of the contents changed flag. |
boolean |
isDefaultsCapable()
Default implementation that simply returns 'true'. |
void |
resetToDefaultSettings()
Invokes _copyDefaultsToModel and initializeSettings. |
| 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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
initializing
protected boolean initializing
- Flag that indicates that the initializeSettings method is currently
operating and that any events from GUI objects should probably be
ignored.
contentChangeActionListener
protected ActionListener contentChangeActionListener
- A utility ActionListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing.
contentChangeDocumentListener
protected DocumentListener contentChangeDocumentListener
- A utility DocumentListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing.
contentChangeChangeListener
protected ChangeListener contentChangeChangeListener
- A utility ChangeListener that turns on the contents changed flag and
sends a contents changed event to all ConfigSheetListeners, provided that
the ConfigSheet is not initializing.
ConfigSheetBase
public ConfigSheetBase()
ConfigSheetBase
public ConfigSheetBase(String name)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
initializeSettings
public void initializeSettings()
- Turns on the initialization flag, invoked _copySettingsFromModel and
unsets the contents changed flag.
- Specified by:
initializeSettings in class ConfigSheet
isChanged
public boolean isChanged()
- Returns the value of the contents changed flag.
- Specified by:
isChanged in class ConfigSheet
applySettings
public void applySettings()
- Invokes _copySettingsToModel and unsets the contents changed flag.
- Specified by:
applySettings in class ConfigSheet
isDefaultsCapable
public boolean isDefaultsCapable()
- Default implementation that simply returns 'true'.
- Specified by:
isDefaultsCapable in class ConfigSheet
resetToDefaultSettings
public void resetToDefaultSettings()
- Invokes _copyDefaultsToModel and initializeSettings.
- Specified by:
resetToDefaultSettings in class ConfigSheet
copySettingsFromModel
public abstract void copySettingsFromModel()
- Copies the settings from the underlying datastructure to the GUI
components in this ConfigSheetBase.
copySettingsToModel
public abstract void copySettingsToModel()
- Copies the settings from the GUI components of this ConfigSheetBase to
the underlying datastructure.
copyDefaultsToModel
public abstract void copyDefaultsToModel()
- Gives the properties of the underlying datastructure that are represented
in this ConfigSheetBase their default value.
Copyright © 1997-2008 Aduna. All Rights Reserved.