|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Handle
Handles are used to change a figure by direct manipulation. Handles know their owning figure and they provide methods to locate the handle on the figure and to track changes.
Adapter
Handles adapt the operations to manipulate a figure to a common interface.
Figure
Field Summary | |
---|---|
static int |
HANDLESIZE
|
Method Summary | |
---|---|
boolean |
containsPoint(int x,
int y)
Tests if a point is contained in the handle. |
java.awt.Rectangle |
displayBox()
Gets the display box of the handle. |
void |
draw(java.awt.Graphics g)
Draws this handle. |
Cursor |
getCursor()
Returns the preferred Cursor for this Handle. |
Undoable |
getUndoActivity()
Returns an Undoable to be used by the Undo/Redo infrastructure. |
void |
invokeEnd(int dx,
int dy,
Drawing drawing)
Deprecated. As of version 4.1, use invokeEnd(x, y, anchorX, anchorY, drawingView). |
void |
invokeEnd(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Tracks the end of the interaction. |
void |
invokeStart(int x,
int y,
Drawing drawing)
Deprecated. As of version 4.1, use invokeStart(x, y, drawingView) |
void |
invokeStart(int x,
int y,
DrawingView view)
Tracks the start of the interaction. |
void |
invokeStep(int dx,
int dy,
Drawing drawing)
Deprecated. As of version 4.1, use invokeStep(x, y, anchorX, anchorY, drawingView) |
void |
invokeStep(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Tracks a step of the interaction. |
java.awt.Point |
locate()
Locates the handle on the figure. |
Figure |
owner()
Gets the handle's owner. |
void |
setUndoActivity(Undoable newUndoableActivity)
Sets an Undoable to be used by the Undo/Redo infrastructure. |
Field Detail |
---|
static final int HANDLESIZE
Method Detail |
---|
java.awt.Point locate()
void invokeStart(int x, int y, DrawingView view)
x
- the x position where the interaction startedy
- the y position where the interaction startedview
- the handles containervoid invokeStart(int x, int y, Drawing drawing)
x
- the x position where the interaction startedy
- the y position where the interaction startedvoid invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)
x
- the current x positiony
- the current y positionanchorX
- the x position where the interaction startedanchorY
- the y position where the interaction startedvoid invokeStep(int dx, int dy, Drawing drawing)
dx
- x delta of this stepdy
- y delta of this stepvoid invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)
x
- the current x positiony
- the current y positionanchorX
- the x position where the interaction startedanchorY
- the y position where the interaction startedvoid invokeEnd(int dx, int dy, Drawing drawing)
Figure owner()
java.awt.Rectangle displayBox()
boolean containsPoint(int x, int y)
void draw(java.awt.Graphics g)
Undoable getUndoActivity()
void setUndoActivity(Undoable newUndoableActivity)
newUndoableActivity
- Cursor getCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |