W3cubDocs

/OpenJDK 8 GUI

Class JSpinner.ListEditor

All Implemented Interfaces:
ImageObserver, LayoutManager, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ChangeListener
Enclosing class:
JSpinner
public static class JSpinner.ListEditor
extends JSpinner.DefaultEditor

An editor for a JSpinner whose model is a SpinnerListModel.

Since:
1.4

Nested Classes

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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

Fields

Fields inherited from class javax.swing.JComponent

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

accessibleContext, 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

Constructors

ListEditor

public ListEditor(JSpinner spinner)

Construct a JSpinner editor that supports displaying and editing the value of a SpinnerListModel with a JFormattedTextField. This ListEditor becomes both a ChangeListener on the spinner and a PropertyChangeListener on the new JFormattedTextField.

Parameters:
spinner - the spinner whose model this editor will monitor
Throws:
IllegalArgumentException - if the spinners model is not an instance of SpinnerListModel
See Also:
getModel(), SpinnerListModel

Methods

getModel

public SpinnerListModel getModel()

Return our spinner ancestor's SpinnerNumberModel.

Returns:
getSpinner().getModel()
See Also:
JSpinner.DefaultEditor.getSpinner(), JSpinner.DefaultEditor.getTextField()

© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.