public class DescriptionMatcher extends ComposableBase
ComposableBase.BinaryMatcher, ComposableBase.Identity, ComposableBase.Inverse
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 |
FALSE, TRUE
Constructor and Description |
---|
DescriptionMatcher(java.lang.String text) |
DescriptionMatcher(java.lang.String text,
int searchScope) |
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() |
and, composable, getChildMatchers, identity, inverse, inverse, or, self, simplify, simplify, withText, withText, withText, xor
private java.lang.String _find
private int scope
public static final int SEARCH_ACCESSIBLE
public static final int SEARCH_ACCESSIBLE_DESC
public static final int SEARCH_ACCESSIBLE_NAME
public static final int SEARCH_ACCESSIBLE_TEXT
public static final int SEARCH_ALL
public static final int SEARCH_CAPTION
public static final int SEARCH_COMMENT
public static final int SEARCH_INPUT
public static final int SEARCH_NAME
public static final int SEARCH_NONE
public static final int SEARCH_SELECTION
public static final int SEARCH_TEXT
public static final int SEARCH_TOOLTIP
public static final int SEARCH_TRUE_CAPTION
public static final int SEARCH_TRUE_INPUT
public static final int SEARCH_TRUE_NAME
public static final int SEARCH_TRUE_TEXT
public DescriptionMatcher(java.lang.String text)
public DescriptionMatcher(java.lang.String text, int searchScope)
public static void getDescriptions(java.awt.Component c, java.util.Map<java.lang.String,java.lang.String> props)
c
- props
- public static java.lang.String getMenuPath(javax.swing.JMenuItem item)
boolean isMatch(java.lang.String actual)
public boolean matches(java.awt.Component c)
public static java.lang.String scopeToString(int scope)
public static boolean stringsMatch(java.lang.String pattern, java.lang.String actual)
?
(any character)*
(zero or more characters)[..]
(character range){..,..}
(alternatives)~:
(tilde, colon)RE
.
Multiline matches are enabled by ~:(?m)regexp
Embedded newlines ("\n") in the match string will then match
end-of-lines.
==
(double equals)~=
(tilde, equals)~~
(double tilde)~~==?
would perform a fuzzy search for two equals signs
followed by any other single character. (i.e. ==?
)
public java.lang.String toString()
toString
in class ComposableBase