org.jhotdraw.figures
Class BorderTool
java.lang.Object
org.jhotdraw.standard.AbstractTool
org.jhotdraw.standard.ActionTool
org.jhotdraw.figures.BorderTool
- All Implemented Interfaces:
- Tool
public class BorderTool
- extends ActionTool
BorderTool decorates the clicked figure with a BorderDecorator.
- Version:
- <$CURRENT_VERSION$>
- See Also:
BorderDecorator
Method Summary |
void |
action(Figure figure)
Decorates the clicked figure with a border. |
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
Add the touched figure to the selection of an invoke action. |
void |
reverseAction(Figure figure)
Peels off the border from the clicked figure. |
Methods inherited from class org.jhotdraw.standard.AbstractTool |
activate, addToolListener, deactivate, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseDrag, mouseMove, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BorderTool
public BorderTool(DrawingEditor editor)
mouseDown
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
- Add the touched figure to the selection of an invoke action.
Overrides ActionTool's mouseDown to allow for peeling the border
if there is one already.
This is done by CTRLing the click
- Specified by:
mouseDown
in interface Tool
- Overrides:
mouseDown
in class ActionTool
- See Also:
action(org.jhotdraw.framework.Figure)
action
public void action(Figure figure)
- Decorates the clicked figure with a border.
- Specified by:
action
in class ActionTool
reverseAction
public void reverseAction(Figure figure)
- Peels off the border from the clicked figure.