|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.extensions.jfcunit.eventdata.AbstractEventData junit.extensions.jfcunit.eventdata.AbstractKeyEventData junit.extensions.jfcunit.eventdata.StringEventData
Data container class that holds all the data necessary for jfcUnit to fire mouse events.
Field Summary | |
private java.awt.Component |
m_comp
The string code to be fired. |
private java.lang.String |
m_string
The string code to be fired. |
Fields inherited from class junit.extensions.jfcunit.eventdata.AbstractKeyEventData |
|
Fields inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
|
Fields inherited from interface junit.extensions.jfcunit.eventdata.EventDataConstants |
CENTER, CUSTOM, DEFAULT_HOLDTIME, DEFAULT_ISPOPUPTRIGGER, DEFAULT_KEY_MODIFIERS, DEFAULT_MOUSE_MODIFIERS, DEFAULT_NUMBEROFCLICKS, DEFAULT_POPUP_MODIFIERS, DEFAULT_POSITION, DEFAULT_SCROLL_AMOUNT, DEFAULT_SLEEPTIME, DEFAULT_WHEEL_ROTATION, DOWN_ARROW_SUBCOMPONENT, EAST, EDITOR_SUBCOMPONENT, INVALID_SUBCOMPONENT, INVALID_TEXT_OFFSET, NORTH, NORTH_EAST, NORTH_WEST, OFFSET, PERCENT, POSITIONSTRINGS, SOUTH, SOUTH_EAST, SOUTH_WEST, UP_ARROW_SUBCOMPONENT, WEST |
Constructor Summary | |
StringEventData()
Default Constructor. |
|
StringEventData(JFCTestCase testCase,
java.awt.Component comp,
java.lang.String string)
Constructor. |
|
StringEventData(JFCTestCase testCase,
java.awt.Component comp,
java.lang.String string,
int modifiers,
long sleepTime)
Constructor. |
|
StringEventData(JFCTestCase testCase,
java.awt.Component comp,
java.lang.String string,
long sleepTime)
Constructor. |
Method Summary | |
boolean |
canConsume(java.awt.AWTEvent ae)
Check if this event can consume the AWTEvent. |
boolean |
consume(java.awt.AWTEvent ae)
Consume the event. |
java.awt.Component |
getComponent()
The component on which the event has to be fired. |
java.awt.Component |
getSource()
Get the attribute value. |
java.lang.String |
getString()
Get the string to be sent. |
void |
populate(org.w3c.dom.Element e)
Populate the element with the key code. |
void |
setSource(java.awt.Component comp)
Set the attribute value. |
void |
setString(java.lang.String string)
Set the string to be sent. |
protected void |
setupKeyStrokes()
Setup the keystrokes for the event. |
java.lang.String |
toString()
Generate a description of the event. |
Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractKeyEventData |
addKeyStrokes, applyModifier, clearKeyStrokes, equals, getDefaultModifiers, getKeyMapping, getKeyStrokes, getModifierText, hashCode, prepareComponent, setKeyMapping, setModifiers |
Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
calculatePoint, getDefaultPosition, getDefaultSleepTime, getLocationOnScreen, getModifiers, getPosition, getReferencePoint, getRoot, getRoot, getSleepTime, getTestCase, isMetaChar, isValid, isValidForProcessing, setLocationOnScreen, setPosition, setReferencePoint, setSleepTime, setTestCase, setValid |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.awt.Component m_comp
private java.lang.String m_string
Constructor Detail |
public StringEventData()
public StringEventData(JFCTestCase testCase, java.awt.Component comp, java.lang.String string)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.comp
- The component on which to trigger the event.string
- The string to be sent to the componentpublic StringEventData(JFCTestCase testCase, java.awt.Component comp, java.lang.String string, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.comp
- The component on which to trigger the event.string
- The string to be sent to the componentsleepTime
- The wait time in ms between each event.public StringEventData(JFCTestCase testCase, java.awt.Component comp, java.lang.String string, int modifiers, long sleepTime)
testCase
- The JFCTestCase on whose thread awtSleep()
has to be invoked.comp
- The component on which to trigger the event.string
- The string to be sent to the componentmodifiers
- The modifier string values that need to be passed onto the event.sleepTime
- The wait time in ms between each event.Method Detail |
public final void setSource(java.awt.Component comp)
comp
- The new value of the attribute.public final java.awt.Component getSource()
public final void setString(java.lang.String string)
string
- Key code.public java.awt.Component getComponent()
getComponent
in class AbstractEventData
public java.lang.String getString()
public boolean canConsume(java.awt.AWTEvent ae)
canConsume
in class AbstractKeyEventData
ae
- Event to be consumed.
public boolean consume(java.awt.AWTEvent ae)
consume
in class AbstractKeyEventData
ae
- Event to be consumed.
public void populate(org.w3c.dom.Element e)
populate
in class AbstractEventData
e
- Element to be populated with the data for this event.public java.lang.String toString()
toString
in class AbstractEventData
protected void setupKeyStrokes()
setupKeyStrokes
in class AbstractKeyEventData
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |