|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.finder.ComponentFinderTemplate<T>
T
- the type of component this finder can search.public abstract class ComponentFinderTemplate<T extends Component>
Understands a template for
finders.
Component
Constructor Summary | |
---|---|
protected |
ComponentFinderTemplate(Class<? extends T> componentType)
Creates a new ComponentFinderTemplate . |
protected |
ComponentFinderTemplate(GenericTypeMatcher<? extends T> matcher)
Creates a new ComponentFinderTemplate . |
protected |
ComponentFinderTemplate(String componentName,
Class<? extends T> componentType)
Creates a new ComponentFinderTemplate . |
Method Summary | |
---|---|
protected abstract T |
cast(Component c)
Casts the given Component to the type supported by this finder. |
protected T |
findComponentWith(Robot robot)
Finds the component using either by name or type. |
abstract ComponentFixture<T> |
using(Robot robot)
Finds a component by name or type using the given robot. |
protected ComponentFinderTemplate<T> |
withTimeout(long newTimeout)
Sets the timeout for this finder. |
protected ComponentFinderTemplate<T> |
withTimeout(long newTimeout,
TimeUnit unit)
Sets the timeout for this finder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ComponentFinderTemplate(String componentName, Class<? extends T> componentType)
ComponentFinderTemplate
.
componentName
- the name of the Component
to find.componentType
- the type of the Component
to find.protected ComponentFinderTemplate(GenericTypeMatcher<? extends T> matcher)
ComponentFinderTemplate
.
matcher
- specifies the search criteria to use when looking up a Component
.protected ComponentFinderTemplate(Class<? extends T> componentType)
ComponentFinderTemplate
.
componentType
- the type of the Component
to find.Method Detail |
---|
protected ComponentFinderTemplate<T> withTimeout(long newTimeout, TimeUnit unit)
Component
to find should be found within the given time period.
newTimeout
- the period of time the search should be performed.unit
- the time unit for timeout
.
NullPointerException
- if the time unit is null
.
IllegalArgumentException
- if the timeout is a negative number.protected ComponentFinderTemplate<T> withTimeout(long newTimeout)
Component
to find should be found within the given time period.
newTimeout
- the number of milliseconds before stopping the search.
IllegalArgumentException
- if the timeout is a negative number.public abstract ComponentFixture<T> using(Robot robot)
robot
- contains the underlying finding to delegate the search to.
WaitTimedOutError
- if a component with the given name or of the given type could not be found.protected final T findComponentWith(Robot robot)
robot
- contains the underlying finding to delegate the search to.
WaitTimedOutError
- if a component with the given name or of the given type could not be found.protected abstract T cast(Component c)
Component
to the type supported by this finder.
c
- the given Component
.
Component
casted to the type supported by this finder.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |