JHotDraw 7.5.1

org.jhotdraw.samples.mini
Class SelectionToolSample

java.lang.Object
  extended by org.jhotdraw.samples.mini.SelectionToolSample

public class SelectionToolSample
extends java.lang.Object

SelectionToolSample demonstrates how the SelectionTool works.

Internally, the SelectionTool uses three smaller tools (named as 'Tracker') to fulfill its task. If the user presses the mouse button over an empty area of a drawing, the SelectAreaTracker comes into action. If the user presses the mouse button over a figure, the DragTracker comes into action. If the user presses the mouse button over a handle, the HandleTracker comes into action.

You need to edit the source code as marked below.

With this program you can:

  1. See how the SelectionTool interacts with a LineFigure.
  2. See how the SelectAreaTracker interacts with a LineFigure.
  3. See how the DragTracker interacts with a LineFigure.
  4. See how the HandleTracker interacts with a LineFigure.

Version:
$Id: SelectionToolSample.java 647 2010-01-24 22:52:59Z rawcoder $
Author:
Pondus

Constructor Summary
SelectionToolSample()
          Creates a new instance of SelectionToolSample
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionToolSample

public SelectionToolSample()
Creates a new instance of SelectionToolSample

Method Detail

main

public static void main(java.lang.String[] args)

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