Class DistLinePanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----Plane
|
+----DistLinePanel
- public class DistLinePanel
- extends Plane
A class which shows a piece of a real line for the graphical display
and entry of axis distances.
-
CX
- The abstract x-coordinate of the left side of the axis distance display.
-
CY
- The abstract y-coordinate of the upper edge of the axis distance display.
-
inputpanel
- A reference to the containing inputpanel.
-
previ
- The location of a mousedown in this plane, to compute the extent of
a drag that may occur; in pixel coordinates.
-
SX
- The width, in abstract units, of the axis distance display.
-
SY
- The height, in abstract units, of the axis distance display.
-
X
- The width, in pixels, of the axis distance display.
-
Y
- The height, in pixels, of the axis distance display.
-
DistLinePanel(InputPanel)
- Constructor for DistLinePanels.
-
mouseDown(Event, int, int)
- Java 1.0 handling of mouseDown events.
-
mouseDrag(Event, int, int)
- Java 1.0 handling of mouseDrag events.
-
paint(Graphics)
- Paint the DistLinePanel, by painting the parent Plane, putting a mark
at the currently selected axis distance and making tickmarks.
-
zoom(double)
- Scales the size of the visible window onto the line of axis distances
inputpanel
public InputPanel inputpanel
- A reference to the containing inputpanel.
- See Also:
- inputpanel
previ
protected int previ[]
- The location of a mousedown in this plane, to compute the extent of
a drag that may occur; in pixel coordinates.
CX
public static final double CX
- The abstract x-coordinate of the left side of the axis distance display.
CY
public static final double CY
- The abstract y-coordinate of the upper edge of the axis distance display.
SX
public static final double SX
- The width, in abstract units, of the axis distance display.
SY
public static final double SY
- The height, in abstract units, of the axis distance display.
X
public static final int X
- The width, in pixels, of the axis distance display. Good defaults are:
- 25
- for small screens, and
- 50
- for large screens
Y
public static final int Y
- The height, in pixels, of the axis distance display. Good defaults are:
- 200
- for small screens, and
- 300
- for large screens
DistLinePanel
public DistLinePanel(InputPanel nptpnl)
- Constructor for DistLinePanels.
- Parameters:
- nptpnl - the ambient inputpanel
mouseDown
public boolean mouseDown(Event e,
int x,
int y)
- Java 1.0 handling of mouseDown events.
- Parameters:
- e - the event to be handled
- x - the x-coordinate (in pixels) of the mouseDown
- y - the y-coordinate (in pixels) of the mouseDown
- Overrides:
- mouseDown in class Component
mouseDrag
public boolean mouseDrag(Event e,
int x,
int y)
- Java 1.0 handling of mouseDrag events.
- Parameters:
- e - the event to be handled
- x - the x-coordinate (in pixels) of the mouseDrag
- y - the y-coordinate (in pixels) of the mouseDrag
- Overrides:
- mouseDrag in class Component
paint
public void paint(Graphics g)
- Paint the DistLinePanel, by painting the parent Plane, putting a mark
at the currently selected axis distance and making tickmarks.
- Parameters:
- g - the Graphics object upon which to paint the DistLinePanel
- Overrides:
- paint in class Plane
zoom
public void zoom(double factor)
- Scales the size of the visible window onto the line of axis distances
- Parameters:
- factor - the scaling factor, can be any positive number