|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsm.SMShape
sm.SMRectangularShape
sm.SMSegment
A segment for use with an SMCanvas.
| Field Summary |
| Fields inherited from class sm.SMShape |
cptId |
| Constructor Summary | |
SMSegment()
Builds an empty SMSegment. |
|
SMSegment(double x1,
double y1,
double x2,
double y2)
Builds a SMSegment. |
|
SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Paint p)
Builds a SMSegment. |
|
SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Paint p,
java.awt.Stroke str)
Builds a SMSegment. |
|
SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Stroke str)
Builds a SMSegment. |
|
SMSegment(java.awt.Paint p)
Builds an empty SMSegment. |
|
SMSegment(java.awt.Paint p,
java.awt.Stroke str)
Builds an empty SMSegment. |
|
SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Builds a SMSegment. |
|
SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Paint p)
Builds a SMSegment. |
|
SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Paint p,
java.awt.Stroke str)
Builds a SMSegment. |
|
SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Stroke str)
Builds a SMSegment. |
|
SMSegment(java.awt.Stroke str)
Builds an empty SMSegment. |
|
| Method Summary | |
SMShape |
duplicate()
Creates a new copy of this shape and returns it. |
SMRectangularShape |
setBoundingBox(double minx,
double miny,
double width,
double height)
Define this rectangular shape by its bounding box. |
SMRectangularShape |
setBoundingBox(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Define this rectangular shape by its bounding box. |
SMRectangularShape |
setDiagonal(double x1,
double y1,
double x2,
double y2)
Define this rectangular shape by its diagonal. |
SMRectangularShape |
setDiagonal(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Define this rectangular shape by its diagonal. |
SMSegment |
setPoints(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Sets the ending points of this segment. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Paint p,
java.awt.Stroke str)
p1 - The first point of the segment.p2 - The second point of the segment.p - The fill paint stylestr - The stroke style
public SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Paint p,
java.awt.Stroke str)
x1 - The x-coordinate of the first point of the segment.y1 - The y-coordinate of the first point of the segment.x2 - The x-coordinate of the second point of the segment.y2 - The y-coordinate of the second point of the segment.p - The fill paint stylestr - The stroke style
public SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Paint p)
p1 - The first point of the segment.p2 - The second point of the segment.p - The fill paint style
public SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Paint p)
x1 - The x-coordinate of the first point of the segment.y1 - The y-coordinate of the first point of the segment.x2 - The x-coordinate of the second point of the segment.y2 - The y-coordinate of the second point of the segment.p - The fill paint style
public SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.Stroke str)
p1 - The first point of the segment.p2 - The second point of the segment.str - The stroke style
public SMSegment(double x1,
double y1,
double x2,
double y2,
java.awt.Stroke str)
x1 - The x-coordinate of the first point of the segment.y1 - The y-coordinate of the first point of the segment.x2 - The x-coordinate of the second point of the segment.y2 - The y-coordinate of the second point of the segment.str - The stroke style
public SMSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
p1 - The first point of the segment.p2 - The second point of the segment.
public SMSegment(double x1,
double y1,
double x2,
double y2)
x1 - The x-coordinate of the first point of the segment.y1 - The y-coordinate of the first point of the segment.x2 - The x-coordinate of the second point of the segment.y2 - The y-coordinate of the second point of the segment.
public SMSegment(java.awt.Paint p,
java.awt.Stroke str)
p - The fill paint stylestr - The stroke stylepublic SMSegment(java.awt.Paint p)
p - The fill paint stylepublic SMSegment(java.awt.Stroke str)
str - The stroke stylepublic SMSegment()
| Method Detail |
public SMSegment setPoints(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
p1 - One point.p2 - The other point.
public SMShape duplicate()
duplicate in class SMShape
public SMRectangularShape setBoundingBox(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
setBoundingBox in class SMRectangularShapep1 - One corner of the diagonal of the bounding box.p2 - The other corner of the diagonal of the bounding box.
public SMRectangularShape setBoundingBox(double minx,
double miny,
double width,
double height)
setBoundingBox in class SMRectangularShapeminx - The x coordinate of the upper left corner of the bounding box.miny - The y coordinate of the upper left corner of the bounding box.width - The width of the bounding box.height - The height of the bounding box.
public SMRectangularShape setDiagonal(double x1,
double y1,
double x2,
double y2)
setDiagonal in class SMRectangularShapex1 - The x coordinate of one corner of the diagonal.y1 - The y coordinate of one corner of the diagonal.x2 - The x coordinate of the other corner of the diagonal.y2 - The y coordinate of the other corner of the diagonal.
public SMRectangularShape setDiagonal(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
setDiagonal in class SMRectangularShapep1 - One corner of the diagonal.p2 - The other corner of the diagonal.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||