public class DialogWaiter extends WindowWaiter implements Timeoutable, Outputable
Timeouts
Constructor and Description |
---|
DialogWaiter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getActionProducedMessage(long spendedTime,
java.lang.Object result)
Overrides WindowWaiter.getActionProducedMessage.
|
static java.awt.Dialog |
getDialog(ComponentChooser cc)
Searches for a dialog.
|
static java.awt.Dialog |
getDialog(ComponentChooser cc,
int index)
Searches for a dialog.
|
static java.awt.Dialog |
getDialog(java.lang.String title,
boolean ce,
boolean cc)
Searches for a dialog by title.
|
static java.awt.Dialog |
getDialog(java.lang.String title,
boolean ce,
boolean cc,
int index)
Searches for a dialog by title.
|
static java.awt.Dialog |
getDialog(java.awt.Window owner,
ComponentChooser cc)
Searches for a dialog.
|
static java.awt.Dialog |
getDialog(java.awt.Window owner,
ComponentChooser cc,
int index)
Searches for a dialog.
|
static java.awt.Dialog |
getDialog(java.awt.Window owner,
java.lang.String title,
boolean ce,
boolean cc)
Searches for a dialog by title.
|
static java.awt.Dialog |
getDialog(java.awt.Window owner,
java.lang.String title,
boolean ce,
boolean cc,
int index)
Searches for a dialog by title.
|
protected java.lang.String |
getGoldenActionProducedMessage()
Returns message to be printed int golden output when waiting has been successfully finished.
|
protected java.lang.String |
getGoldenTimeoutExpiredMessage()
Returns message to be printed int golden output when waiting timeout has been expired.
|
protected java.lang.String |
getGoldenWaitingStartedMessage()
Returns message to be printed int golden output before waiting start.
|
TestOut |
getOutput()
Returns print output streams or writers.
|
protected java.lang.String |
getTimeoutExpiredMessage(long spendedTime)
Overrides WindowWaiter.getTimeoutExpiredMessage.
|
Timeouts |
getTimeouts()
Return current timeouts.
|
protected java.lang.String |
getWaitingStartedMessage()
Returns message to be printed before waiting start.
|
void |
setOutput(TestOut output)
Defines print output streams or writers.
|
void |
setTimeouts(Timeouts timeouts)
Defines current timeouts.
|
java.awt.Dialog |
waitDialog(ComponentChooser ch)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(ComponentChooser ch,
int index)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.lang.String title,
boolean compareExactly,
boolean compareCaseSensitive)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.lang.String title,
boolean compareExactly,
boolean compareCaseSensitive,
int index)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.awt.Window owner,
ComponentChooser ch)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.awt.Window owner,
ComponentChooser ch,
int index)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.awt.Window owner,
java.lang.String title,
boolean compareExactly,
boolean compareCaseSensitive)
Waits for a dialog to show.
|
java.awt.Dialog |
waitDialog(java.awt.Window owner,
java.lang.String title,
boolean compareExactly,
boolean compareCaseSensitive,
int index)
Waits for a dialog to show.
|
actionProduced, getComponentChooser, getDescription, getOwner, getWindow, getWindow, getWindow, getWindow, setComponentChooser, setOwner, waitWindow, waitWindow, waitWindow, waitWindow
timeFromStart, waitAction
public static java.awt.Dialog getDialog(ComponentChooser cc)
ComponentChooser
parameter.cc
- A component chooser used to define and apply the search criteria.null
reference is returned.public static java.awt.Dialog getDialog(ComponentChooser cc, int index)
index+1
'th dialog that meets the criteria defined and
applied by the ComonentChooser
parameter.cc
- A component chooser used to define and apply the search criteria.index
- The ordinal index of the dialog in the set of currently displayed
dialogs. The first index is 0.index+1
'th dialog that is showing
and that meets the search criteria. If there are fewer than
index+1
dialogs, a null
reference is returned.public static java.awt.Dialog getDialog(java.lang.String title, boolean ce, boolean cc)
title
- Dialog title or subtitle.ce
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.cc
- If true
the search is case sensitive; otherwise, the
search is case insensitive.null
reference is returned.public static java.awt.Dialog getDialog(java.lang.String title, boolean ce, boolean cc, int index)
index+1
'th dialog among the currently
showing dialogs that possess a suitable title.title
- Dialog title or subtitle.ce
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.cc
- If true
the search is case sensitive; otherwise, the
search is case insensitive.index
- Ordinal index between appropriate dialogsindex+1
'th dialog that is showing
and that has a suitable title. If there are fewer than
index+1
dialogs, a null
reference is returned.public static java.awt.Dialog getDialog(java.awt.Window owner, ComponentChooser cc)
java.awt.Window
owner
and that
meets the search criteria applied by the ComponentChooser
parameter.owner
- The owner window of the dialogs to be searched.cc
- A component chooser used to define and apply the search criteria.null
reference is returned.public static java.awt.Dialog getDialog(java.awt.Window owner, ComponentChooser cc, int index)
index+1
'th dialog that is both owned by the
java.awt.Window
owner
and that meets the
criteria defined and applied by the ComponentChooser
parameter.owner
- The owner window of all the dialogs to be searched.cc
- A component chooser used to define and apply the search criteria.index
- Ordinal index between appropriate dialogsindex+1
'th dialog that is showing,
has the proper window ownership, and that meets the search criteria.
If there are fewer than index+1
dialogs, a null
reference is returned.public static java.awt.Dialog getDialog(java.awt.Window owner, java.lang.String title, boolean ce, boolean cc)
java.awt.Window
owner
for the first with
a suitable title.owner
- A window - owner of a dialods to be checked.title
- Dialog title or subtitle.ce
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.cc
- If true
the search is case sensitive; otherwise, the
search is case insensitive.null
reference is returned.public static java.awt.Dialog getDialog(java.awt.Window owner, java.lang.String title, boolean ce, boolean cc, int index)
index+1
'th dialog among the currently
showing dialogs that are owned by the java.awt.Window
owner
and that have a suitable title.owner
- ?title? Dialog title or subtitle.title
- ?ce? If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.ce
- ?cc? If true
the search is case sensitive; otherwise, the
search is case insensitive.cc
- ?index? The ordinal index of the dialog in the set of currently displayed
dialogs with the proper window ownership and a suitable title. The
first index is 0.index
- Ordinal index between appropriate dialogsindex+1
'th dialog that is showing, has
the proper window ownership, and a suitable title. If there are fewer than
index+1
dialogs, a null
reference is returned.public void setTimeouts(Timeouts timeouts)
setTimeouts
in interface Timeoutable
setTimeouts
in class WindowWaiter
timeouts
- ?t? A collection of timeout assignments.Timeouts
,
Timeoutable
,
getTimeouts()
public Timeouts getTimeouts()
getTimeouts
in interface Timeoutable
getTimeouts
in class WindowWaiter
Timeouts
,
Timeoutable
,
setTimeouts(org.netbeans.jemmy.Timeouts)
public void setOutput(TestOut output)
setOutput
in interface Outputable
setOutput
in class Waiter
output
- ?out? Identify the streams or writers used for print output.TestOut
,
Outputable
,
getOutput()
public TestOut getOutput()
getOutput
in interface Outputable
getOutput
in class Waiter
TestOut
,
Outputable
,
setOutput(org.netbeans.jemmy.TestOut)
public java.awt.Dialog waitDialog(ComponentChooser ch, int index) throws java.lang.InterruptedException
index+1
'th dialog that meets the criteria
defined and applied by the ComonentChooser
parameter to
show up.ch
- A component chooser used to define and apply the search criteria.index
- The ordinal index of the dialog in the set of currently displayed
dialogs. The first index is 0.index+1
'th dialog that shows
and that meets the search criteria. If fewer than
index+1
dialogs show up in the allotted time period then
a null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(ComponentChooser ch) throws java.lang.InterruptedException
ComponentChooser
parameter to show up.ch
- A component chooser used to define and apply the search criteria.null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.lang.String title, boolean compareExactly, boolean compareCaseSensitive, int index) throws java.lang.InterruptedException
index+1
'th dialog to show with a suitable title.title
- Dialog title or subtitle.compareExactly
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.compareCaseSensitive
- If true
the search is case sensitive;
otherwise, the search is case insensitive.index
- The ordinal index of the dialog in the set of currently displayed
dialogs with the proper window ownership and a suitable title. The
first index is 0.index+1
'th dialog to show and that has a
suitable title. If no such dialog can be found within the time period
allotted, a null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.lang.String title, boolean compareExactly, boolean compareCaseSensitive) throws java.lang.InterruptedException
title
- Dialog title or subtitle.compareExactly
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.compareCaseSensitive
- If true
the search is case sensitive;
otherwise, the search is case insensitive.null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.awt.Window owner, ComponentChooser ch, int index) throws java.lang.InterruptedException
index+1
'th dialog to show that is both owned by the
java.awt.Window
owner
and that meets the
criteria defined and applied by the ComponentChooser
parameter.owner
- The owner window of all the dialogs to be searched.ch
- A component chooser used to define and apply the search criteria.index
- The ordinal index of the dialog in the set of currently displayed
dialogs with the proper window ownership and a suitable title. The first
index is 0.index+1
'th dialog to show that
has the proper window ownership, and that meets the search criteria.
If there are fewer than index+1
dialogs, a null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.awt.Window owner, ComponentChooser ch) throws java.lang.InterruptedException
java.awt.Window
owner
and that meets the
criteria defined and applied by the ComponentChooser
parameter.owner
- The owner window of all the dialogs to be searched.ch
- A component chooser used to define and apply the search criteria.null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.awt.Window owner, java.lang.String title, boolean compareExactly, boolean compareCaseSensitive, int index) throws java.lang.InterruptedException
index+1
'th dialog to show with the proper owner
and a suitable title.owner
- The owner window of all the dialogs to be searched.title
- Dialog title or subtitle.compareExactly
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.compareCaseSensitive
- If true
the search is case sensitive;
otherwise, the search is case insensitive.index
- Ordinal index between appropriate dialogsindex+1
'th dialog to show that has
both the proper owner window and a suitable title. If no such dialog can be found
within the time period allotted, a null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
public java.awt.Dialog waitDialog(java.awt.Window owner, java.lang.String title, boolean compareExactly, boolean compareCaseSensitive) throws java.lang.InterruptedException
owner
- The owner window of all the dialogs to be searched.title
- Dialog title or subtitle.compareExactly
- If true
and the search is case sensitive, then a
match occurs when the title
argument is a substring of a
dialog title. If false
and the search is case sensitive,
then the title
argument and the dialog title must be the same.
If true
and the search is case insensitive, then a match occurs
when the title
argument is a substring of the dialog title after
changing both to upper case. If false
and the search is case
insensitive, then a match occurs when the title
argument is a
substring of the dialog title after changing both to upper case.compareCaseSensitive
- If true
the search is case sensitive;
otherwise, the search is case insensitive.null
reference is returned.TimeoutExpiredException
java.lang.InterruptedException
WindowWaiter.actionProduced(Object)
protected java.lang.String getWaitingStartedMessage()
Waiter
getWaitingStartedMessage
in class WindowWaiter
Waiter.getWaitingStartedMessage()
protected java.lang.String getTimeoutExpiredMessage(long spendedTime)
getTimeoutExpiredMessage
in class WindowWaiter
spendedTime
- Time spent for waitingWaiter.getTimeoutExpiredMessage(long)
protected java.lang.String getActionProducedMessage(long spendedTime, java.lang.Object result)
getActionProducedMessage
in class WindowWaiter
spendedTime
- Time spent for waitingresult
- A result of the actionWaiter.getActionProducedMessage(long, Object)
protected java.lang.String getGoldenWaitingStartedMessage()
Waiter
getGoldenWaitingStartedMessage
in class WindowWaiter
Waiter.getGoldenWaitingStartedMessage()
protected java.lang.String getGoldenTimeoutExpiredMessage()
Waiter
getGoldenTimeoutExpiredMessage
in class WindowWaiter
Waiter.getGoldenTimeoutExpiredMessage()
protected java.lang.String getGoldenActionProducedMessage()
Waiter
getGoldenActionProducedMessage
in class WindowWaiter
Waiter.getGoldenActionProducedMessage()