Package org.fest.swing.finder
Class FrameFinder
Understands a finder for
Frame
s. This class cannot be used directly, please see
WindowFinder
.-
Field Summary
Fields inherited from class org.fest.swing.finder.ComponentFinderTemplate
TIMEOUT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FrameFinder
(Class<? extends Frame> frameType) Creates a newFrameFinder
.protected
FrameFinder
(String frameName) Creates a newFrameFinder
.protected
FrameFinder
(GenericTypeMatcher<? extends Frame> matcher) Creates a newFrameFinder
. -
Method Summary
Modifier and TypeMethodDescriptionprotected Frame
Casts the givenComponent
to
.Frame
Finds a
by name or type.Frame
withTimeout
(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 theFrame
to 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 ofFrame
to look for.
-
-
Method Details
-
withTimeout
Sets the timeout for this finder. The window to search should be found within the given time period.- Overrides:
withTimeout
in 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:
withTimeout
in classWindowFinderTemplate<Frame>
- Parameters:
timeout
- the period of time the search should be performed.unit
- the time unit fortimeout
.- Returns:
- this finder.
-
using
Finds a
by name or type.Frame
- Specified by:
using
in classWindowFinderTemplate<Frame>
- Parameters:
robot
- contains the underlying finding to delegate the search to.- Returns:
- a
FrameFixture
managing the foundFrame
. - Throws:
WaitTimedOutError
- if aFrame
could not be found.
-
cast
Casts the givenComponent
to
.Frame
- Specified by:
cast
in classComponentFinderTemplate<Frame>
- Parameters:
c
- the givenComponent
.- Returns:
- the given
Component
, casted toFrame
.
-