javax.swing
Class JSpinner.DefaultEditor
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--javax.swing.JSpinner.DefaultEditor
- All Implemented Interfaces:
- Accessible, ChangeListener, EventListener, ImageObserver, LayoutManager, MenuContainer, PropertyChangeListener, Serializable
- Direct Known Subclasses:
- JSpinner.DateEditor, JSpinner.ListEditor, JSpinner.NumberEditor
- Enclosing class:
- JSpinner
- public static class JSpinner.DefaultEditor
- extends JPanel
- implements ChangeListener, PropertyChangeListener, LayoutManager
A simple base class for more specialized editors
that displays a read-only view of the model's current
value with a JFormattedTextField. Subclasses
can configure the JFormattedTextField to create
an editor that's appropriate for the type of model they
support and they may want to override
the stateChanged and propertyChanged
methods, which keep the model and the text field in sync.
This class defines a dismiss method that removes the
editors ChangeListener from the JSpinner
that it's part of. The setEditor method knows about
DefaultEditor.dismiss, so if the developer
replaces an editor that's derived from JSpinner.DefaultEditor
its ChangeListener connection back to the
JSpinner will be removed. However after that,
it's up to the developer to manage their editor listeners.
Similarly, if a subclass overrides createEditor,
it's up to the subclasser to deal with their editor
subsequently being replaced (with setEditor).
We expect that in most cases, and in editor installed
with setEditor or created by a createEditor
override, will not be replaced anyway.
LayoutManager for it's single
JFormattedTextField child. By default the
child is just centered with the parents insets.
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, 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, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, |