All Packages Class Hierarchy This Package Previous Next Index
Class graphing.TraceGraphWindow
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----graphing.GraphWindow
|
+----graphing.ZoomGraphWindow
|
+----graphing.TraceGraphWindow
- public class TraceGraphWindow
- extends ZoomGraphWindow
A TraceGraphWindow displays functions which carry a number of nodes (TraceGraphNodes) on their graphs. The nodes can
be moved by mouse-dragging. Nodes can be added or deleted dynamically. A collection of
nodes is selected by dragging the rubber band around it, and deleted with the backspace key.
-
dragNode
- The node that is currently being dragged
-
maxNodes
- The maximum number of nodes allowed in this window.
-
nodes
- Each node keys the function that it is attached to in this table
-
TraceGraphWindow()
-
-
TraceGraphWindow(double, double, double, double)
-
-
TraceGraphWindow(double, double, double, double, double, double)
-
-
deleteAll()
- Delete all the nodes.
-
deleteFunction(Function)
- Override the method from ZoomGraphWindow to make sure all the nodes on a function are deleted when
the function is deleted.
-
keyDown(Event, int)
- A backspace deletes the selected nodes
-
mouseDown(Event, int, int)
- Clicking on (or quite near) a graph causes a node to be created there.
-
mouseDrag(Event, int, int)
-
-
mouseUp(Event, int, int)
-
-
paint(Graphics)
-
nodes
protected Hashtable nodes
- Each node keys the function that it is attached to in this table
dragNode
protected TraceGraphNode dragNode
- The node that is currently being dragged
maxNodes
public int maxNodes
- The maximum number of nodes allowed in this window.
TraceGraphWindow
public TraceGraphWindow(double xMin,
double xMax,
double xScale,
double yMin,
double yMax,
double yScale)
TraceGraphWindow
public TraceGraphWindow(double xMin,
double xMax,
double yMin,
double yMax)
TraceGraphWindow
public TraceGraphWindow()
paint
public void paint(Graphics g)
- Overrides:
- paint in class ZoomGraphWindow
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- Clicking on (or quite near) a graph causes a node to be created there. Clicking on an existing node
selects it for dragging.
- Overrides:
- mouseDown in class ZoomGraphWindow
mouseDrag
public boolean mouseDrag(Event evt,
int x,
int y)
- Overrides:
- mouseDrag in class ZoomGraphWindow
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
- Overrides:
- mouseUp in class ZoomGraphWindow
keyDown
public boolean keyDown(Event e,
int key)
- A backspace deletes the selected nodes
- Overrides:
- keyDown in class Component
deleteFunction
public void deleteFunction(Function f)
- Override the method from ZoomGraphWindow to make sure all the nodes on a function are deleted when
the function is deleted.
- Overrides:
- deleteFunction in class GraphWindow
deleteAll
public void deleteAll()
- Delete all the nodes.
- Overrides:
- deleteAll in class GraphWindow
All Packages Class Hierarchy This Package Previous Next Index