Class TextElement

    • Constructor Detail

      • TextElement

        public TextElement​(java.lang.String variableName,
                           UC4ObjectName reference)
        Parameters:
        variableName - Name of the script variable
        reference - Reference
    • Method Detail

      • setXmlKey

        public void setXmlKey​(java.lang.String key)
        Sets the key in case XML Variables are used as data reference.
        Specified by:
        setXmlKey in interface PromptInterfaces.XmlKey
        Parameters:
        key - Key
      • getXmlKey

        public java.lang.String getXmlKey()
        Returns the key for XML Variables in the data reference.
        Specified by:
        getXmlKey in interface PromptInterfaces.XmlKey
        Returns:
        Key or an empty String if not set.
      • setXPath

        public void setXPath​(java.lang.String xpath)
        Sets the XPath expression if XML variables are used as data reference.
        Specified by:
        setXPath in interface PromptInterfaces.XPath
        Parameters:
        xpath - XPath/Query expression
      • getXPath

        public java.lang.String getXPath()
        Returns the XPath expression if XML variables are used as data reference.
        Specified by:
        getXPath in interface PromptInterfaces.XPath
        Returns:
        XPath/Query expression or an empty String if not set.
      • 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
      • setRegExp

        public void setRegExp​(java.lang.String regex)
        Sets the Regular expression.
        Parameters:
        regex - Regular expression
      • getRegExp

        public java.lang.String getRegExp()
        Returns the Regular expression or an empty String if not set.
        Returns:
        Regular expression
      • 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
      • isUpper

        public boolean isUpper()
        Returns true if the values should be converted to upper case.
        Returns:
        true if uppercase
      • setUpper

        public void setUpper​(boolean value)
        Sets the upper cause property.
        Parameters:
        value - true to enable the conversion to upper case, false to disable it
      • isShowAsPassword

        public boolean isShowAsPassword()
        If set, this control shows asterisks instead of the text which was entered.
        Returns:
        true if enabled, false if disabled
      • setShowAsPassword

        public void setShowAsPassword​(boolean value)
        If set, this control shows asterisks instead of the text which was entered.
        Parameters:
        value - true to enable the password field, false to disable it
      • isValueRequired

        public boolean isValueRequired()
        Returns true if the user has to use the default value or enter a value in this field.
        Specified by:
        isValueRequired in interface PromptInterfaces.ValueRequired
        Returns:
        true if a value is required, false otherwise
      • setValueRequired

        public void setValueRequired​(boolean value)
        Sets or clears the property which determines if this field requires a value.
        Specified by:
        setValueRequired in interface PromptInterfaces.ValueRequired
        Parameters:
        value - true if a value is required, false otherwise
      • hasInputAssistance

        public boolean hasInputAssistance()
        Returns:
        true if input assistance is enabled, false otherwise
      • setInputAssistance

        public void setInputAssistance​(boolean value)
        Enables or disables the input assistance for this field.
        Parameters:
        value - true if input assistance should be enabled, false otherwise
      • 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
      • setMultiSelect

        public void setMultiSelect​(boolean value)
        Enables or disables multi select.
        Specified by:
        setMultiSelect in interface PromptInterfaces.MultiSelect
        Parameters:
        value - true if mulit select should be enabled
      • setMultiline

        public void setMultiline​(boolean value)
        Enables or disables the multiline property.
        Parameters:
        value - true if this text field should contain more than one line, false if not.
      • isMultiline

        public boolean isMultiline()
        Returns the value of the multi-line property.
        Returns:
        true if this text control supports more than one line of data.
      • setMaxLength

        public void setMaxLength​(int length)
        Sets the maximal length for inputs in this text field.
        Parameters:
        length - Max length
      • getMaxLength

        public int getMaxLength()
        Returns:
        Maximum length which is allowed in this text field.