objectdraw
Interface Drawable1DInterface

All Superinterfaces:
DrawableInterface
All Known Implementing Classes:
AngLine, Line

public interface Drawable1DInterface
extends DrawableInterface

Drawable1DInterface describes the methods available for manipulating lines drawn on a DrawingCanvas.

Version:
1.1.1 released February 2005

Method Summary
abstract  Location getEnd()
          Gets the line's end point.
abstract  Location getStart()
          Gets the line's start point.
abstract  void setEnd(double x, double y)
          Sets the line's end point.
abstract  void setEnd(Location point)
          Sets the line's end point.
abstract  void setEndPoints(double x1, double y1, double x2, double y2)
          Sets the line's end points.
abstract  void setEndPoints(Location start, Location end)
          Sets the line's end points.
abstract  void setStart(double x, double y)
          Sets the line's start point.
abstract  void setStart(Location point)
          Sets the line's start point.
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Method Detail

getEnd

Location getEnd()
Gets the line's end point.

Returns:
the end point

getStart

Location getStart()
Gets the line's start point.

Returns:
the start point

setEnd

void setEnd(double x,
            double y)
Sets the line's end point.

Parameters:
x - x coordinate of new end point
y - y coordinate of new end point

setEnd

void setEnd(Location point)
Sets the line's end point.

Parameters:
point - new endpoint

setEndPoints

void setEndPoints(double x1,
                  double y1,
                  double x2,
                  double y2)
Sets the line's end points.

Parameters:
x1 - x coordinate of start
y1 - y coordinate of start
x2 - x coordinate of end
y2 - y coordinate of end

setEndPoints

void setEndPoints(Location start,
                  Location end)
Sets the line's end points.

Parameters:
start - first endpoint
end - second endpoint

setStart

void setStart(double x,
              double y)
Sets the line's start point.

Parameters:
x - x coordinate of new start point
y - y coordinate of new start point

setStart

void setStart(Location point)
Sets the line's start point.

Parameters:
point - new start point