Package org.fest.swing.finder
Class DialogFinder
Understands a finder for
Dialog
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
DialogFinder
(Class<? extends Dialog> dialogType) Creates a newDialogFinder
.protected
DialogFinder
(String dialogName) Creates a newDialogFinder
.protected
DialogFinder
(GenericTypeMatcher<? extends Dialog> matcher) Creates a newDialogFinder
. -
Method Summary
Modifier and TypeMethodDescriptionprotected Dialog
Casts the givenComponent
to
.Dialog
Finds a
by name or type.Dialog
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
-
DialogFinder
Creates a newDialogFinder
.- Parameters:
dialogName
- the name of theDialog
to look for.
-
DialogFinder
Creates a newDialogFinder
.- Parameters:
matcher
- specifies the search criteria to use when looking up aDialog
.
-
DialogFinder
Creates a newDialogFinder
.- Parameters:
dialogType
- the type ofDialog
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<Dialog>
- 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<Dialog>
- 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.Dialog
- Specified by:
using
in classWindowFinderTemplate<Dialog>
- Parameters:
robot
- contains the underlying finding to delegate the search to.- Returns:
- a
DialogFixture
managing the foundDialog
. - Throws:
WaitTimedOutError
- if aDialog
could not be found.
-
cast
Casts the givenComponent
to
.Dialog
- Specified by:
cast
in classComponentFinderTemplate<Dialog>
- Parameters:
c
- the givenComponent
.- Returns:
- the given
Component
, casted toDialog
.
-