edu.umd.cs.piccolox.util
Class PNodeLocator
java.lang.Object
edu.umd.cs.piccolox.util.PLocator
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 edu.umd.cs.piccolo.PNode |
node
|
Constructor Summary |
PNodeLocator(edu.umd.cs.piccolo.PNode node)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
node
protected edu.umd.cs.piccolo.PNode node
PNodeLocator
public PNodeLocator(edu.umd.cs.piccolo.PNode node)
getNode
public edu.umd.cs.piccolo.PNode getNode()
setNode
public void setNode(edu.umd.cs.piccolo.PNode node)
locateX
public double locateX()
- Specified by:
locateX
in class PLocator
locateY
public double locateY()
- Specified by:
locateY
in class PLocator