org.uispec4j.finder
Class ComponentMatchers

java.lang.Object
  extended by org.uispec4j.finder.ComponentMatchers

public class ComponentMatchers
extends java.lang.Object

Standard searching policies, implemented as ComponentMatcher objects.


Constructor Summary
ComponentMatchers()
           
 
Method Summary
static ComponentMatcher and(ComponentMatcher... matchers)
          Matches components that match all its sub-matchers.
static ComponentMatcher componentLabelFor(java.lang.String labelName)
          Matches components based on labels (very useful when dealing with forms).
static ComponentMatcher displayedNameIdentity(java.lang.String reference)
          Matches components whose displayed name is exactly the same as the reference.
static ComponentMatcher displayedNameRegexp(java.lang.String reference)
          Matches components whose displayed name matches with the regexp reference.
static ComponentMatcher displayedNameSubstring(java.lang.String reference)
          Matches components whose displayed name is a substring of the reference.
static
<T extends java.awt.Component>
ComponentMatcher
fromClass(java.lang.Class<T> swingClass)
          Matches components that are instances of the class.
static ComponentMatcher innerNameIdentity(java.lang.String reference)
          Matches components whose inner name is exactly the same as the reference.
static ComponentMatcher innerNameRegexp(java.lang.String reference)
          Matches components whose inner name matches with the regexp reference.
static ComponentMatcher innerNameSubstring(java.lang.String reference)
          Matches components whose inner name is a substring of the reference.
static ComponentMatcher intersection(ComponentMatcher... matchers)
          Deprecated. See and(ComponentMatcher...)
static ComponentMatcher not(ComponentMatcher matcher)
          Matches components rejected by the inner matcher.
static ComponentMatcher or(ComponentMatcher... matchers)
          Matches components that match at least one of its sub-matchers.
static ComponentMatcher toolTipEquals(java.lang.String text)
           
static ComponentMatcher union(ComponentMatcher... matchers)
          Deprecated. See or(ComponentMatcher...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentMatchers

public ComponentMatchers()
Method Detail

displayedNameIdentity

public static ComponentMatcher displayedNameIdentity(java.lang.String reference)
Matches components whose displayed name is exactly the same as the reference.


displayedNameSubstring

public static ComponentMatcher displayedNameSubstring(java.lang.String reference)
Matches components whose displayed name is a substring of the reference.


displayedNameRegexp

public static ComponentMatcher displayedNameRegexp(java.lang.String reference)
Matches components whose displayed name matches with the regexp reference.


innerNameIdentity

public static ComponentMatcher innerNameIdentity(java.lang.String reference)
Matches components whose inner name is exactly the same as the reference.


innerNameSubstring

public static ComponentMatcher innerNameSubstring(java.lang.String reference)
Matches components whose inner name is a substring of the reference.


innerNameRegexp

public static ComponentMatcher innerNameRegexp(java.lang.String reference)
Matches components whose inner name matches with the regexp reference.


fromClass

public static <T extends java.awt.Component> ComponentMatcher fromClass(java.lang.Class<T> swingClass)
Matches components that are instances of the class.


componentLabelFor

public static ComponentMatcher componentLabelFor(java.lang.String labelName)
Matches components based on labels (very useful when dealing with forms).

See Also:
JLabel.setLabelFor(java.awt.Component)

and

public static ComponentMatcher and(ComponentMatcher... matchers)
Matches components that match all its sub-matchers.


intersection

public static ComponentMatcher intersection(ComponentMatcher... matchers)
Deprecated. See and(ComponentMatcher...)

Matches components that match all its sub-matchers.


or

public static ComponentMatcher or(ComponentMatcher... matchers)
Matches components that match at least one of its sub-matchers.


union

public static ComponentMatcher union(ComponentMatcher... matchers)
Deprecated. See or(ComponentMatcher...)

Matches components that match at least one of its sub-matchers.


not

public static ComponentMatcher not(ComponentMatcher matcher)
Matches components rejected by the inner matcher.


toolTipEquals

public static ComponentMatcher toolTipEquals(java.lang.String text)


Copyright © 2004-2010. All Rights Reserved.