public class AutonomousSite extends AbstractSite
_hasNormal, _normal
Constructor and Description |
---|
AutonomousSite(CanvasLayer l,
double x,
double y)
Create a new autonomous site in the transform
context of the given pane and at the given location within that layer.
|
AutonomousSite(CanvasPane p,
double x,
double y)
Create a new autonomous site in the transform
context of the given pane and at the given location within that pane.
|
AutonomousSite(Figure f,
double x,
double y)
Create a new autonomous site in the transform context of
the given figure and at the given location within that figure.
|
AutonomousSite(TransformContext c,
double x,
double y)
Create a new autonomous site in the given transform
context and at the given location within that context.
|
Modifier and Type | Method and Description |
---|---|
Figure |
getFigure()
Return null.
|
int |
getID()
Return zero.
|
TransformContext |
getTransformContext()
Get the enclosing transform context of this site.
|
double |
getX()
Get the x-coordinate of the site, in the enclosing
transform context.
|
double |
getY()
Get the y-coordinate of the site, in the enclosing
transform context.
|
void |
setLocation(TransformContext c,
double x,
double y)
Set the transform context and the location within the new
transform context.
|
void |
translate(double x,
double y)
Translate the site by the indicated distance.
|
public AutonomousSite(TransformContext c, double x, double y)
public AutonomousSite(CanvasPane p, double x, double y)
public AutonomousSite(CanvasLayer l, double x, double y)
public AutonomousSite(Figure f, double x, double y)
public Figure getFigure()
getFigure
in interface Site
getFigure
in class AbstractSite
public int getID()
getID
in interface Site
getID
in class AbstractSite
public TransformContext getTransformContext()
getTransformContext
in interface Site
getTransformContext
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
public void setLocation(TransformContext c, double x, double y)
public void translate(double x, double y)
translate
in interface Site
translate
in class AbstractSite
x
- The x distance to be translated.y
- The y distance to be translated.