Package docking.widgets.spinner

# Class IntegerSpinner

java.lang.Object
docking.widgets.spinner.IntegerSpinner

public class IntegerSpinner extends Object
Creates a component for editing Integer values using an `IntegerTextField` and a `JSpinner`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntegerSpinner(SpinnerNumberModel spinnerModel)`
  Creates a new IntegerSpinner using the given spinner model.
  `IntegerSpinner(SpinnerNumberModel spinnerModel, int columns)`
  Creates a new IntegerSpinner using the given spinner model.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addChangeListener(ChangeListener listener)`
  Adds a ChangeListener to the model's listener list.
  `protected void`
  `fireStateChanged()`
  Run each ChangeListeners stateChanged() method.
  `JSpinner`
  `getSpinner()`
  Returns the JSpinner that has been attached to the text field.
  `IntegerTextField`
  `getTextField()`
  Returns the IntegerTextField that has been attached to the spinner.
  `void`
  `removeChangeListener(ChangeListener listener)`
  Removes a ChangeListener from the model's listener list.
  `void`
  `setValue(Number value)`
  Sets the given value to both the spinner and the text field.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IntegerSpinner

    public IntegerSpinner(SpinnerNumberModel spinnerModel)
    Creates a new IntegerSpinner using the given spinner model.
    Parameters:
      `spinnerModel` - the spinner model to use in the JSpinner.

  - ### IntegerSpinner

    public IntegerSpinner(SpinnerNumberModel spinnerModel, int columns)
    Creates a new IntegerSpinner using the given spinner model.
    Parameters:
      `spinnerModel` - the spinner model to use in the JSpinner.

- ## Method Details

  - ### getSpinner

    public JSpinner getSpinner()
    Returns the JSpinner that has been attached to the text field.
    Returns:
      the JSpinner that has been attached to the text field

  - ### getTextField

    public IntegerTextField getTextField()
    Returns the IntegerTextField that has been attached to the spinner.
    Returns:
      the IntegerTextField that has been attached to the spinner.

  - ### setValue

    public void setValue(Number value)
    Sets the given value to both the spinner and the text field.
    Parameters:
      `value` - the value to set.

  - ### addChangeListener

    public void addChangeListener(ChangeListener listener)
    Adds a ChangeListener to the model's listener list. The ChangeListeners must be notified when the models value changes.
    Parameters:
      `listener` - the ChangeListener to add

  - ### removeChangeListener

    public void removeChangeListener(ChangeListener listener)
    Removes a ChangeListener from the model's listener list.
    Parameters:
      `listener` - the ChangeListener to remove

  - ### fireStateChanged

    protected void fireStateChanged()
    Run each ChangeListeners stateChanged() method.
    See Also:
      - `setValue(java.lang.Number)`
      - `EventListenerList`