org.jscience.architecture.traffic.tools
Class MoveAction

java.lang.Object
  extended by org.jscience.architecture.traffic.tools.MoveAction
All Implemented Interfaces:
ToolAction

public class MoveAction
extends java.lang.Object
implements ToolAction

This implements zoom user action


Field Summary
protected  EditModel model
          DOCUMENT ME!
protected  Node node
          DOCUMENT ME!
protected  java.awt.Point startPoint
          DOCUMENT ME!
protected  int xOffset
          DOCUMENT ME!
protected  int yOffset
          DOCUMENT ME!
 
Constructor Summary
MoveAction(EditModel em)
          Creates a new MoveAction object.
 
Method Summary
 boolean beingUsed()
          DOCUMENT ME!
 void doMove(View view, java.awt.Point p)
          DOCUMENT ME!
 void endMove(View view, java.awt.Point p)
          DOCUMENT ME!
 boolean nodeMayMove(Node n, View view, java.awt.Point p)
          Returns true if given node may be moved to given point
 boolean startMove(View view, java.awt.Point p)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected EditModel model
DOCUMENT ME!


node

protected Node node
DOCUMENT ME!


startPoint

protected java.awt.Point startPoint
DOCUMENT ME!


xOffset

protected int xOffset
DOCUMENT ME!


yOffset

protected int yOffset
DOCUMENT ME!

Constructor Detail

MoveAction

public MoveAction(EditModel em)
Creates a new MoveAction object.

Parameters:
em - DOCUMENT ME!
Method Detail

beingUsed

public boolean beingUsed()
DOCUMENT ME!

Specified by:
beingUsed in interface ToolAction
Returns:
DOCUMENT ME!

startMove

public boolean startMove(View view,
                         java.awt.Point p)
DOCUMENT ME!

Parameters:
view - DOCUMENT ME!
p - DOCUMENT ME!
Returns:
DOCUMENT ME!

doMove

public void doMove(View view,
                   java.awt.Point p)
DOCUMENT ME!

Parameters:
view - DOCUMENT ME!
p - DOCUMENT ME!

endMove

public void endMove(View view,
                    java.awt.Point p)
DOCUMENT ME!

Parameters:
view - DOCUMENT ME!
p - DOCUMENT ME!

nodeMayMove

public boolean nodeMayMove(Node n,
                           View view,
                           java.awt.Point p)
Returns true if given node may be moved to given point

Parameters:
n - DOCUMENT ME!
view - DOCUMENT ME!
p - DOCUMENT ME!
Returns:
DOCUMENT ME!