Class GenericSpinner

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

public class GenericSpinner extends BaseSpinner
A spinner class that allows arbitrary values, this is effectively a combo box replacement for platforms where a combo box is not available
  • Constructor Details

    • GenericSpinner

      public GenericSpinner()
      Default constructor
  • Method Details

    • getRenderingPrototype

      public String getRenderingPrototype()

      Returns the rendering prototype

      Returns

      the prototype

    • setRenderingPrototype

      public void setRenderingPrototype(String pr)

      The rendering prototype

      Parameters
      • pr: the prototype
    • getRenderingPrototype

      public String getRenderingPrototype(int column)

      Returns the rendering prototype

      Returns

      the prototype

    • setRenderingPrototype

      public void setRenderingPrototype(int column, String pr)

      The rendering prototype

      Parameters
      • column: the column

      • pr: the prototype

    • getColumns

      public int getColumns()

      Return the column count

      Returns

      the number of columns in the spinner

    • setColumns

      public void setColumns(int columns)

      Sets the column count

      Returns

      the number of columns in the spinner

    • getValue

      public Object getValue()

      The value for the spinner

      Returns

      the value

    • setValue

      public void setValue(Object value)

      The value for the spinner

      Parameters
      • value: the value to set
    • getValue

      public Object getValue(int offset)

      The value for the spinner

      Returns

      the value

    • setValue

      public void setValue(int offset, Object value)

      The value for the spinner

      Parameters
      • value: the value 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
    • getModel

      public ListModel getModel()
      Returns

      the model

    • setModel

      public void setModel(ListModel model)
      Parameters
      • model: the model to set
    • getModel

      public ListModel getModel(int offset)
      Returns

      the model

    • setModel

      public void setModel(int offset, ListModel model)
      Parameters
      • model: the model to set
    • getRenderer

      public ListCellRenderer getRenderer(int offset)
      Returns

      the renderer

    • setRenderer

      public void setRenderer(int offset, ListCellRenderer renderer)
      Parameters
      • renderer: the renderer to set
    • getRenderer

      public ListCellRenderer getRenderer()
      Returns

      the renderer

    • setRenderer

      public void setRenderer(ListCellRenderer renderer)
      Parameters
      • renderer: the renderer to set
    • getComponentState

      public Object getComponentState()

      Some components may optionally generate a state which can then be restored using setCompnentState(). This method is used by the UIBuilder.

      Returns

      the component state or null for undefined state.

      Overrides:
      getComponentState in class Component
    • setComponentState

      public void setComponentState(Object state)

      If getComponentState returned a value the setter can update the value and restore the prior state.

      Parameters
      • state: the non-null state
      Overrides:
      setComponentState in class Component