public class EventTool extends java.lang.Object implements Timeoutable, Outputable
| Constructor and Description |
|---|
EventTool()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addListeners()
Adds listeners to listen all types of events.
|
static void |
addListeners(long eventMask)
Adds listeners to listen events under mask.
|
boolean |
checkNoEvent(long waitTime)
Check that no event will be dispatched during time specified.
|
boolean |
checkNoEvent(long eventMask,
long waitTime)
Check that no event under mask will be dispatched
during time specified.
|
static long |
getCurrentEventMask()
Returns event mask last time used by
addListeners(long) method. |
static java.awt.AWTEvent |
getLastEvent()
Returns last dispatched event.
|
static java.awt.AWTEvent |
getLastEvent(long eventMask)
Returns last dispatched event under mask.
|
static long |
getLastEventTime()
Returns time of the last dispatched event.
|
static long |
getLastEventTime(long eventMask)
Returns time of the last dispatched event under mask.
|
TestOut |
getOutput()
Returns print output streams or writers.
|
static long |
getTheWholeEventMask()
Returns a combination of all
AWTEvent.*_EVENT_MASK fields.. |
Timeouts |
getTimeouts()
Return current timeouts.
|
static void |
removeListeners()
Removes all listeners.
|
void |
setOutput(TestOut out)
Defines print output streams or writers.
|
void |
setTimeouts(Timeouts ts)
Defines current timeouts.
|
java.awt.AWTEvent |
waitEvent()
Waits for the first event.
|
java.awt.AWTEvent |
waitEvent(long eventMask)
Waits for the first event under mask.
|
void |
waitNoEvent(long waitTime)
During
EventTool.WaitNoEventTimeout time waits for
true result of checkNoEvent(long) method. |
void |
waitNoEvent(long eventMask,
long waitTime)
During
EventTool.WaitNoEventTimeout time waits for
true result of checkNoEvent(long, long) method. |
public static long getLastEventTime(long eventMask)
eventMask - Events types to be searched. AWTEvent.*_EVENT_MASK fields combination.addListeners(long)public static java.awt.AWTEvent getLastEvent(long eventMask)
eventMask - Events types to be searched. AWTEvent.*_EVENT_MASK fields combination.addListeners(long)public static long getLastEventTime()
addListeners(long)public static java.awt.AWTEvent getLastEvent()
addListeners(long)public static void addListeners(long eventMask)
removeListeners() first, so any event history is lost.eventMask - Mask to listen events under. AWTEvent.*_EVENT_MASK fields combination.addListeners(),
removeListeners()public static void addListeners()
removeListeners() first, so any event history is lost.
This method is invoked during static section of this class.public static void removeListeners()
addListeners(long),
addListeners()public static long getCurrentEventMask()
addListeners(long) method.
In case if addListeners() method was used last,
getTheWholeEventMask() result is returned.getTheWholeEventMask()public static long getTheWholeEventMask()
AWTEvent.*_EVENT_MASK fields..AWTEvent.*_EVENT_MASK fields.public void setTimeouts(Timeouts ts)
setTimeouts in interface Timeoutablets - ?t? A collection of timeout assignments.Timeouts,
Timeoutable,
getTimeouts()public Timeouts getTimeouts()
getTimeouts in interface TimeoutableTimeouts,
Timeoutable,
setTimeouts(org.netbeans.jemmy.Timeouts)public void setOutput(TestOut out)
setOutput in interface Outputableout - Identify the streams or writers used for print output.Outputable,
TestOut,
getOutput()public TestOut getOutput()
getOutput in interface OutputableOutputable,
TestOut,
setOutput(org.netbeans.jemmy.TestOut)public java.awt.AWTEvent waitEvent(long eventMask)
EventTool.WaitEventTimeout milliseconds.eventMask - Mask to wait events under.
AWTEvent.*_EVENT_MASK fields combination.TimeoutExpiredExceptionwaitEvent()public java.awt.AWTEvent waitEvent()
EventTool.WaitEventTimeout milliseconds.TimeoutExpiredExceptionwaitEvent(long),
getTheWholeEventMask()public boolean checkNoEvent(long eventMask,
long waitTime)
eventMask - Mask to wait events under.
AWTEvent.*_EVENT_MASK fields combination.waitTime - Quiet time (millisecons).checkNoEvent(long)public boolean checkNoEvent(long waitTime)
waitTime - Quiet time (millisecons).checkNoEvent(long, long),
getTheWholeEventMask()public void waitNoEvent(long eventMask,
long waitTime)
EventTool.WaitNoEventTimeout time waits for
true result of checkNoEvent(long, long) method.eventMask - Mask to wait events under.
AWTEvent.*_EVENT_MASK fields combination.waitTime - Quiet time (millisecons).TimeoutExpiredExceptioncheckNoEvent(long, long),
waitNoEvent(long)public void waitNoEvent(long waitTime)
EventTool.WaitNoEventTimeout time waits for
true result of checkNoEvent(long) method.waitTime - Quiet time (millisecons).TimeoutExpiredExceptioncheckNoEvent(long),
waitNoEvent(long, long)