gdl.base
Class NodeMover

java.lang.Object
  extended by gdl.base.NodeMover

public class NodeMover
extends java.lang.Object

The NodeMover is used to move nodes in a thread (timer task) from one position to another, using linear interpolation on the polar coordinates. in addition, a slow-in slow-out animation speed regulation is available.

Author:
Martin Suntinger

Constructor Summary
NodeMover(GraphExplorerCanvas canvas, edu.umd.cs.piccolo.PLayer nodeLayer, edu.umd.cs.piccolo.PLayer edgeLayer, java.util.LinkedList allEdges, java.util.LinkedList allNodes, GraphExplorerGui gui)
           
 
Method Summary
 void disableAllNodes()
          disables all nodes on the canvas
 void enableAllNodes()
          enables all nodes on the canvas
 void moveNodes()
          actually moved the nodes from one position to another one.
 void reset(java.util.LinkedList _allNodes, java.util.LinkedList _allEdges)
          resets all member variables and temporary movement calculation values for a new List of Nodes and edges
 void setSteps(int steps)
          sets the amount of steps (little movements) during the animation. if the amout is smaller, the animation will of course appear faster.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeMover

public NodeMover(GraphExplorerCanvas canvas,
                 edu.umd.cs.piccolo.PLayer nodeLayer,
                 edu.umd.cs.piccolo.PLayer edgeLayer,
                 java.util.LinkedList allEdges,
                 java.util.LinkedList allNodes,
                 GraphExplorerGui gui)
Parameters:
canvas - The GraphExplorerCanvas the nodes and edges are located on
nodeLayer - the layer in the above specified canvas uses for nodes
edgeLayer - the layer in the above specified canvas uses for edges
allEdges - a List of all available edges, containing GraphEdge objects
allNodes - a List of all available nodes, containing ContentNode objects
gui - the gui (necessary to disable it during the animation process)
Method Detail

reset

public void reset(java.util.LinkedList _allNodes,
                  java.util.LinkedList _allEdges)
resets all member variables and temporary movement calculation values for a new List of Nodes and edges

Parameters:
_allNodes - a LinkedList of all nodes
_allEdges - a LinkedList of all the edges

moveNodes

public void moveNodes()
actually moved the nodes from one position to another one.


disableAllNodes

public void disableAllNodes()
disables all nodes on the canvas


enableAllNodes

public void enableAllNodes()
enables all nodes on the canvas


setSteps

public void setSteps(int steps)
sets the amount of steps (little movements) during the animation. if the amout is smaller, the animation will of course appear faster.

Parameters:
steps - the amout of animation steps