Class IntegerProperty

  • All Implemented Interfaces:
    Property

    public class IntegerProperty
    extends NumberProperty
    An integer property.
    • Constructor Detail

      • IntegerProperty

        public IntegerProperty​(PropertyGroup group,
                               java.lang.String name,
                               java.lang.String description,
                               PropertyValueHandler valueHandler)
        Constructor. Creates an unbounded integer property.
        Parameters:
        group - the property group
        name - the property name
        description - the property description
        valueHandler - handles values for this property
      • IntegerProperty

        public IntegerProperty​(PropertyGroup group,
                               java.lang.String name,
                               java.lang.String description,
                               int min,
                               int max,
                               int preferredDigitCount,
                               PropertyValueHandler valueHandler)
        Constructor.
        Parameters:
        group - the property group
        name - the property name
        description - the property description
        min - the smallest value that this property can have
        max - the largest value that this property can have
        preferredDigitCount - the preferred number of digits to allocate space for in an editor for a property value
        valueHandler - handles values for this property
    • Method Detail

      • createPositive

        public static IntegerProperty createPositive​(PropertyGroup group,
                                                     java.lang.String name,
                                                     java.lang.String description,
                                                     int preferredDigitCount,
                                                     PropertyValueHandler valueHandler)
        Creates an integer property that can only be set to zero and positive integers.
        Parameters:
        group - the property group
        name - the property name
        description - the property description
        preferredDigitCount - the preferred number of digits to allocate space for in an editor for a property value
        valueHandler - handles values for this property
        Returns:
        an an integer property that can only be set to zero and positive integers
      • get

        public int get​(java.lang.Object valueContainer)
        Returns the integer value of this property in a value container.
        Parameters:
        valueContainer - the value container
        Returns:
        the integer value of this property
      • set

        public void set​(java.lang.Object valueContainer,
                        int value)
        Sets the integer value of this property in a value container.
        Parameters:
        valueContainer - the value container
        value - the float value