Interface DragTracker

All Superinterfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Tool
All Known Implementing Classes:
DefaultDragTracker, DnDTracker

public interface DragTracker
extends Tool

A drag tracker provides the behavior for dragging selected figures to the SelectionTool.

Design Patterns

The different behavior states of the selection tool are implemented by trackers.
Context: SelectionTool; State: DragTracker, HandleTracker, SelectAreaTracker.

Chain of responsibility
Mouse and keyboard events of the user occur on a drawing view, and are preprocessed by the DragTracker of a SelectionTool. DragTracker invokes "track" methods on a Handle which in turn changes an aspect of a figure. Client: SelectionTool; Handler: DragTracker, Handle.

$Id: -1 $
Werner Randelshofer

Method Summary
 void setDraggedFigure(Figure f)
Methods inherited from interface org.jhotdraw.draw.tool.Tool
activate, addToolListener, deactivate, draw, editCopy, editCut, editDelete, editDuplicate, editPaste, getToolTipText, removeToolListener, supportsHandleInteraction
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
Methods inherited from interface java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped

Method Detail


void setDraggedFigure(Figure f)