Class IntegerProperty

java.lang.Object
ca.corbett.extras.properties.AbstractProperty
ca.corbett.extras.properties.IntegerProperty

public class IntegerProperty extends AbstractProperty
Represents a property that can store some integer value.
Since:
2024-12-30
Author:
scorbo2
  • Field Details

    • value

      protected int value
    • minValue

      protected int minValue
    • maxValue

      protected int maxValue
    • stepValue

      protected int stepValue
    • isSimpleValue

      protected final boolean isSimpleValue
  • Constructor Details

    • IntegerProperty

      public IntegerProperty(String name, String label)
    • IntegerProperty

      public IntegerProperty(String name, String label, int value)
    • IntegerProperty

      public IntegerProperty(String name, String label, int value, int min, int max, int step)
  • Method Details

    • getValue

      public int getValue()
    • setValue

      public IntegerProperty setValue(int value)
    • getMinValue

      public int getMinValue()
    • setMinValue

      public IntegerProperty setMinValue(int minValue)
    • getMaxValue

      public int getMaxValue()
    • setMaxValue

      public IntegerProperty setMaxValue(int maxValue)
    • getStepValue

      public int getStepValue()
    • setStepValue

      public IntegerProperty setStepValue(int stepValue)
    • saveToProps

      public void saveToProps(Properties props)
      Description copied from class: AbstractProperty
      Saves the current value(s) of this property to the given Properties instance.
      Specified by:
      saveToProps in class AbstractProperty
      Parameters:
      props - Any Properties instance which will receive the value(s) of this property.
    • loadFromProps

      public void loadFromProps(Properties props)
      Description copied from class: AbstractProperty
      Loads the value(s) for this property from the given Properties instance, overwriting any current value. The current value of this property will be used as a default value in the event that this property does not exist in the given Properties instance.
      Specified by:
      loadFromProps in class AbstractProperty
      Parameters:
      props - Any Properties instance which contains value(s) for this property.
    • generateFormFieldImpl

      protected FormField generateFormFieldImpl()
      Description copied from class: AbstractProperty
      Descendant classes must implement this method to generate a FormField associated with this property. The generateFormField() method in this class will call this abstract method to create the FormField, which will then be augmented with our fully qualified name, read-only state, help text, and extra attributes.
      Specified by:
      generateFormFieldImpl in class AbstractProperty
      Returns:
      A FormField associated with this property.
    • loadFromFormField

      public void loadFromFormField(FormField field)
      Description copied from class: AbstractProperty
      Populates this Property's value(s) from the given form field, assuming the field is of the correct type.
      Specified by:
      loadFromFormField in class AbstractProperty
      Parameters:
      field - The FormField containing a value for this property.