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 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: