objectdraw
Class AngLine

java.lang.Object
  extended by objectdraw.ObjectDrawObject
      extended by objectdraw.ObjectDrawShape
          extended by objectdraw.Line
              extended by objectdraw.AngLine
All Implemented Interfaces:
objectdraw.Dependent, Drawable1DInterface, DrawableInterface, DrawableStrokeInterface

public class AngLine
extends Line

The AngLine class provides a different way to make lines: instead of specifying start and end points, you make an AngLine by providing a start point, the length of the line, and the direction (as an angle in radians) that the line should extend from the start point.

Author:
Russell Zahniser (russell@zahniser.net)

Field Summary
 
Fields inherited from interface objectdraw.DrawableStrokeInterface
CLICK_SIZE, DEFAULT_STROKE
 
Constructor Summary
AngLine(double x, double y, double length, double radianAngle, Color color, DrawingCanvas canvas)
          Create a line of the specified color starting at (x, y) and extending a distance length from there at an angle radianAngle.
AngLine(double x, double y, double length, double radianAngle, DrawingCanvas canvas)
          Create a black line starting at (x, y) and extending a distance length from there at an angle radianAngle.
AngLine(Location start, double length, double radianAngle, Color color, DrawingCanvas canvas)
          Create a line of the specified color starting at start and extending a distance length from there at an angle radianAngle.
AngLine(Location start, double length, double radianAngle, DrawingCanvas canvas)
          Create a black line starting at start and extending a distance length from there at an angle radianAngle.
 
Method Summary
 
Methods inherited from class objectdraw.Line
addToCanvas, contains, getCanvas, getColor, getEnd, getLineWidth, getStart, getStroke, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, setEnd, setEnd, setEndPoints, setEndPoints, setLineWidth, setStart, setStart, setStroke, show, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AngLine

public AngLine(double x,
               double y,
               double length,
               double radianAngle,
               Color color,
               DrawingCanvas canvas)
Create a line of the specified color starting at (x, y) and extending a distance length from there at an angle radianAngle.

Parameters:
x - x coordinate of the start location
y - y coordinate of the start location
length - Length of the line
radianAngle - Angular direction of the line, in radians. 0 is east, Math.PI / 2 is north, and so on, as is customary in math.
color - Color of the line
canvas - DrawingCanvas to add this line to

AngLine

public AngLine(double x,
               double y,
               double length,
               double radianAngle,
               DrawingCanvas canvas)
Create a black line starting at (x, y) and extending a distance length from there at an angle radianAngle.

Parameters:
x - x coordinate of the start location
y - y coordinate of the start location
length - Length of the line
radianAngle - Angular direction of the line, in radians. 0 is east, Math.PI / 2 is north, and so on, as is customary in math.
canvas - DrawingCanvas to add this line to

AngLine

public AngLine(Location start,
               double length,
               double radianAngle,
               Color color,
               DrawingCanvas canvas)
Create a line of the specified color starting at start and extending a distance length from there at an angle radianAngle.

Parameters:
start - Location of the start point of the line
length - Length of the line
radianAngle - Angular direction of the line, in radians. 0 is east, Math.PI / 2 is north, and so on, as is customary in math.
color - Color of the line
canvas - DrawingCanvas to add this line to

AngLine

public AngLine(Location start,
               double length,
               double radianAngle,
               DrawingCanvas canvas)
Create a black line starting at start and extending a distance length from there at an angle radianAngle.

Parameters:
start - Location of the start point of the line
length - Length of the line
radianAngle - Angular direction of the line, in radians. 0 is east, Math.PI / 2 is north, and so on, as is customary in math.
canvas - DrawingCanvas to add this line to