algoanim.util
Class OffsetFromLastPosition

java.lang.Object
  extended by algoanim.util.Node
      extended by algoanim.util.OffsetFromLastPosition

public class OffsetFromLastPosition
extends Node

This is a concrete kind of a Node. The coordinates are measured as a displacement from the last node used>. For example, to place an element 20 pixels to the right and 10 pixels of the last coordinate referenced, you would use the following: Node n = new OffsetFromLastPosition(20, 10);

Version:
0.7 20110311
Author:
Guido Roessling

Constructor Summary
OffsetFromLastPosition(int dx, int dy)
          Creates a new Offset instance at a distance of (xCoordinate, yCoordinate) in direction "targetDirection" from the base primitive "reference".
 
Method Summary
 int getX()
          Returns the x-axis offset.
 int getY()
          Returns the y-axis offset.
 
Methods inherited from class algoanim.util.Node
convertToNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffsetFromLastPosition

public OffsetFromLastPosition(int dx,
                              int dy)
Creates a new Offset instance at a distance of (xCoordinate, yCoordinate) in direction "targetDirection" from the base primitive "reference".

Parameters:
dx - the x-axis offset.
dy - the y-axis offset.
Method Detail

getX

public int getX()
Returns the x-axis offset.

Returns:
the x-axis offset.

getY

public int getY()
Returns the y-axis offset.

Returns:
the y-axis offset.