|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
javax.swing.JSpinner.DefaultEditor
public static class JSpinner.DefaultEditor
The base class for the editor used by the JSpinner
component.
The editor is in fact a panel containing a JFormattedTextField
component.
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)
Creates a new DefaultEditor object. |
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component child)
This method does nothing. |
void |
commitEdit()
DOCUMENT ME! |
void |
dismiss(JSpinner spinner)
Removes the editor from the ChangeListener list maintained by
the specified spinner . |
JSpinner |
getSpinner()
Returns the JSpinner component that the editor is assigned
to. |
JFormattedTextField |
getTextField()
Returns the text field used to display and edit the current value in the spinner. |
void |
layoutContainer(Container parent)
Sets the bounds for the child components in this container. |
Dimension |
minimumLayoutSize(Container parent)
Calculates the minimum size for this component. |
Dimension |
preferredLayoutSize(Container parent)
Calculates the preferred size for this component. |
void |
propertyChange(PropertyChangeEvent event)
Receives notification of property changes. |
void |
removeLayoutComponent(Component child)
This method does nothing. |
void |
stateChanged(ChangeEvent event)
Receives notification of changes in the state of the JSpinner
that the editor belongs to - the content of the text field is updated
accordingly. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSpinner.DefaultEditor(JSpinner spinner)
DefaultEditor
object. The editor is
registered with the spinner as a ChangeListener
here.
spinner
- the JSpinner
associated with this editorMethod Detail |
---|
public JSpinner getSpinner()
JSpinner
component that the editor is assigned
to.
public void commitEdit() throws ParseException
ParseException
public void dismiss(JSpinner spinner)
ChangeListener
list maintained by
the specified spinner
.
spinner
- the spinner (null
not permitted).public JFormattedTextField getTextField()
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- the parent container.public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- the parent container.
LayoutManager.preferredLayoutSize(Container)
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
parent
- the parent container.
LayoutManager.minimumLayoutSize(Container)
public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface PropertyChangeListener
event
- the event.public void stateChanged(ChangeEvent event)
JSpinner
that the editor belongs to - the content of the text field is updated
accordingly.
stateChanged
in interface ChangeListener
event
- the change event.public void removeLayoutComponent(Component child)
LayoutManager
interface, but since this component has a single child, there is no
need to use this method.
removeLayoutComponent
in interface LayoutManager
child
- the child component to remove.public void addLayoutComponent(String name, Component child)
LayoutManager
interface, but since this component has a single child, there is no
need to use this method.
addLayoutComponent
in interface LayoutManager
name
- the name.child
- the child component to add.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |