|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdiva.canvas.AbstractSite
public abstract class AbstractSite
An abstract implementation of Site. This class provides default implementations of several methods in the Site interface, to make it easier to implement site classes.
| Red |
| Field Summary | |
|---|---|
protected boolean |
_hasNormal
True if the site has had its normal set by setNormal. |
protected double |
_normal
The normal of the site. |
| Constructor Summary | |
|---|---|
AbstractSite()
|
|
| Method Summary | |
|---|---|
abstract Figure |
getFigure()
Get the figure to which this site is attached. |
abstract int |
getID()
Get the ID of this site. |
double |
getNormal()
Get the angle of the normal to this site, in radians between zero and 2pi. |
java.awt.geom.Point2D |
getPoint()
Get the point location of the site, in the enclosing transform context with the default normal. |
java.awt.geom.Point2D |
getPoint(double normal)
Get the point location of the site, in the enclosing transform context with the given normal. |
java.awt.geom.Point2D |
getPoint(TransformContext tc)
Get the point location of the site, in the given transform context with the default normal. |
java.awt.geom.Point2D |
getPoint(TransformContext tc,
double normal)
Get the point location of the site, in the given transform context with the given normal. |
TransformContext |
getTransformContext()
Get the enclosing transform context of this site. |
abstract double |
getX()
Get the x-coordinate of the site, in the enclosing transform context. |
abstract double |
getY()
Get the y-coordinate of the site, in the enclosing transform context. |
boolean |
hasNormal()
Test if this site has a "normal" to it. |
boolean |
isNormal(int direction)
Test if this site has a normal in the given direction. |
void |
setNormal(double normal)
Set the normal "out" of the site. |
void |
translate(double x,
double y)
Translate the site by the indicated distance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double _normal
protected boolean _hasNormal
| Constructor Detail |
|---|
public AbstractSite()
| Method Detail |
|---|
public abstract Figure getFigure()
getFigure in interface Sitepublic abstract int getID()
getID in interface Sitepublic double getNormal()
getNormal in interface Sitepublic java.awt.geom.Point2D getPoint()
getPoint in interface Sitepublic java.awt.geom.Point2D getPoint(TransformContext tc)
getPoint in interface Sitepublic java.awt.geom.Point2D getPoint(double normal)
getPoint in interface Site
public java.awt.geom.Point2D getPoint(TransformContext tc,
double normal)
getPoint in interface Sitepublic TransformContext getTransformContext()
getTransformContext in interface Sitepublic abstract double getX()
getX in interface Sitepublic abstract double getY()
getY in interface Sitepublic boolean hasNormal()
hasNormal in interface Sitepublic boolean isNormal(int direction)
isNormal in interface Sitepublic void setNormal(double normal)
setNormal in interface Site
public void translate(double x,
double y)
translate in interface Site
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||