|
|||||||
| 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 ask the handle's bounds and to track changes.
Figure| Method Summary | |
boolean |
contains(int x,
int y)
Tests if a point is contained in the handle. |
void |
dragInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
Tracks a step of a started interaction. |
void |
draw(java.awt.Graphics g)
Draws this handle. |
java.awt.Rectangle |
getBounds()
Gets the bounding box of the handle. |
java.awt.Cursor |
getCursor()
Returns a curser which should be displayed when the mouse is over the handle. |
jdraw.framework.Figure |
getOwner()
Gets the handle's owner. |
void |
startInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
Tracks the start of an interaction. |
void |
stopInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
Tracks the end of a running interaction. |
| Method Detail |
public jdraw.framework.Figure getOwner()
public java.awt.Rectangle getBounds()
public void draw(java.awt.Graphics g)
public java.awt.Cursor getCursor()
A default implementation may return Cursor.getDefaultCursor().
public boolean contains(int x,
int y)
x - x-coordinate of mouse positiony - y-coordinate of mouse position
public void startInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
x - the x position where the interaction startedy - the y position where the interaction started
public void dragInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
x - the current x positiony - the current y position
public void stopInteraction(int x,
int y,
java.awt.event.MouseEvent e,
jdraw.framework.DrawView v)
x - the current x positiony - the current y position
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||