|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.core.ComponentDragAndDrop
public class ComponentDragAndDrop
Understands -based drag and drop.
Component
| Field Summary | |
|---|---|
static int |
DRAG_THRESHOLD
Number of pixels traversed before a drag starts. |
| Constructor Summary | |
|---|---|
ComponentDragAndDrop(Robot robot)
Creates a new ComponentDragAndDrop. |
|
| Method Summary | |
|---|---|
void |
drag(Component target,
Point where)
Performs a drag action at the given point. |
void |
dragOver(Component target,
Point where)
Move the mouse appropriately to get from the source to the destination. |
void |
drop(Component target,
Point where)
Ends a drag operation, releasing the mouse button over the given target location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DRAG_THRESHOLD
| Constructor Detail |
|---|
public ComponentDragAndDrop(Robot robot)
ComponentDragAndDrop.
robot - the robot to use to simulate user input.| Method Detail |
|---|
@RunsInEDT
public void drag(Component target,
Point where)
target - the target component.where - the point where to start the drag action.
@RunsInEDT
public void drop(Component target,
Point where)
This method is tuned for native drag/drop operations, so if you get odd behavior, you might try using a simple
and Robot.moveMouse(Component, int, int).
Robot.releaseMouseButtons()
target - the target component.where - the point where the drag operation ends.
ActionFailedException - if there is no drag action in effect.
public void dragOver(Component target,
Point where)
target - the target component.where - the point to drag over.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||