abbot.finder.matchers
Class NameMatcher

java.lang.Object
  extended by abbot.finder.matchers.AbstractMatcher
      extended by abbot.finder.matchers.NameMatcher
All Implemented Interfaces:
Matcher

public class NameMatcher
extends AbstractMatcher

Provides matching of Components by component name.


Constructor Summary
NameMatcher(String name)
          Construct a matcher that will match any component that has explicitly been assigned the given name.
 
Method Summary
 boolean matches(Component c)
          Return whether the given Component matches some lookup criteria.
 String toString()
           
 
Methods inherited from class abbot.finder.matchers.AbstractMatcher
stringsMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameMatcher

public NameMatcher(String name)
Construct a matcher that will match any component that has explicitly been assigned the given name. Auto-generated names (e.g. win0, frame3, etc. for AWT (native) based components will not match.

Method Detail

matches

public boolean matches(Component c)
Description copied from interface: Matcher
Return whether the given Component matches some lookup criteria.

Returns:
whether the given component has been explicitly assigned the name given in the constructor.

toString

public String toString()
Overrides:
toString in class AbstractMatcher


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge