objectdraw
Interface Drawable1DInterface

All Superinterfaces:
DrawableInterface
All Known Implementing Classes:
Line

public interface Drawable1DInterface
extends DrawableInterface

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

Version:
1.1.2 released July 2006

Method Summary
 Location getEnd()
          Gets the line's end point.
 Location getStart()
          Gets the line's start point.
 void setEnd(double x, double y)
          Sets the line's end point.
 void setEnd(Location point)
          Sets the line's end point.
 void setEndPoints(double x1, double y1, double x2, double y2)
          Sets the line's end points.
 void setEndPoints(Location start, Location end)
          Sets the line's end points.
 void setStart(double x, double y)
          Sets the line's start point.
 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

getStart

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

Returns:
the start point

getEnd

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

Returns:
the end point

setStart

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

Parameters:
point - new start point

setStart

public 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

setEnd

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

Parameters:
point - new endpoint

setEnd

public 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

setEndPoints

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

Parameters:
start - first endpoint
end - second endpoint

setEndPoints

public 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