JHotDraw 7.5.1

org.jhotdraw.draw.tool
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

@NotNull
public interface DragTracker
extends Tool

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


Design Patterns

Strategy
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.


Version:
$Id: DragTracker.java -1 $
Author:
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

setDraggedFigure

void setDraggedFigure(Figure f)

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