|
|||||||||||
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
Abstract data container class that holds most of the data necessary for jfcUnit to fire key events.
Field Summary | |
private java.util.Vector |
m_keyStrokes
Key Strokes to be simulated. |
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 | |
AbstractKeyEventData()
|
Method Summary | |
protected void |
addKeyStrokes(JFCKeyStroke[] strokes)
Add key strokes to this event. |
protected void |
applyModifier(int modifiers)
Apply the modifiers specified to all of the key strokes. |
boolean |
canConsume(java.awt.AWTEvent ae)
Check if this event can consume the AWTEvent . |
protected void |
clearKeyStrokes()
Clear key Strokes. |
boolean |
consume(java.awt.AWTEvent ae)
Get the attribute value. |
boolean |
equals(java.lang.Object o)
Compare to event datas and deterime if they are equal. |
int |
getDefaultModifiers()
Get the default modifiers. |
static KeyMapping |
getKeyMapping()
Get the attribute value. |
JFCKeyStroke[] |
getKeyStrokes()
Get the key strokes for this event. |
java.lang.String |
getModifierText()
Get the current modifier text. |
int |
hashCode()
Return the hashCode of the object. |
boolean |
prepareComponent()
Prepare the text component. |
static void |
setKeyMapping(KeyMapping km)
Set the attribute value. |
void |
setModifiers(int modifiers)
Set the modifiers on the event. |
protected abstract void |
setupKeyStrokes()
Each implementing class needs to provide a method to translate the string into the keystorkes required to produce the string. |
Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
calculatePoint, getComponent, getDefaultPosition, getDefaultSleepTime, getLocationOnScreen, getModifiers, getPosition, getReferencePoint, getRoot, getRoot, getSleepTime, getTestCase, isMetaChar, isValid, isValidForProcessing, populate, setLocationOnScreen, setPosition, setReferencePoint, setSleepTime, setTestCase, setValid, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private final java.util.Vector m_keyStrokes
Constructor Detail |
public AbstractKeyEventData()
Method Detail |
public final JFCKeyStroke[] getKeyStrokes()
public final void setModifiers(int modifiers)
setModifiers
in class AbstractEventData
modifiers
- modifiers to be set.public int getDefaultModifiers()
getDefaultModifiers
in class AbstractEventData
public static void setKeyMapping(KeyMapping km)
km
- The new KeyMappingpublic static KeyMapping getKeyMapping()
public final java.lang.String getModifierText()
getModifierText
in class AbstractEventData
public boolean canConsume(java.awt.AWTEvent ae)
AWTEvent
.
canConsume
in class AbstractEventData
ae
- AWTEvent
to be consumed.
public boolean consume(java.awt.AWTEvent ae)
consume
in class AbstractEventData
ae
- AWTEvent
to be processed.
public boolean equals(java.lang.Object o)
equals
in class AbstractEventData
o
- Object to be compared.
public int hashCode()
hashCode
in class AbstractEventData
public boolean prepareComponent()
prepareComponent
in class AbstractEventData
protected abstract void setupKeyStrokes()
protected final void addKeyStrokes(JFCKeyStroke[] strokes)
strokes
- Key strokes to be added.protected final void applyModifier(int modifiers)
modifiers
- Modifiers to be applied.protected final void clearKeyStrokes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |