|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.awt.Component
![]()
![]()
![]()
java.awt.Container
![]()
![]()
![]()
javax.swing.JComponent
![]()
![]()
![]()
javax.swing.JPanel
![]()
![]()
![]()
javax.swing.JSpinner.DefaultEditor
, LayoutManager
, MenuContainer
, PropertyChangeListener
, Serializable
, EventListener
, Accessible
, ChangeListener

, JSpinner.ListEditor
, JSpinner.NumberEditor


public static class JSpinner.DefaultEditor

, PropertyChangeListener
, LayoutManager

A simple base class for more specialized editors
that displays a read-only view of the model's current
value with a
This class defines a
This class is the
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.
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.
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.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
JSpinner.DefaultEditor
(JSpinner
spinner)
Constructs an editor component for the specified JSpinner.
Method Summary
voidaddLayoutComponent
(String
name,
Component
child)
This LayoutManager method does nothing.
voidcommitEdit
()
Pushes the currently edited value to the SpinnerModel.
voiddismiss
(JSpinner
spinner)
Disconnect this editor from the specified
JSpinner.
JSpinner

getSpinner
()
Returns the JSpinner ancestor of this editor or null.
JFormattedTextField

getTextField
()
Returns the JFormattedTextField child of this
editor.
voidlayoutContainer
(Container
parent)
Resize the one (and only) child to completely fill the area
within the parents insets.
Dimension

minimumLayoutSize
(Container
parent)
Returns the minimum size of first (and only) child plus the
size of the parents insets.
Dimension

preferredLayoutSize
(Container
parent)
Returns the preferred size of first (and only) child plus the
size of the parents insets.
voidpropertyChange
(PropertyChangeEvent
e)
Called by the JFormattedTextField
PropertyChangeListener.
voidremoveLayoutComponent
(Component
child)
This LayoutManager method does nothing.
voidstateChanged
(ChangeEvent
e)
This method is called when the spinner's model's state changes.
Methods inherited from class javax.swing.JPanel

getAccessibleContext
, getUI
, getUIClassID
, paramString
, setUI
, updateUI
