|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for Components which implement Graphics2D-aware dragging.
Copyright: Copyright (c) Richard C. Penner II
Company:
Method Summary | |
void |
dragNotify(Draggable d,
java.awt.geom.Point2D oldPos,
java.awt.geom.Point2D newPos)
Message sent upon the completion of a drag gesture. |
Draggable |
findDraggable(int x,
int y)
Given the coordinates of a mouse click, return the corresponding draggable widget. |
java.awt.geom.Point2D |
pinPoint(Draggable d,
java.awt.geom.Point2D original,
int delta_x,
int delta_y)
Given the original position of the current draggable, and the requested offset, compute the constrained current position. |
Method Detail |
public Draggable findDraggable(int x, int y)
x
- The x-coordinate of the mouse down event.y
- The y-coordinate of the mouse down event.public java.awt.geom.Point2D pinPoint(Draggable d, java.awt.geom.Point2D original, int delta_x, int delta_y)
d
- The Draggable shape which is being dragged.original
- The original position of the shape.delta_x
- The horizontal offset of the ongoing drag.delta_y
- The vertical offset of the ongoing drag.public void dragNotify(Draggable d, java.awt.geom.Point2D oldPos, java.awt.geom.Point2D newPos)
d
- The Draggable shape which has been dragged.oldPos
- The location of the draggable at the beginning of the
drag gesture.newPos
- The location, returned by pinPoint(com.dixshtix.awt.Draggable, java.awt.geom.Point2D, int, int)
, of the
draggable at the end of the drag gesture.
|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |