JHotDraw 6.0b1

org.jhotdraw.figures
Class BorderTool

java.lang.Object
  extended by org.jhotdraw.standard.AbstractTool
      extended by org.jhotdraw.standard.ActionTool
          extended by org.jhotdraw.figures.BorderTool
All Implemented Interfaces:
Tool

public class BorderTool
extends ActionTool

BorderTool decorates the clicked figure with a BorderDecorator.

See Also:
BorderDecorator

Nested Class Summary
static class BorderTool.UndoActivity
           
 
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool
AbstractTool.EventDispatcher
 
Constructor Summary
BorderTool(DrawingEditor editor)
           
 
Method Summary
 void action(Figure figure)
          Decorates the clicked figure with a border.
protected  Undoable createUndoActivity()
          Factory method for undo activity
 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.ActionTool
mouseUp
 
Methods inherited from class org.jhotdraw.standard.AbstractTool
activate, addToolListener, checkUsable, createEventDispatcher, createViewChangeListener, deactivate, drawing, editor, getActiveDrawing, getActiveView, getAnchorX, getAnchorY, getEventDispatcher, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseDrag, mouseMove, removeToolListener, setAnchorX, setAnchorY, setEditor, setEnabled, setUndoActivity, setUsable, setView, view, viewCreated, viewDestroying, viewSelectionChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorderTool

public BorderTool(DrawingEditor editor)
Method Detail

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.


createUndoActivity

protected Undoable createUndoActivity()
Factory method for undo activity


JHotDraw 6.0b1