|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
All the objects who want to be Geometric must implement this interface.
| Field Summary | |
static int |
CIRCLE
|
static int |
ELLIPSE
|
static int |
LINE
|
static int |
POINT
|
static int |
POLYGON
|
static int |
RECTANGLE
Available GeometricObject types. |
static int |
SQUARE
|
| Method Summary | |
boolean |
containsGeometricObject(GeometricObject object)
Returns false if the argument is not completely inside this object. |
boolean |
containsGeometricObjects(GeometricObject[] objects)
Returns false if the objects in the input array are completely inside this object. |
Polygon |
getDataPoints()
This method is used to get the original data points that forms this GeometricObject |
Polygon |
getPolygonalBounds()
This method should return a polygon that fully contains the current object. |
Rectangle |
getRectangularBounds()
This method should return the Rectangular bounds of the object. |
void |
setDataPoints(Polygon points)
This method is used to set the original data points that forms this GeometricObject |
int |
spatialRelation(GeometricObject object)
This method should return the spatial relation of the input parameter with respect to this object. |
boolean |
touches(GeometricObject object)
This method should return true if the input object touches this geometric object. |
| Methods inherited from interface edu.mit.sketch.grammar.Terminal |
getTimeStamp, setTimeStamp |
| Methods inherited from interface edu.mit.sketch.ui.Paintable |
getType, paint, paint, paintOriginal, setGraphicsContext |
| Methods inherited from interface edu.mit.sketch.geom.Translatable |
pointIsOn, pointIsOnOriginal, translate |
| Field Detail |
public static final int RECTANGLE
public static final int SQUARE
public static final int ELLIPSE
public static final int CIRCLE
public static final int POLYGON
public static final int LINE
public static final int POINT
| Method Detail |
public Polygon getPolygonalBounds()
public boolean touches(GeometricObject object)
public int spatialRelation(GeometricObject object)
public Rectangle getRectangularBounds()
public boolean containsGeometricObject(GeometricObject object)
public boolean containsGeometricObjects(GeometricObject[] objects)
public void setDataPoints(Polygon points)
public Polygon getDataPoints()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||