edu.umd.cs.piccolox.util
Class PNodeLocator

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

public class PNodeLocator
extends PLocator

PNodeLocator provides an abstraction for locating points on a node. Points are located in the local corrdinate system of the node. The default behavior is to locate the center point of the nodes bounds. The node where the point is located is stored internal to this locator (as an instance varriable). If you want to use the same locator to locate center points on many different nodes you will need to call setNode() before asking for each location.

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

Field Summary
protected  PNode node
           
 
Constructor Summary
PNodeLocator(PNode node)
           
 
Method Summary
 PNode getNode()
           
 double locateX()
           
 double locateY()
           
 void setNode(PNode node)
           
 
Methods inherited from class edu.umd.cs.piccolox.util.PLocator
locatePoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected PNode node
Constructor Detail

PNodeLocator

public PNodeLocator(PNode node)
Method Detail

getNode

public PNode getNode()

setNode

public void setNode(PNode node)

locateX

public double locateX()
Specified by:
locateX in class PLocator

locateY

public double locateY()
Specified by:
locateY in class PLocator


Copyright © 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility