|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractSite
diva.canvas.connector.ParametricSite
public class ParametricSite
A site that locates itself in a figure at a location in X and Y that is some percentage of the bounding box of the figure. So as the figure grows, the site relocates itself proportionally.
Field Summary | |
---|---|
private int |
_id
The id |
private Figure |
_parentFigure
The parent figure |
private double |
_xt
The X parameter, denoting the percentage of the width relative to the left side of the figure. |
private double |
_yt
The Y parameter, denoting the percentage of the height relative to the top side of the figure. |
Fields inherited from class diva.canvas.AbstractSite |
---|
_hasNormal, _normal |
Constructor Summary | |
---|---|
ParametricSite(Figure figure,
int id,
double xt,
double yt)
Create a new site on the given figure with the given id, located at (xt, yt) percentage of the given figure's bounding box, with (0,0) being the upper left-hand corner and (1,1) being the lower right. |
Method Summary | |
---|---|
Figure |
getFigure()
Get the figure to which this site is attached. |
int |
getID()
Get the ID of this site. |
double |
getX()
Get the X-coordinate of the site. |
double |
getY()
Get the Y-coordinate of the site. |
Methods inherited from class diva.canvas.AbstractSite |
---|
getNormal, getPoint, getPoint, getPoint, getPoint, getTransformContext, hasNormal, isNormal, setNormal, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int _id
private Figure _parentFigure
private double _xt
private double _yt
Constructor Detail |
---|
public ParametricSite(Figure figure, int id, double xt, double yt)
Method Detail |
---|
public Figure getFigure()
getFigure
in interface Site
getFigure
in class AbstractSite
public int getID()
getID
in interface Site
getID
in class AbstractSite
public double getX()
getX
in interface Site
getX
in class AbstractSite
public double getY()
getY
in interface Site
getY
in class AbstractSite
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |