|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolox.util.PLocator
edu.umd.cs.piccolox.util.PNodeLocator
public class PNodeLocator
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.
Field Summary | |
---|---|
protected PNode |
node
Node being located by this locator. |
Constructor Summary | |
---|---|
PNodeLocator(PNode node)
Constructs a locator responsible for locating the given node. |
Method Summary | |
---|---|
PNode |
getNode()
Returns the node being located by this locator. |
double |
locateX()
Locates the left of the target node's bounds. |
double |
locateY()
Locates the top of the target node's bounds. |
void |
setNode(PNode node)
Changes the node being located by this locator. |
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 |
---|
protected PNode node
Constructor Detail |
---|
public PNodeLocator(PNode node)
node
- node to be locatedMethod Detail |
---|
public PNode getNode()
public void setNode(PNode node)
node
- new node to have this locator locate.public double locateX()
locateX
in class PLocator
public double locateY()
locateY
in class PLocator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |