Class NumberArgument

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.ListModel

    public class NumberArgument
    extends Argument
    Represents an argument that expects a numeric value.

    Provides support for specifying a minimum and/or a maximum allowed value

    See Also:
    Serialized Form
    • Field Detail

      • PROPERTY_NUMBER_VALUE

        public static final java.lang.String PROPERTY_NUMBER_VALUE
        The property name for the argument's numeric value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NumberArgument

        public NumberArgument​(ArgumentDescription argDescr,
                              java.lang.Boolean optional,
                              java.lang.Object defaultValue,
                              java.util.List<? extends java.lang.Object> allowedValues,
                              java.net.URI valuesPath,
                              java.util.List<java.lang.String> operators,
                              java.lang.Boolean advanced,
                              java.lang.Integer displayWidth,
                              java.lang.Number min,
                              java.lang.Number max,
                              ArgumentType argType)
        Parameters:
        min - - the minimum allowed value
        max - - the maximum allowed value
      • NumberArgument

        public NumberArgument​(NumberArgument numbArg)
        Constructor that copies the input number argument.
        Parameters:
        numbArg - the number argument to copy
    • Method Detail

      • getMin

        public java.lang.Double getMin()
      • setMin

        public void setMin​(java.lang.Double min)
      • getMax

        public java.lang.Double getMax()
      • setMax

        public void setMax​(java.lang.Double max)
      • setValue

        public void setValue​(java.lang.Object value)
        Overrides:
        setValue in class Argument
      • getNumberValue

        public java.lang.Number getNumberValue()
      • setNumberValue

        public void setNumberValue​(java.lang.Number value)
      • parseValue

        protected java.lang.Object parseValue​(java.lang.String val)
        Overrides:
        parseValue in class Argument
      • getValueTextFieldMinWidth

        public int getValueTextFieldMinWidth()
        The minium width of a text field for the argument value. Used for example if the argument belongs to a group.
        Returns:
        the minium width of a text field for the argument value
      • setValueTextFieldMinWidth

        public void setValueTextFieldMinWidth​(int valueTextFieldMinWidth)
        Set the minium width of a text field for the argument value. Used for example if the argument belongs to a group.
        Parameters:
        valueTextFieldMinWidth - the width value to set
      • getMinTextFieldMinWidth

        public int getMinTextFieldMinWidth()
        Get the minium width of a text field for the argument minimum value. Used for example if the argument belongs to a group.
        Returns:
        the minium width of a text field for the argument minimum value
      • setMinTextFieldMinWidth

        public void setMinTextFieldMinWidth​(int minTextFieldMinWidth)
        Set the minium width of a text field for the argument minimum value. Used for example if the argument belongs to a group.
        Parameters:
        minTextFieldMinWidth - the width to set
      • getMaxTextFieldMinWidth

        public int getMaxTextFieldMinWidth()
        Get the minium width of a text field for the argument maximum value. Used for example if the argument belongs to a group.
        Returns:
        the minium width of a text field for the argument maximum value
      • setMaxTextFieldMinWidth

        public void setMaxTextFieldMinWidth​(int maxTextFieldMinWidth)
        Set the minium width of a text field for the argument maximum value. Used for example if the argument belongs to a group.
        Parameters:
        maxTextFieldMinWidth - the width to set