|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.mit.sketch.geom.Rectangle
|
+--edu.mit.sketch.grammar.me.Shade
This class represents a line described by its end-points p, q.
| Field Summary | |
Vector |
lines
Lines that formed this Shade. |
int |
shades
Number of shades to draw. |
| Fields inherited from class edu.mit.sketch.geom.Rectangle |
graphics, time_stamp, x, y |
| Fields inherited from interface edu.mit.sketch.geom.GeometricObject |
CIRCLE, ELLIPSE, LINE, POINT, POLYGON, RECTANGLE, SQUARE |
| Constructor Summary | |
Shade(Vector input_lines)
The constructor. |
|
| Method Summary | |
double |
getAngle()
Returns the angle of the object WRT the x axis in radians. |
Rectangle |
getRectangularBounds()
Supplied for completeness. |
long |
getTimeStamp()
Returns the time stamp of the current Terminal |
String |
getType()
Implement GeometricObject |
void |
paint()
Draw the object |
void |
paint(Graphics g)
Draw the object |
void |
paintOriginal(Graphics g)
This method is used to paint the original data points that forms this GeometricObject |
boolean |
pointIsOn(Point point,
int radius)
Returns true if the point is within +-radius distance from the curve defining the object. |
void |
setTimeStamp(long time_stamp)
Sets the time stamp of the current Terminal |
String |
toString()
Override toString |
void |
translate(double x,
double y)
Add the arguments to the (x, y) position of the object. |
| Methods inherited from class edu.mit.sketch.geom.Rectangle |
area, containsGeometricObject, containsGeometricObjects, getCenter, getDataPoints, getHeight, getMajorAxisAngle, getMajorAxisDirection, getMajorAxisLength, getMinorAxisAngle, getMinorAxisLength, getPolygonalBounds, getWidth, hasOnMajorAxisDirection, isRectangle, paint, pointIsOnOriginal, rotateAbout, scaleAboutCenter, setDataPoints, setGraphicsContext, setRectangle, shade, shade, spatialRelation, spatialRelation, spatialRelationCartesian, touches, union |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.mit.sketch.ui.Paintable |
setGraphicsContext |
| Field Detail |
public Vector lines
public int shades
| Constructor Detail |
public Shade(Vector input_lines)
| Method Detail |
public String getType()
getType in interface PaintablegetType in class Rectanglepublic String toString()
toString in class Rectanglepublic void paint()
paint in interface Paintablepaint in class Rectanglepublic void paint(Graphics g)
paint in interface Paintablepaint in class Rectanglepublic void paintOriginal(Graphics g)
paintOriginal in interface PaintablepaintOriginal in class Rectangle
public boolean pointIsOn(Point point,
int radius)
pointIsOn in class Rectanglepublic Rectangle getRectangularBounds()
getRectangularBounds in class Rectanglepublic double getAngle()
getAngle in class Rectanglepublic void setTimeStamp(long time_stamp)
setTimeStamp in interface TerminalsetTimeStamp in class Rectanglepublic long getTimeStamp()
getTimeStamp in interface TerminalgetTimeStamp in class Rectangle
public void translate(double x,
double y)
translate in class Rectangle
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||