Class LinePanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----LinePanel

public class LinePanel
extends Panel
Implenents a container that displays various parameters for the Midpoint Line Algorithm.


Constructor Index

 o LinePanel()
Constructs a LinePanel.

Method Index

 o getLineEndPoints(Point, Point)
Modifies the given Point parameters with the current value of the line endpoint textfields.
 o handleEvent(Event)
Process any events associated with the editable fields of this object.
 o setLineEndPoints(Point, Point)
Update the two endpoints text fields in this object.
 o update(int, int, int, int, int, int, int)
Updates the non-editable parameter fields of this object.

Constructors

 o LinePanel
 public LinePanel()
Constructs a LinePanel.

Methods

 o handleEvent
 public boolean handleEvent(Event event)
Process any events associated with the editable fields of this object.

Overrides:
handleEvent in class Component
 o setLineEndPoints
 public void setLineEndPoints(Point p1,
                              Point p2)
Update the two endpoints text fields in this object.

 o getLineEndPoints
 public boolean getLineEndPoints(Point p1,
                                 Point p2)
Modifies the given Point parameters with the current value of the line endpoint textfields.

Returns:
Returns false unless all four of the endpoint textfields are valid integers. On failure the resulting values in p1 and p2 are unpredictable.
 o update
 public void update(int dx,
                    int dy,
                    int incMajor,
                    int incMinor,
                    int d,
                    int x,
                    int y)
Updates the non-editable parameter fields of this object.