edu.umd.cs.piccolox.util
Class PLocator

java.lang.Object
  extended by edu.umd.cs.piccolox.util.PLocator
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PNodeLocator

public abstract class PLocator
extends Object
implements Serializable

PLocator provides an abstraction for locating points. Subclasses such as PNodeLocator and PBoundsLocator specialize this behavior by locating points on nodes, or on the bounds of nodes.

Version:
1.0
Author:
Jesse Grosjean
See Also:
Serialized Form

Constructor Summary
PLocator()
          Default constructor provided for subclasses.
 
Method Summary
 Point2D locatePoint(Point2D dstPoint)
          Locates the point this locator is responsible for finding, and stores it in dstPoints.
abstract  double locateX()
          Locates the X component of the position this locator finds.
abstract  double locateY()
          Locates the Y component of the position this locator finds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PLocator

public PLocator()
Default constructor provided for subclasses. Does nothing by itself.

Method Detail

locatePoint

public Point2D locatePoint(Point2D dstPoint)
Locates the point this locator is responsible for finding, and stores it in dstPoints. Should dstPoints be null, it will create a new point and return it.

Parameters:
dstPoint - output parameter to store the located point
Returns:
the located point

locateX

public abstract double locateX()
Locates the X component of the position this locator finds.

Returns:
x component of located point

locateY

public abstract double locateY()
Locates the Y component of the position this locator finds.

Returns:
y component of located point


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.