Package org.fest.swing.finder
Class FrameFinder
Understands a finder for
Frames. This class cannot be used directly, please see
WindowFinder.-
Field Summary
Fields inherited from class org.fest.swing.finder.ComponentFinderTemplate
TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFrameFinder(Class<? extends Frame> frameType) Creates a newFrameFinder.protectedFrameFinder(String frameName) Creates a newFrameFinder.protectedFrameFinder(GenericTypeMatcher<? extends Frame> matcher) Creates a newFrameFinder. -
Method Summary
Modifier and TypeMethodDescriptionprotected FrameCasts the givenComponentto.FrameFinds aby name or type.FramewithTimeout(long timeout) Sets the timeout for this finder.withTimeout(long timeout, TimeUnit unit) Sets the timeout for this finder.Methods inherited from class org.fest.swing.finder.ComponentFinderTemplate
findComponentWith
-
Constructor Details
-
FrameFinder
Creates a newFrameFinder.- Parameters:
frameName- the name of theFrameto look for.
-
FrameFinder
Creates a newFrameFinder.- Parameters:
matcher- specifies the search criteria to use when looking up aFrame.
-
FrameFinder
Creates a newFrameFinder.- Parameters:
frameType- the type ofFrameto look for.
-
-
Method Details
-
withTimeout
Sets the timeout for this finder. The window to search should be found within the given time period.- Overrides:
withTimeoutin classWindowFinderTemplate<Frame>- Parameters:
timeout- the number of milliseconds before stopping the search.- Returns:
- this finder.
-
withTimeout
Sets the timeout for this finder. The window to search should be found within the given time period.- Overrides:
withTimeoutin classWindowFinderTemplate<Frame>- Parameters:
timeout- the period of time the search should be performed.unit- the time unit fortimeout.- Returns:
- this finder.
-
using
Finds aby name or type.Frame- Specified by:
usingin classWindowFinderTemplate<Frame>- Parameters:
robot- contains the underlying finding to delegate the search to.- Returns:
- a
FrameFixturemanaging the foundFrame. - Throws:
WaitTimedOutError- if aFramecould not be found.
-
cast
Casts the givenComponentto.Frame- Specified by:
castin classComponentFinderTemplate<Frame>- Parameters:
c- the givenComponent.- Returns:
- the given
Component, casted toFrame.
-