|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
radtools.graphing.Graph
@Revision(value="$Revision: 1.1 $",
date="$Date: 2006/12/14 16:14:55 $",
tag="$Name: $")
class GraphGraph describes the graph of the points, as well as the specifics of the graph itself: all of the values of the graph are set in this class, including the titles of strings, the ranges of the axes, and the points that are plotted.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize TODO: equals, hashCode, toString
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) double[] |
csv_x
Arrays of data values to be graphed. |
(package private) double[] |
csv_y
Arrays of data values to be graphed. |
(package private) double[] |
csv_z
Arrays of data values to be graphed. |
(package private) double |
f
dynamic rescaling factor for zoom in and out |
(package private) GraphicsWrapper |
graphicsWrapper
Graphics component that holds the graph itself, without the buttons |
(package private) int |
h
Width and height in Canvas coordinates for the graph |
(package private) String[] |
message
Array of strings to be printed on the frame |
(package private) double |
mouseKx
Translated coordinates of mouse position |
(package private) double |
mouseKy
Translated coordinates of mouse position |
(package private) double |
mouseOx
Mouse position relative to origin |
(package private) double |
mouseOy
Mouse position relative to origin |
(package private) int |
mouseX
Cartesian coordinates of mouse position |
(package private) int |
mouseY
Cartesian coordinates of mouse position |
(package private) int |
nDimensions
Number of dimensions to be graphed, determines the kind of graph to be drawn |
(package private) int |
nMessages
Number of strings to be printed on the frame |
(package private) rcf.core.util.collection.Collection<Point> |
points
The points to be graphed |
private static long |
serialVersionUID
TODO: Javadoc |
(package private) String |
title
Title of the graph |
(package private) int |
w
Width and height in Canvas coordinates for the graph |
(package private) double |
x1
Initial boundaries of the graph itself |
(package private) double |
x2
Initial boundaries of the graph itself |
(package private) String |
xLabel
Label of x axis |
(package private) double |
y1
Initial boundaries of the graph itself |
(package private) double |
y2
Initial boundaries of the graph itself |
(package private) String |
yLabel
Label of y axis |
(package private) double |
zoom_factor
Constant rescaling factor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Graph(rcf.core.util.collection.Collection<Point> _points,
int _nDimensions,
String _title,
String _xLabel,
String _yLabel)
Sets the naming accessories of the graph, including title and axes, as well as initiating the function itself |
|
| Method Summary | |
|---|---|
protected void |
paintComponent(Graphics graphics)
Inherited paint method that draws the graph, the axes, and the strings |
void |
proccessMouseClick(MouseEvent e)
TODO: Javadoc |
void |
processButtonClick(String command)
Processes the actions of a mouse click on the various buttons or within the graph |
void |
setBoundaries(double x_left,
double x_right,
double y_down,
double y_up)
Set cartesian coordinates boundaries |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
GraphicsWrapper graphicsWrapper
double x1
double x2
double y1
double y2
double f
double zoom_factor
double[] csv_x
double[] csv_y
double[] csv_z
int nMessages
String[] message
int w
int h
int mouseX
int mouseY
double mouseKx
double mouseKy
double mouseOx
double mouseOy
String title
String xLabel
String yLabel
int nDimensions
rcf.core.util.collection.Collection<Point> points
| Constructor Detail |
|---|
Graph(rcf.core.util.collection.Collection<Point> _points,
int _nDimensions,
String _title,
String _xLabel,
String _yLabel)
_points - Values to be graphed_nDimensions - Determinds the type of graph to be displayed_title - Title of the graph_xLabel - Label of the x axis_yLabel - Label of the y axis| Method Detail |
|---|
protected void paintComponent(Graphics graphics)
paintComponent in class JComponentgraphics - the grpahics context that will define the graph's colors, values, and stylepublic void proccessMouseClick(MouseEvent e)
e - public void processButtonClick(String command)
command - The string of the button that was clicked on
public void setBoundaries(double x_left,
double x_right,
double y_down,
double y_up)
x_left - start range of x coordinatesx_right - end range of x coordinatesy_down - start range of y coordinatesy_up - end range of y coordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||