FROG

FROG Recognizer of Gestures

Plot2D Class Reference

Draws a simple line graph of one or more series of data. More...

Inherits javax::swing::JPanel.

Collaboration diagram for Plot2D:

List of all members.

Public Member Functions

 Plot2D ()
 Creates a new blank graph with a number of series.
void addAccel (Accel3D a3d)
 Adds a new Accel3D to the graph.
void clearData ()
 Clears all currently plotted data leaving the plot clean.
void nameSeries (String name, int s)
 Assigns a name to a series on the graph.
void addDataPoint (double value, int s)
 Adds a data point to a given series on the plot.
void paint (Graphics g)
 Paints the plot in the canvas.
void finishPlot ()
 Creates a window with a JGraph in it to test the graph works correctly.
void destroyPlot ()
 Removes the static reference to Plot2D.
void setPlot (Vector< Accel3D > instance)
 Sets the plot to a series of values.

Static Public Attributes

static volatile Plot2D instance = null
 Reference to singleton object for easy access.

Detailed Description

Draws a simple line graph of one or more series of data.

The graph auto-scales the Y axis maximum, and can also be set to auto-scale the minimum axis.


Constructor & Destructor Documentation

Plot2D (  ) 

Creates a new blank graph with a number of series.

Here is the call graph for this function:


Member Function Documentation

void addAccel ( Accel3D  a3d  ) 

Adds a new Accel3D to the graph.

Parameters:
a3d The acceleration sample to be plotted.

Here is the call graph for this function:

Here is the caller graph for this function:

void addDataPoint ( double  value,
int  s 
)

Adds a data point to a given series on the plot.

Parameters:
value Value to be added
s Series to which the new value is to be added.

Here is the caller graph for this function:

void clearData (  ) 

Clears all currently plotted data leaving the plot clean.

Here is the caller graph for this function:

void destroyPlot (  ) 

Removes the static reference to Plot2D.

Here is the caller graph for this function:

void finishPlot (  ) 

Creates a window with a JGraph in it to test the graph works correctly.

Indicates an end of that gesture and prepares the plot for resetting.

Here is the caller graph for this function:

void nameSeries ( String  name,
int  s 
)

Assigns a name to a series on the graph.

Parameters:
name The name of the series.
s The number of the series.

Here is the caller graph for this function:

void paint ( Graphics  g  ) 

Paints the plot in the canvas.

It can be used to re-paint.

void setPlot ( Vector< Accel3D instance  ) 

Sets the plot to a series of values.

Also animates the plotting of this data.

Parameters:
instance The gesture to plot on this graph.

Here is the call graph for this function:


Member Data Documentation

volatile Plot2D instance = null [static]

Reference to singleton object for easy access.


The documentation for this class was generated from the following file:
  • /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/gui/Plot2D.java
 All Classes Namespaces Files Functions Variables