|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.grammar.me.Pin
A basic Pin with a round top and a cross.
| Field Summary | |
Graphics |
graphics
Graphics context for this Geometric object. |
| Constructor Summary | |
Pin(Ellipse circle,
Cross cross)
The constructor. |
|
| Method Summary | |
Vector |
getChildren()
This method should return a vector containing the children of this object. |
Polygon[] |
getPolygonalBoundsArray()
This method should return the polygonal array bounds of this non-terminal object. |
Rectangle |
getRectangularBounds()
This method should return the Rectangular bounds of this non-terminal object. |
String |
getType()
Implement Paintable |
void |
paint()
Draw the Pin. |
void |
paint(Graphics g)
Draw the Pin |
void |
paintOriginal(Graphics g)
This method is used to paint the original data points that forms this GeometricObject |
boolean |
pointIsOn(Point p,
int radius)
Returns true if the point is within +-radius distance from the curve defining the object. |
boolean |
pointIsOnOriginal(Point p,
int radius)
Returns true if the point is within +-radius distance from the original curve defining the object. |
void |
setGraphicsContext(Graphics g)
Set graphics context for this Pin object. |
void |
translate(double x,
double y)
Add the arguments to the (x, y) position of the object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public transient Graphics graphics
| Constructor Detail |
public Pin(Ellipse circle,
Cross cross)
| Method Detail |
public void paint()
paint in interface Paintablepublic void paint(Graphics g)
paint in interface Paintablepublic void setGraphicsContext(Graphics g)
setGraphicsContext in interface Paintablepublic String getType()
getType in interface Paintablepublic void paintOriginal(Graphics g)
paintOriginal in interface Paintablepublic Rectangle getRectangularBounds()
getRectangularBounds in interface NonTerminalpublic Polygon[] getPolygonalBoundsArray()
getPolygonalBoundsArray in interface NonTerminalpublic Vector getChildren()
getChildren in interface NonTerminal
public void translate(double x,
double y)
translate in interface Translatable
public boolean pointIsOn(Point p,
int radius)
pointIsOn in interface Translatable
public boolean pointIsOnOriginal(Point p,
int radius)
pointIsOnOriginal in interface Translatable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||