JHotDraw 7.4.1

org.jhotdraw.draw.event
Interface ToolListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
ToolAdapter

public interface ToolListener
extends java.util.EventListener

Interface implemented by observers of Tools.


Design Patterns

Observer
State changes of tools can be observed by other objects. Specifically DrawingEditor observes area invalidations of tools and repaints its active drawing view accordingly.
Subject: Tool; Observer: ToolListener; Event: ToolEvent; Concrete Observer: DrawingEditor.


Version:
$Id: ToolListener.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Method Summary
 void areaInvalidated(ToolEvent e)
          Sent when an area of the drawing view needs to be repainted.
 void boundsInvalidated(ToolEvent e)
          Sent when the tool has edited an area outside of the bounds of the canvas.
 void toolDone(ToolEvent event)
          Informs the listener that a tool has done its interaction.
 void toolStarted(ToolEvent event)
          Informs the listener that a tool has starteds interacting with a specific drawing view.
 

Method Detail

toolStarted

void toolStarted(ToolEvent event)
Informs the listener that a tool has starteds interacting with a specific drawing view.


toolDone

void toolDone(ToolEvent event)
Informs the listener that a tool has done its interaction. This method can be used to switch back to the default tool.


areaInvalidated

void areaInvalidated(ToolEvent e)
Sent when an area of the drawing view needs to be repainted.


boundsInvalidated

void boundsInvalidated(ToolEvent e)
Sent when the tool has edited an area outside of the bounds of the canvas.


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.