objectdraw
Interface Drawable1DInterface

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

public interface Drawable1DInterface
extends DrawableInterface

Drawable1DInterface is the interface shared by all one dimensional graphical objects - that is, Lines and AngLines.

Author:
Russell Zahniser (russell@zahniser.net)

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

getEnd

Location getEnd()
Get the location of the end of the line.

Returns:
the Location of the end of the line.

getStart

Location getStart()
Get the location of the start of the line.

Returns:
the Location of the start of the line.

setEnd

void setEnd(double x,
            double y)
Move the end of the line to a new location

Parameters:
x - x coordinate to which the end of the line should be moved
y - y coordinate to which the end of the line should be moved

setEnd

void setEnd(Location point)
Move the end of the line to a new location

Parameters:
point - Location to which the end of the line should be moved

setEndPoints

void setEndPoints(double x1,
                  double y1,
                  double x2,
                  double y2)
Move both endpoints of the line.

Parameters:
x1 - x1 coordinate to which the start of the line should be moved
y1 - y1 coordinate to which the start of the line should be moved
x2 - x coordinate to which the end of the line should be moved
y2 - y coordinate to which the end of the line should be moved

setEndPoints

void setEndPoints(Location start,
                  Location end)
Move both endpoints of the line.

Parameters:
start - Location to which the start of the line should be moved
end - Location to which the end of the line should be moved

setStart

void setStart(double x,
              double y)
Move the start of the line to a new location

Parameters:
x - x coordinate to which the start of the line should be moved
y - y coordinate to which the start of the line should be moved

setStart

void setStart(Location point)
Move the start of the line to a new location

Parameters:
point - Location to which the start of the line should be moved