|
|||||||||||
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.DragEventData
DragEventSource is a wrapper for Drag Events. The event encapsulates the source and destination locations for the drag with xxxMouseEventData types.
Field Summary | |
private AbstractMouseEventData |
m_dest
Destination of the drag event. |
private java.awt.Point |
m_origPoint
Original reference location of component. |
private java.util.List |
m_points
List of points in the drag path. |
private AbstractMouseEventData |
m_source
Source of the drag event. |
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 | |
DragEventData(JFCTestCase testCase,
AbstractMouseEventData source)
Constructor: Assumes a null destination and default sleep time. |
|
DragEventData(JFCTestCase testCase,
AbstractMouseEventData source,
AbstractMouseEventData dest)
Constructor for a drag event. |
|
DragEventData(JFCTestCase testCase,
AbstractMouseEventData source,
AbstractMouseEventData dest,
long delay)
Constructor for a drag event. |
Method Summary | |
void |
addPoint(java.awt.Point p)
Add a Point to the drag path. |
boolean |
canConsume(java.awt.AWTEvent ae)
Check if this event can consume the AWTEvent . |
boolean |
consume(java.awt.AWTEvent ae)
Consume the AWTEvent . |
private java.awt.Point |
convertToSource(java.awt.Component comp,
java.awt.Point p)
Convert the point to the source coordinate system. |
boolean |
equals(java.lang.Object o)
Equals comparison. |
java.awt.Component |
getComponent()
This method is provided here to close the abstract base class. |
int |
getDefaultModifiers()
Get the default modifiers. |
AbstractMouseEventData |
getDest()
Get the destination MouseEventData. |
java.lang.String |
getModifierText()
Get the modifier text for the current. |
java.awt.Point[] |
getPoints()
Get the list of points in the drag path. |
AbstractMouseEventData |
getSource()
Get the Source of the drag event. |
int |
hashCode()
Calculate a hashcode based upon the source and the dest of this class. |
void |
populate(org.w3c.dom.Element e)
Populate the element wiht the data. |
boolean |
prepareComponent()
This prepares the source and dest components if set, and inserts/appends the screen locations onto the list of points. |
void |
setDest(AbstractMouseEventData dest)
Set the Destination of the drag event. |
void |
setPoints(java.awt.Point[] points)
Set the points in the drag path. |
void |
setSource(AbstractMouseEventData source)
Set the Source of the drag event. |
java.lang.String |
toString()
Return a string representing the eventdata. |
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 AbstractMouseEventData m_dest
private AbstractMouseEventData m_source
private java.util.List m_points
private java.awt.Point m_origPoint
Constructor Detail |
public DragEventData(JFCTestCase testCase, AbstractMouseEventData source)
testCase
- JFCTestCase
to fire the sleeps upon.source
- AbstractMouseEventData
indicating the
starting location of the drag event.public DragEventData(JFCTestCase testCase, AbstractMouseEventData source, AbstractMouseEventData dest)
testCase
- JFCTestCase
to fire the sleeps upon.source
- AbstractMouseEventData
indicating the
starting location of the drag event.dest
- AbstractMouseEventData
indicating the
ending location of the drag event.public DragEventData(JFCTestCase testCase, AbstractMouseEventData source, AbstractMouseEventData dest, long delay)
testCase
- TestCase.source
- AbstractMouseEventData
indicating the
starting location of the drag event.dest
- AbstractMouseEventData
indicating the
ending location of the drag event.delay
- sleepTime of the event.Method Detail |
public final java.awt.Component getComponent()
getComponent
in class AbstractEventData
public final int getDefaultModifiers()
getDefaultModifiers
in class AbstractEventData
public final void setDest(AbstractMouseEventData dest)
dest
- destination AbstractMouseEventData
.public final AbstractMouseEventData getDest()
AbstractMouseEventData
.public final java.lang.String getModifierText()
getModifierText
in class AbstractEventData
public final void setPoints(java.awt.Point[] points)
points
- Set of points to be hit in the
drag path.public final java.awt.Point[] getPoints()
Point
[] list of points.public final void setSource(AbstractMouseEventData source)
source
- AbstractMouseEventData
indicating the
starting location of the drag event.public final AbstractMouseEventData getSource()
AbstractMouseEventData
.public final void addPoint(java.awt.Point p)
Point
to the drag path.
p
- Point
to be hit along the drag path.public final boolean prepareComponent()
prepareComponent
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)
AWTEvent
.
consume
in class AbstractEventData
ae
- Event to be consumed.
public boolean equals(java.lang.Object o)
equals
in class AbstractEventData
o
- Object to be compared.
public int hashCode()
hashCode
in class AbstractEventData
public void populate(org.w3c.dom.Element e)
populate
in class AbstractEventData
e
- element to be populated.public java.lang.String toString()
toString
in class AbstractEventData
private java.awt.Point convertToSource(java.awt.Component comp, java.awt.Point p)
comp
- Souce component.p
- Point to be converted.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |