Class NumberElement

    • Constructor Detail

      • NumberElement

        public NumberElement​(java.lang.String variableName,
                             UC4ObjectName reference)
        Creates a new number field.
        Parameters:
        variableName - Name of the script variable
        reference - Name of the reference variable
    • Method Detail

      • getTooltip

        public java.lang.String getTooltip()
        Returns the tooltip of this Prompt Element.
        Overrides:
        getTooltip in class PromptElement
        Returns:
        Tooltip
      • setTooltip

        public void setTooltip​(java.lang.String tooltip)
        Sets the tooltip of this Prompt Element.
        Overrides:
        setTooltip in class PromptElement
        Parameters:
        tooltip - Tooltip text
      • setMinValue

        public void setMinValue​(java.lang.Integer min)
        Sets the minimum value.
        Specified by:
        setMinValue in interface PromptInterfaces.Constraints<java.lang.Integer>
        Parameters:
        min - Min value or null to disable the lower limit.
      • getMinValue

        public java.lang.Integer getMinValue()
        Returns the minimum value.
        Specified by:
        getMinValue in interface PromptInterfaces.Constraints<java.lang.Integer>
        Returns:
        Min value or null if there is no lower limit.
      • setMinimumValue

        @Deprecated
        public void setMinimumValue​(int min)
        Deprecated.
        Use setMinValue() instead
        Sets the minimum value.
        Parameters:
        min - Min value or -1 to disable the lower limit.
      • getMinimumValue

        @Deprecated
        public int getMinimumValue()
        Deprecated.
        Use getMinValue() instead
        Returns the minimum value.
        Returns:
        Min value or -1 if there is no lower limit.
      • setCaption

        public void setCaption​(java.lang.String caption)
        Sets the caption of this prompt element.
        Specified by:
        setCaption in interface PromptInterfaces.Caption
        Parameters:
        caption - Caption
      • isLocked

        public boolean isLocked()
        Returns true if this Prompt Element is locked. In this case a user cannot change the default value in the Prompt-Screen.
        Specified by:
        isLocked in interface PromptInterfaces.Locked
        Overrides:
        isLocked in class PromptElement
        Returns:
        true if locked, false if the user can change the value of the Prompt Element
      • setLocked

        public void setLocked​(boolean locked)
        Lock or unlocks this element. A user cannot change the default value in the Prompt-Screen if a control is locked.
        Specified by:
        setLocked in interface PromptInterfaces.Locked
        Overrides:
        setLocked in class PromptElement
        Parameters:
        locked - true if locked, false if the user can change the value of the Prompt Element
      • hasFocus

        public boolean hasFocus()
        Returns true if the focus is set. The cursor is placed at this control if the value is true. It may only be defined for one control in the PromptSet. If this flag is defined for several Controls of a PromptSet the last Control that got the flag wins.
        Specified by:
        hasFocus in interface PromptInterfaces.Focus
        Returns:
        true if the cursor should be set in this Prompt Element, false otherwise
      • setFocus

        public void setFocus​(boolean value)
        Sets the cursor focus: The cursor is placed at this control if the value is true. It may only be defined for one control in the PromptSet. If this flag is defined for several Controls of a PromptSet the last Control that got the flag wins.
        Specified by:
        setFocus in interface PromptInterfaces.Focus
        Parameters:
        value - true if the cursor should be set in this Prompt Element, false otherwise
      • setMaxValue

        public void setMaxValue​(java.lang.Integer value)
        Sets the maximum value.
        Specified by:
        setMaxValue in interface PromptInterfaces.Constraints<java.lang.Integer>
        Parameters:
        value - Max value or null in order to disable the upper limit.
      • setMaximumValue

        @Deprecated
        public void setMaximumValue​(int value)
        Deprecated.
        Use setMaxValue() instead
        Sets the maximum value.
        Parameters:
        value - Max value or -1 in order to disable the upper limit.
      • getMaxValue

        public java.lang.Integer getMaxValue()
        Returns the maximum value.
        Specified by:
        getMaxValue in interface PromptInterfaces.Constraints<java.lang.Integer>
        Returns:
        Max value or -1 if no limit is set.
      • getMaximumValue

        @Deprecated
        public int getMaximumValue()
        Deprecated.
        use getMaxValue() instead
        Returns the maximum value.
        Returns:
        Max value or -1 if no limit is set.