|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--Rectangle
|
+--Spring
A basic Spring
| Field Summary | |
(package private) Line |
end_points
End points of the spring stored in a line. |
(package private) int |
loops
The number of loops that the spring makes. |
(package private) Polygon |
polygon
The polygon that was used to construct the spring. |
| Fields inherited from class Rectangle |
angle,
graphics,
height,
height_x,
height_y,
points,
time_stamp,
width,
width_x,
width_y,
x,
y |
| Constructor Summary | |
(package private) |
Spring(Polygon polygon)
The constructor constructs a spring that is approximated by the input polygon. |
| Method Summary | |
Rectangle |
getRectangularBounds()
This method should return the Rectangular bounds of this non-terminal object. |
java.lang.String |
getType()
Implement Paintable |
static boolean |
isSpring(Polygon polygon)
Returns true if the input polygon looks like a Spring. |
void |
paint()
Draw the Spring |
void |
paint(java.awt.Graphics g)
Draw the Spring Can be made faster by incrementing theta in larger chunks. |
void |
paintOriginal(java.awt.Graphics g)
This method is used to paint the original data points that forms this GeometricObject |
void |
setGraphicsContext(java.awt.Graphics g)
Set graphics context for this Pin object. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int loops
Polygon polygon
Line end_points
| Constructor Detail |
Spring(Polygon polygon)
| Method Detail |
public void paint()
public static boolean isSpring(Polygon polygon)
public void paint(java.awt.Graphics g)
public void setGraphicsContext(java.awt.Graphics g)
public java.lang.String getType()
public void paintOriginal(java.awt.Graphics g)
public Rectangle getRectangularBounds()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||