Class CheckGroupElement

All Implemented Interfaces:
PromptInterfaces.Caption, PromptInterfaces.DataReference, PromptInterfaces.Focus, PromptInterfaces.ItemList, PromptInterfaces.Locked, PromptInterfaces.MultiSelect, PromptInterfaces.QuoteCharacter, PromptInterfaces.ValueRequired, PromptInterfaces.XmlKey, PromptInterfaces.XPath
Direct Known Subclasses:
CheckListElement

This class represents a group of check boxes.
  • Constructor Details

    • CheckGroupElement

      public CheckGroupElement(String variableName, UC4ObjectName reference)
      Creates a new CheckGroupElement.
      Parameters:
      variableName - Name of the script variable
      reference - Name of the reference
  • Method Details

    • setQuoteCharacter

      public void setQuoteCharacter(char c)
      Sets the character for a quote, for example ' or ".
      Specified by:
      setQuoteCharacter in interface PromptInterfaces.QuoteCharacter
      Parameters:
      c - Character
    • getQuoteCharacter

      public char getQuoteCharacter()
      Returns the character for a quote.
      Specified by:
      getQuoteCharacter in interface PromptInterfaces.QuoteCharacter
      Returns:
      for example ' or "
    • 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
    • getItemList

      public List<String> getItemList()
      When a Prompt is executed (see request TaskPromptSetContent) this method returns a list of valid items.
      Specified by:
      getItemList in interface PromptInterfaces.ItemList
      Returns:
      List of items
    • 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
    • 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
    • getCaption

      public String getCaption()
      Specified by:
      getCaption in interface PromptInterfaces.Caption
      Returns:
      Caption of this prompt element
    • setCaption

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

      public void setDataReference(UC4ObjectName vara)
      Sets a VARA Object which contains a list of valid entries for this prompt element.
      Specified by:
      setDataReference in interface PromptInterfaces.DataReference
      Parameters:
      vara - Name of a Variable Object
    • setXmlKey

      public void setXmlKey(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 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(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 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.
    • getDataReference

      public UC4ObjectName getDataReference()
      Specified by:
      getDataReference in interface PromptInterfaces.DataReference
      Returns:
      Name of a Variable Object
    • 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
    • hasMultiSelect

      public boolean hasMultiSelect()
      Specified by:
      hasMultiSelect in interface PromptInterfaces.MultiSelect
      Returns:
      true if multi select is enabled
    • setMultiSelectSeparator

      public void setMultiSelectSeparator(String sep)
      Sets the mulit select separator character.
      Specified by:
      setMultiSelectSeparator in interface PromptInterfaces.MultiSelect
      Parameters:
      sep - separator character
    • getMultiSelectSeparator

      public String getMultiSelectSeparator()
      Returns the mulit select separator character.
      Specified by:
      getMultiSelectSeparator in interface PromptInterfaces.MultiSelect
      Returns:
      separator character
    • isMultiSelectArray

      public boolean isMultiSelectArray()
      Returns true if this prompt element has a multi select array.
      Returns:
      true if an array is provided as value list
    • setMultiSelectArray

      public void setMultiSelectArray(boolean value)
      Enables or disables the array property for multi select values.
      Parameters:
      value - true if the array property should be set, false otherwise
    • isValueRequired

      public boolean isValueRequired()
      Returns true if the user has to use the default value or check at least one box.
      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
    • getTagName

      protected String getTagName()
      Specified by:
      getTagName in class PromptElement