JHotDraw 6.0b1

Class NullTool

  extended by org.jhotdraw.standard.AbstractTool
      extended by org.jhotdraw.standard.NullTool
All Implemented Interfaces:

public class NullTool
extends AbstractTool

Default implementation support for Tools.

See Also:
DrawingView, Tool

Nested Class Summary
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool
Constructor Summary
NullTool(DrawingEditor newDrawingEditor)
Method Summary
 void activate()
          Activates the tool for use on the given view.
protected  void checkUsable()
 void deactivate()
          Deactivates the tool.
Methods inherited from class org.jhotdraw.standard.AbstractTool
addToolListener, createEventDispatcher, createViewChangeListener, drawing, editor, getActiveDrawing, getActiveView, getAnchorX, getAnchorY, getEventDispatcher, getUndoActivity, isActive, isEnabled, isUsable, keyDown, mouseDown, mouseDrag, mouseMove, mouseUp, 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


public NullTool(DrawingEditor newDrawingEditor)
Method Detail


public void activate()
Description copied from class: AbstractTool
Activates the tool for use on the given view. This method is called whenever the user switches to this tool. Use this method to reinitialize a tool. Since tools will be disabled unless it is useable, there will always be an active view when this is called. based on isUsable() Tool should never be activated if the view is null. Ideally, the dditor should take care of that.

Specified by:
activate in interface Tool
activate in class AbstractTool


public void deactivate()
Description copied from class: AbstractTool
Deactivates the tool. This method is called whenever the user switches to another tool. Use this method to do some clean-up when the tool is switched. Subclassers should always call super.deactivate. An inactive tool should never be deactivated

Specified by:
deactivate in interface Tool
deactivate in class AbstractTool


protected void checkUsable()
checkUsable in class AbstractTool

JHotDraw 6.0b1