Package org.fest.swing.finder
Class DialogFinder
Understands a finder for
Dialogs. This class cannot be used directly, please see
WindowFinder.-
Field Summary
Fields inherited from class org.fest.swing.finder.ComponentFinderTemplate
TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDialogFinder(Class<? extends Dialog> dialogType) Creates a newDialogFinder.protectedDialogFinder(String dialogName) Creates a newDialogFinder.protectedDialogFinder(GenericTypeMatcher<? extends Dialog> matcher) Creates a newDialogFinder. -
Method Summary
Modifier and TypeMethodDescriptionprotected DialogCasts the givenComponentto.DialogFinds aby name or type.DialogwithTimeout(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 theDialogto 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 ofDialogto 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<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:
withTimeoutin classWindowFinderTemplate<Dialog>- 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.Dialog- Specified by:
usingin classWindowFinderTemplate<Dialog>- Parameters:
robot- contains the underlying finding to delegate the search to.- Returns:
- a
DialogFixturemanaging the foundDialog. - Throws:
WaitTimedOutError- if aDialogcould not be found.
-
cast
Casts the givenComponentto.Dialog- Specified by:
castin classComponentFinderTemplate<Dialog>- Parameters:
c- the givenComponent.- Returns:
- the given
Component, casted toDialog.
-