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.
-
LinePanel()
- Constructs a LinePanel.
-
getLineEndPoints(Point, Point)
- Modifies the given Point parameters with the current value of
the line endpoint textfields.
-
handleEvent(Event)
- Process any events associated with the editable fields of this object.
-
setLineEndPoints(Point, Point)
- Update the two endpoints text fields in this object.
-
update(int, int, int, int, int, int, int)
- Updates the non-editable parameter fields of this object.
LinePanel
public LinePanel()
- Constructs a LinePanel.
handleEvent
public boolean handleEvent(Event event)
- Process any events associated with the editable fields of this object.
- Overrides:
- handleEvent in class Component
setLineEndPoints
public void setLineEndPoints(Point p1,
Point p2)
- Update the two endpoints text fields in this object.
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.
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.