ur_rna.GUITester.GuiTools.Matchers

## Class DescriptionMatcher

- java.lang.Object
- - ur_rna.GUITester.GuiTools.Matchers.ComposableBase
  - - ur_rna.GUITester.GuiTools.Matchers.DescriptionMatcher

- All Implemented Interfaces:
    abbot.finder.Matcher, ComposableMatcher

      public class DescriptionMatcher
      extends ComposableBase

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class ur_rna.GUITester.GuiTools.Matchers.ComposableBase

      `ComposableBase.BinaryMatcher, ComposableBase.Identity, ComposableBase.Inverse`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `_find`
    `private int` | `scope`
    `static int` | `SEARCH_ACCESSIBLE`
    `static int` | `SEARCH_ACCESSIBLE_DESC`
    `static int` | `SEARCH_ACCESSIBLE_NAME`
    `static int` | `SEARCH_ACCESSIBLE_TEXT`
    `static int` | `SEARCH_ALL`
    `static int` | `SEARCH_CAPTION`
    `static int` | `SEARCH_COMMENT`
    `static int` | `SEARCH_INPUT`
    `static int` | `SEARCH_NAME`
    `static int` | `SEARCH_NONE`
    `static int` | `SEARCH_SELECTION`
    `static int` | `SEARCH_TEXT`
    `static int` | `SEARCH_TOOLTIP`
    `static int` | `SEARCH_TRUE_CAPTION`
    `static int` | `SEARCH_TRUE_INPUT`
    `static int` | `SEARCH_TRUE_NAME`
    `static int` | `SEARCH_TRUE_TEXT`

    - ### Fields inherited from class ur_rna.GUITester.GuiTools.Matchers.ComposableBase

      `FALSE, TRUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DescriptionMatcher(java.lang.String text)`
    `DescriptionMatcher(java.lang.String text, int searchScope)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `getDescriptions(java.awt.Component c, java.util.Map<java.lang.String,java.lang.String> props)` Get a list of all text descriptions associated with this Component.
    `static java.lang.String` | `getMenuPath(javax.swing.JMenuItem item)`
    `(package private) boolean` | `isMatch(java.lang.String actual)`
    `boolean` | `matches(java.awt.Component c)`
    `static java.lang.String` | `scopeToString(int scope)`
    `static boolean` | `stringsMatch(java.lang.String pattern, java.lang.String actual)` Performs a fuzzy string match that can be altered with various prefix symbols, called modifiers.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class ur_rna.GUITester.GuiTools.Matchers.ComposableBase

      `and, composable, getChildMatchers, identity, inverse, inverse, or, self, simplify, simplify, withText, withText, withText, xor`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _find

          private java.lang.String _find

    - #### scope

          private int scope

    - #### SEARCH_ACCESSIBLE

          public static final int SEARCH_ACCESSIBLE

      See Also:
        Constant Field Values

    - #### SEARCH_ACCESSIBLE_DESC

          public static final int SEARCH_ACCESSIBLE_DESC

      See Also:
        Constant Field Values

    - #### SEARCH_ACCESSIBLE_NAME

          public static final int SEARCH_ACCESSIBLE_NAME

      See Also:
        Constant Field Values

    - #### SEARCH_ACCESSIBLE_TEXT

          public static final int SEARCH_ACCESSIBLE_TEXT

      See Also:
        Constant Field Values

    - #### SEARCH_ALL

          public static final int SEARCH_ALL

      See Also:
        Constant Field Values

    - #### SEARCH_CAPTION

          public static final int SEARCH_CAPTION

      See Also:
        Constant Field Values

    - #### SEARCH_COMMENT

          public static final int SEARCH_COMMENT

      See Also:
        Constant Field Values

    - #### SEARCH_INPUT

          public static final int SEARCH_INPUT

      See Also:
        Constant Field Values

    - #### SEARCH_NAME

          public static final int SEARCH_NAME

      See Also:
        Constant Field Values

    - #### SEARCH_NONE

          public static final int SEARCH_NONE

      See Also:
        Constant Field Values

    - #### SEARCH_SELECTION

          public static final int SEARCH_SELECTION

      See Also:
        Constant Field Values

    - #### SEARCH_TEXT

          public static final int SEARCH_TEXT

      See Also:
        Constant Field Values

    - #### SEARCH_TOOLTIP

          public static final int SEARCH_TOOLTIP

      See Also:
        Constant Field Values

    - #### SEARCH_TRUE_CAPTION

          public static final int SEARCH_TRUE_CAPTION

      See Also:
        Constant Field Values

    - #### SEARCH_TRUE_INPUT

          public static final int SEARCH_TRUE_INPUT

      See Also:
        Constant Field Values

    - #### SEARCH_TRUE_NAME

          public static final int SEARCH_TRUE_NAME

      See Also:
        Constant Field Values

    - #### SEARCH_TRUE_TEXT

          public static final int SEARCH_TRUE_TEXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DescriptionMatcher

          public DescriptionMatcher(java.lang.String text)

    - #### DescriptionMatcher

          public DescriptionMatcher(java.lang.String text,
                                    int searchScope)

  - ### Method Detail

    - #### getDescriptions

          public static void getDescriptions(java.awt.Component c,
                                             java.util.Map<java.lang.String,java.lang.String> props)

      Get a list of all text descriptions associated with this Component. This includes the component's name as well as input text, captions, labels, list-selections, tool-tips, etc. This function is not used during GUI component matching. Instead it may be useful for tools that provide information to the user about components (e.g. during GUI-robot script authoring).
      Parameters:
        `c` -
        `props` -

    - #### getMenuPath

          public static java.lang.String getMenuPath(javax.swing.JMenuItem item)

    - #### isMatch

          boolean isMatch(java.lang.String actual)

    - #### matches

          public boolean matches(java.awt.Component c)

    - #### scopeToString

          public static java.lang.String scopeToString(int scope)

    - #### stringsMatch

          public static boolean stringsMatch(java.lang.String pattern,
                                             java.lang.String actual)

      Performs a fuzzy string match that can be altered with various prefix symbols, called modifiers. By default (no modifiers) this performs a case insensitive string comparison that allows wildcards (specifically POSIX Standard Shell globbing patterns) such as:
      - `?` (any character)
      - `*` (zero or more characters)
      - `[..]` (character range)
      - `{..,..}` (alternatives)
      If the standard string matching is not sufficient, a different mode can be selected by prepending one of the following prefixes to the search string:
      `~:` (tilde, colon)
        Perform a regular expression match using `RE`. Multiline matches are enabled by ~:(?m)regexp Embedded newlines ("\n") in the match string will then match end-of-lines.
      `==` (double equals)
        Perform strict match (case sensitive, no wildcards)
      `~=` (tilde, equals)
        Perform a case-sensitive match allowing wildcards. (i.e the same type of fuzzy matching as the default, except that character case matters.
      `~~` (double tilde)
        Perform a fuzzy match (the default type). Use this if the search expression could start with one of the other prefixes. e.g. `~~==?` would perform a fuzzy search for two equals signs followed by any other single character. (i.e. `==?` )

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `ComposableBase`