|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.standard.AbstractTool
CH.ifa.draw.standard.SelectionTool
public class SelectionTool
Tool to select and manipulate figures. A selection tool is in one of three states, e.g., background selection, figure selection, handle manipulation. The different states are handled by different child tools.
State
SelectionTool is the StateContext and child is the State.
The SelectionTool delegates state specific
behavior to its current child tool.
Field Summary |
---|
Fields inherited from class CH.ifa.draw.standard.AbstractTool |
---|
fAnchorX, fAnchorY, fView |
Constructor Summary | |
---|---|
SelectionTool(DrawingView view)
|
Method Summary | |
---|---|
protected Tool |
createAreaTracker(DrawingView view)
Factory method to create an area tracker. |
protected Tool |
createDragTracker(DrawingView view,
Figure f)
Factory method to create a Drag tracker. |
protected Tool |
createHandleTracker(DrawingView view,
Handle handle)
Factory method to create a Handle tracker. |
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse down events and starts the corresponding tracker. |
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse drag events. |
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse up events. |
Methods inherited from class CH.ifa.draw.standard.AbstractTool |
---|
activate, deactivate, drawing, editor, keyDown, mouseMove, view |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectionTool(DrawingView view)
Method Detail |
---|
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)
mouseDown
in interface Tool
mouseDown
in class AbstractTool
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
public void mouseUp(java.awt.event.MouseEvent e, int x, int y)
mouseUp
in interface Tool
mouseUp
in class AbstractTool
protected Tool createHandleTracker(DrawingView view, Handle handle)
protected Tool createDragTracker(DrawingView view, Figure f)
protected Tool createAreaTracker(DrawingView view)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |