All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.awt.draw.Line

java.lang.Object
   |
   +----ncsa.awt.draw.DrawingPrimitive
           |
           +----ncsa.awt.draw.Line

public class Line
extends DrawingPrimitive
A class that implements a line drawing primitive


Constructor Index

 o Line()
 o Line(int, int, int, int)
Constructs a Line Primitive given two points

Method Index

 o describe()
 o drawPoints(Graphics)
Draws the line in the given graphics context

Constructors

 o Line
 public Line()
 o Line
 public Line(int x0,
             int y0,
             int x1,
             int y1)
Constructs a Line Primitive given two points

Parameters:
x0 - the first point's x coordinate
y0 - the first point's y coordinate
x1 - the second point's x coordinate
y1 - the second point's y coordinate

Methods

 o drawPoints
 public void drawPoints(Graphics g)
Draws the line in the given graphics context

Parameters:
g - the graphics context
Overrides:
drawPoints in class DrawingPrimitive
 o describe
 public String describe()
Returns:
a string describing this line
Overrides:
describe in class DrawingPrimitive

All Packages  Class Hierarchy  This Package  Previous  Next  Index