objectdraw
Class AngLine

java.lang.Object
  extended by objectdraw.Drawable
      extended by objectdraw.Line
          extended by objectdraw.AngLine
All Implemented Interfaces:
Serializable, Drawable1DInterface, DrawableInterface

public class AngLine
extends Line

AngLine is a variant of Line where the constructor takes a starting point and angle from the horizontal rather than two end points.

Version:
1.1.1 released February 2005
Author:
Kim Bruce
See Also:
Serialized Form

Field Summary
 
Fields inherited from class objectdraw.Line
end, start
 
Fields inherited from class objectdraw.Drawable
canvasContent, color, shown
 
Constructor Summary
AngLine(double startX, double startY, double length, double angle, DrawingCanvas canvas)
          Creates a new Line given a starting location, length and direction.
AngLine(Location start, double length, double angle, DrawingCanvas canvas)
          Creates a new Line given a starting location, length and direction.
 
Method Summary
 
Methods inherited from class objectdraw.Line
contains, draw, getEnd, getStart, move, moveTo, setEnd, setEnd, setEndPoints, setEndPoints, setStart, setStart, toString
 
Methods inherited from class objectdraw.Drawable
addToCanvas, clearCanvasContent, getCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setCanvasContent, setColor, setStateChanged, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, getCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Constructor Detail

AngLine

public AngLine(double startX,
               double startY,
               double length,
               double angle,
               DrawingCanvas canvas)
Creates a new Line given a starting location, length and direction.

Parameters:
startX - the x coordinate of the starting point of the line.
startY - the y coordinate of the starting point of the line.
length - the length of the line.
angle - the angle the line makes with the horizontal
canvas - the canvas in which the line is created.

AngLine

public AngLine(Location start,
               double length,
               double angle,
               DrawingCanvas canvas)
Creates a new Line given a starting location, length and direction.

Parameters:
start - the starting point of the line.
length - the length of the line.
angle - the angle the line makes with the horizontal
canvas - the canvas in which the line is created.