|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.extensions.jfcunit.eventdata.AbstractEventData
junit.extensions.jfcunit.eventdata.AbstractMouseEventData
junit.extensions.jfcunit.eventdata.JMenuMouseEventData
Data container class that holds all the data necessary for jfcUnit to fire mouse events.
This class is specific to events on a JComboBox.
| Field Summary | |
private int[] |
m_elementIndexes
The zero-based index of the specific menu elements on which to trigger the event. |
private javax.swing.JComponent |
m_menu
The JMenuBar on which to trigger the event. |
| Fields inherited from class junit.extensions.jfcunit.eventdata.AbstractMouseEventData |
|
| 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 | |
JMenuMouseEventData()
Constructor. |
|
JMenuMouseEventData(JFCTestCase testCase,
javax.swing.JComponent menu,
int[] elementIndexes)
Constructor. |
|
JMenuMouseEventData(JFCTestCase testCase,
javax.swing.JComponent menu,
int[] elementIndexes,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime)
Constructor. |
|
| Method Summary | |
boolean |
canConsume(java.awt.AWTEvent ae)
Returns true if the event can be consumed by this instance of event data. |
boolean |
consume(java.awt.AWTEvent ae)
Consume the event. |
boolean |
equals(java.lang.Object o)
Compare to event datas and determine if they are equal. |
java.awt.Component |
getComponent()
The component on which the event has to be fired. |
int[] |
getElementIndexes()
Get the attribute value. |
javax.swing.JComponent |
getSource()
Get the attribute value. |
int |
hashCode()
Get the hashCode. |
void |
populate(org.w3c.dom.Element e)
Populate the JComboBoxMouseEventData XML element. |
boolean |
prepareComponent()
Prepare the Component to receive the event. |
void |
setElementIndexes(int[] elementIndexes)
Set the attribute value. |
void |
setSource(javax.swing.JComponent menu)
Set the attribute value. |
java.lang.String |
toString()
Get string description of event. |
| Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractMouseEventData |
getDefaultModifiers, getDefaultModifiers, getDefaultNumberOfClicks, getDefaultPopupTrigger, getModifierText, getNumberOfClicks, getPopupTrigger, sameSource, setNumberOfClicks, setPopupTrigger |
| Methods inherited from class junit.extensions.jfcunit.eventdata.AbstractEventData |
calculatePoint, getDefaultPosition, getDefaultSleepTime, getLocationOnScreen, getModifiers, getPosition, getReferencePoint, getRoot, getRoot, getSleepTime, getTestCase, isMetaChar, isValid, isValidForProcessing, setLocationOnScreen, setModifiers, setPosition, setReferencePoint, setSleepTime, setTestCase, setValid |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private javax.swing.JComponent m_menu
JMenuBar on which to trigger the event.
private int[] m_elementIndexes
| Constructor Detail |
public JMenuMouseEventData()
public JMenuMouseEventData(JFCTestCase testCase,
javax.swing.JComponent menu,
int[] elementIndexes)
testCase - The JFCTestCase on whose thread awtSleep() has to be invoked.menu - The JMenu on which to trigger the event.elementIndexes - The zero-based index of the menu items to select.
public JMenuMouseEventData(JFCTestCase testCase,
javax.swing.JComponent menu,
int[] elementIndexes,
int numberOfClicks,
int modifiers,
boolean isPopupTrigger,
long sleepTime)
testCase - The JFCTestCase on whose thread awtSleep() has to be invoked.menu - The JMenu on which to trigger the event.elementIndexes - The zero-based index of the menu items to select.numberOfClicks - Number of clicks in the MouseEvent (1 for single-click, 2 for double clicks)modifiers - The modifier key values that need to be passed onto the event.isPopupTrigger - boolean specifying whether this event will show a popup.sleepTime - The wait time in ms between each event.| Method Detail |
public void setSource(javax.swing.JComponent menu)
menu - The new value of the attribute.public final javax.swing.JComponent getSource()
public java.awt.Component getComponent()
getComponent in class AbstractEventDatapublic final void setElementIndexes(int[] elementIndexes)
elementIndexes - The new value of the attribute.public final int[] getElementIndexes()
public boolean canConsume(java.awt.AWTEvent ae)
canConsume in class AbstractMouseEventDataae - Event to be consumed.
public boolean consume(java.awt.AWTEvent ae)
consume in class AbstractMouseEventDataae - AWTEvent to be consumed.
public boolean equals(java.lang.Object o)
equals in class AbstractMouseEventDatao - Object to be compared.
public int hashCode()
hashCode in class AbstractMouseEventDatapublic void populate(org.w3c.dom.Element e)
populate in class AbstractMouseEventDatae - element to be populated.public boolean prepareComponent()
Component to receive the event.
prepareComponent in class AbstractEventDatapublic java.lang.String toString()
toString in class AbstractMouseEventData
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||