public interface Drawable1DInterface
Drawable1DInterface
is the interface shared by all one dimensional
graphical objects - that is, Line
s and AngLine
s.
Method Summary | |
---|---|
Location |
getEnd()
Get the location of the end of the line. |
Location |
getStart()
Get the location of the start of the line. |
void |
setEnd(double x,
double y)
Move the end of the line to a new location |
void |
setEnd(Location point)
Move the end of the line to a new location |
void |
setEndPoints(double x1,
double y1,
double x2,
double y2)
Move both endpoints of the line. |
void |
setEndPoints(Location start,
Location end)
Move both endpoints of the line. |
void |
setStart(double x,
double y)
Move the start of the line to a new location |
void |
setStart(Location point)
Move the start of the line to a new location |
Methods inherited from interface objectdraw.DrawableInterface |
---|
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
Method Detail |
---|
Location getEnd()
Location
of the end of the line.Location getStart()
Location
of the start of the line.void setEnd(double x, double y)
x
- x coordinate to which the end of the line should be movedy
- y coordinate to which the end of the line should be movedvoid setEnd(Location point)
point
- Location
to which the end of the line should be movedvoid setEndPoints(double x1, double y1, double x2, double y2)
x1
- x1 coordinate to which the start of the line should be movedy1
- y1 coordinate to which the start of the line should be movedx2
- x coordinate to which the end of the line should be movedy2
- y coordinate to which the end of the line should be movedvoid setEndPoints(Location start, Location end)
start
- Location
to which the start of the line should be movedend
- Location
to which the end of the line should be movedvoid setStart(double x, double y)
x
- x coordinate to which the start of the line should be movedy
- y coordinate to which the start of the line should be movedvoid setStart(Location point)
point
- Location
to which the start of the line should be moved