Class HierarchySelect


  • public class HierarchySelect
    extends java.lang.Object
    HierarchySelect: hierarchical selects for a hierarchy property that has a number of child select properties.
    Since:
    5.17
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSelectedValue​(boolean visibleText)
      Get the selected value of the hierarchy property, which is the selected value of the last select component.
      java.lang.String getSelectedValue​(int selectIndex, boolean visibleText)
      Get the selected value for the select component at the index.
      boolean hasOption​(int selectIndex, java.lang.String pattern, boolean exactMatch, boolean visibleText)
      Does the select component at the index have the option? Return false if the select component does not exist.
      void selectOption​(int selectIndex, java.lang.String pattern, boolean exactMatch, boolean visibleText)
      Select one option for the select component at the index.
      void selectOptions​(java.util.List<java.lang.String> patterns, boolean exactMatch, boolean visibleText)
      Select options for a list of select components.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HierarchySelect

        public HierarchySelect​(EntityProperty hierarchyProperty)
        Constructor
        Parameters:
        hierarchyProperty - the associated hierarchy property
    • Method Detail

      • getSelectedValue

        public java.lang.String getSelectedValue​(boolean visibleText)
        Get the selected value of the hierarchy property, which is the selected value of the last select component.
        Parameters:
        visibleText - whether to get visible text or invisible value
        Returns:
        selected value or visible text. The value of an empty selection is its parent hierarchy value.
      • getSelectedValue

        public java.lang.String getSelectedValue​(int selectIndex,
                                                 boolean visibleText)
        Get the selected value for the select component at the index.
        Parameters:
        selectIndex - zero-based select component index
        visibleText - whether to get visible text or invisible value
        Returns:
        selected value or visible text. The value of an empty selection is its parent hierarchy value.
      • selectOptions

        public void selectOptions​(java.util.List<java.lang.String> patterns,
                                  boolean exactMatch,
                                  boolean visibleText)
        Select options for a list of select components.

        The list of patterns is to match options for the list of select components in the same order. e.g., 01,0102,010205 to select 010205.

        Parameters:
        patterns - the list of patterns
        exactMatch - true for exact match, false if the selected value or visible text contains the pattern
        visibleText - whether the pattern matches option value or visible text
        Throws:
        java.lang.IllegalArgumentException - throw if there is no match
      • selectOption

        public void selectOption​(int selectIndex,
                                 java.lang.String pattern,
                                 boolean exactMatch,
                                 boolean visibleText)
        Select one option for the select component at the index.
        Parameters:
        selectIndex - zero-based select component index
        pattern - the pattern to match options
        exactMatch - true for exact match, false if the selected value or visible text contains the pattern
        visibleText - whether the pattern matches option value or visible text
        Throws:
        java.lang.IllegalArgumentException - throw if there is no match
      • hasOption

        public boolean hasOption​(int selectIndex,
                                 java.lang.String pattern,
                                 boolean exactMatch,
                                 boolean visibleText)
        Does the select component at the index have the option? Return false if the select component does not exist.
        Parameters:
        selectIndex - zero-based select component index
        pattern - option value or label pattern
        exactMatch - true for exact match, false if partial match(option value or visible text contain the pattern)
        visibleText - whether the pattern matches option value or visible text
        Returns:
        true if having the option, false otherwise
        Throws:
        java.lang.IllegalArgumentException - if the select index is invalid