JSpinner

Extends
JComponent
Methods
10
Fields
2

Getting one

JSpinner.new(…)

Methods

MethodReturnsDescription
getEditor()Component?The editor: a JSpinner.DefaultEditor holding the formatted field (getEditor():getTextField()).
addChangeListener(any)()Adds a ChangeListener (a table with stateChanged, or that function): it hears each change of the value, the last added first; its event…
removeChangeListener(any)()Removes a ChangeListener, by identity.
getChangeListeners(){any}The ChangeListeners, in registration order.
getModel()SpinnerModelThe model.
getValue()anyThe model's value; a subclass's override is what the field shows.
setValue(any)()The model's value; a change fires the spinner's ChangeEvent.
new(any)JSpinner() -> JSpinner: A spinner over a new SpinnerNumberModel(): 0, no bounds, a step of 1.
init(JSpinner, any)()(JSpinner) -> (): A spinner over a new SpinnerNumberModel(): 0, no bounds, a step of 1.
isInstance(any)booleanWhether obj is a JSpinner object, a class(JSpinner) subclass's included.

Fields

FieldTypeDescription
superJComponentClassJComponent's class table: the base class.
DefaultEditorJSpinnerDefaultEditorClassJSpinner.DefaultEditor: the nested class JSpinnerDefaultEditor.

Returned by

MethodReturnsDescription
JSpinnerClass.newJSpinner() -> JSpinner: A spinner over a new SpinnerNumberModel(): 0, no bounds, a step of 1.

Method details

getEditor

getEditor: (JSpinner) -> Component?

The editor: a JSpinner.DefaultEditor holding the formatted field (getEditor():getTextField()).

addChangeListener

addChangeListener: (JSpinner, any) -> ()

Adds a ChangeListener (a table with stateChanged, or that function): it hears each change of the value, the last added first; its events' source is the spinner.

getValue

getValue: (JSpinner) -> any

The model's value; a subclass's override is what the field shows.

setValue

setValue: (JSpinner, any) -> ()

The model's value; a change fires the spinner's ChangeEvent.

new

new: (any) -> JSpinner

() -> JSpinner: A spinner over a new SpinnerNumberModel(): 0, no bounds, a step of 1.

(any) -> JSpinner: A spinner over model: its arrow buttons, and its editor's field showing the model's value. nil is refused.

init

init: (JSpinner, any) -> ()

(JSpinner) -> (): A spinner over a new SpinnerNumberModel(): 0, no bounds, a step of 1.

(JSpinner, any) -> (): A spinner over model: its arrow buttons, and its editor's field showing the model's value. nil is refused.

isInstance

isInstance: (any) -> boolean

Whether obj is a JSpinner object, a class(JSpinner) subclass's included.