|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractTool
public class AbstractTool
Default implementation support for Tools.
DrawingView,
Tool| Field Summary | |
|---|---|
protected int |
fAnchorX
The position of the initial mouse down. |
protected int |
fAnchorY
The position of the initial mouse down. |
protected DrawingView |
fView
|
| Constructor Summary | |
|---|---|
AbstractTool(DrawingView itsView)
Constructs a tool for the given view. |
|
| Method Summary | |
|---|---|
void |
activate()
Activates the tool for the given view. |
void |
deactivate()
Deactivates the tool. |
Drawing |
drawing()
Gets the tool's drawing. |
DrawingEditor |
editor()
Gets the tool's editor. |
void |
keyDown(java.awt.event.KeyEvent evt,
int key)
Handles key down events in the drawing view. |
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse down events in the drawing view. |
void |
mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse drag events in the drawing view. |
void |
mouseMove(java.awt.event.MouseEvent evt,
int x,
int y)
Handles mouse moves (if the mouse button is up). |
void |
mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
Handles mouse up in the drawing view. |
DrawingView |
view()
Gets the tool's view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DrawingView fView
protected int fAnchorX
protected int fAnchorY
| Constructor Detail |
|---|
public AbstractTool(DrawingView itsView)
| Method Detail |
|---|
public void activate()
activate in interface Toolpublic void deactivate()
deactivate in interface Tool
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
mouseDown in interface Tool
public void mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
mouseDrag in interface Tool
public void mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
mouseUp in interface Tool
public void mouseMove(java.awt.event.MouseEvent evt,
int x,
int y)
mouseMove in interface Tool
public void keyDown(java.awt.event.KeyEvent evt,
int key)
keyDown in interface Toolpublic Drawing drawing()
public DrawingEditor editor()
public DrawingView view()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||