Class NumericSpinner

All Implemented Interfaces:
Animation, Editable, StyleListener, Iterable<Component>

public class NumericSpinner extends BaseSpinner
A spinner class that allows picking a number
  • Constructor Details

    • NumericSpinner

      public NumericSpinner()
      Default constructor
  • Method Details

    • getMin

      public double getMin()

      The minimum value for the spinner

      Returns

      the min

    • setMin

      public void setMin(double min)

      The minimum value for the spinner

      Parameters
      • min: the min to set
    • getMax

      public double getMax()

      The maximum value for the spinner

      Returns

      the max

    • setMax

      public void setMax(double max)

      The maximum value for the spinner

      Parameters
      • max: the max to set
    • getValue

      public double getValue()

      The value for the spinner

      Returns

      the value

    • setValue

      public void setValue(double value)

      The value for the spinner

      Parameters
      • value: the value to set
    • getStep

      public double getStep()

      Step for spinner gap

      Returns

      the step

    • setStep

      public void setStep(double step)

      Step for spinner gap

      Parameters
      • step: the step to set
    • getPropertyNames

      public String[] getPropertyNames()

      A component may expose mutable property names for a UI designer to manipulate, this API is designed for usage internally by the GUI builder code

      Returns

      the property names allowing mutation

      Overrides:
      getPropertyNames in class Component
    • getPropertyTypes

      public Class[] getPropertyTypes()

      Matches the property names method (see that method for further details).

      Returns

      the types of the properties

      Overrides:
      getPropertyTypes in class Component
    • getPropertyTypeNames

      public String[] getPropertyTypeNames()

      This method is here to workaround an XMLVM array type bug where property types aren't identified properly, it returns the names of the types using the following type names: String,int,double,long,byte,short,char,String[],String[][],byte[],Image,Image[],Object[],ListModel,ListCellRenderer

      Returns

      Array of type names

      Overrides:
      getPropertyTypeNames in class Component
    • getPropertyValue

      public Object getPropertyValue(String name)

      Returns the current value of the property name, this method is used by the GUI builder

      Parameters
      • name: the name of the property
      Returns

      the value of said property

      Overrides:
      getPropertyValue in class Component
    • setPropertyValue

      public String setPropertyValue(String name, Object value)

      Sets a new value to the given property, returns an error message if failed and null if successful. Notice that some builtin properties such as "$designMode" might be sent to components to indicate application state.

      Parameters
      • name: the name of the property

      • value: new value for the property

      Returns

      error message or null

      Overrides:
      setPropertyValue in class Component