|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static final int HANDLESIZE
Method Detail |
public java.awt.Point locate()
public 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 containerpublic void invokeStart(int x, int y, Drawing drawing)
x
- the x position where the interaction startedy
- the y position where the interaction startedpublic void 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 startedpublic void invokeStep(int dx, int dy, Drawing drawing)
dx
- x delta of this stepdy
- y delta of this steppublic void 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 startedpublic void invokeEnd(int dx, int dy, Drawing drawing)
public Figure owner()
public java.awt.Rectangle displayBox()
public boolean containsPoint(int x, int y)
public void draw(java.awt.Graphics g)
public Undoable getUndoActivity()
public void setUndoActivity(Undoable newUndoableActivity)
newUndoableActivity
- public Cursor getCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |