|
||||||||||
| 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
javax.swing.JPanel
frog.gui.Plot2D
public class Plot2D
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static Plot2D |
instance
Reference to singleton object for easy access |
| 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 | |
|---|---|
Plot2D()
Creates a new blank graph with a number of series. |
|
| Method Summary | |
|---|---|
void |
addAccel(Accel3D a3d)
Adds a new Accel3D to the graph. |
void |
addDataPoint(double value,
int s)
Adds a data point to a given series on the plot. |
void |
clearData()
Clears all currently plotted data leaving the plot clean. |
void |
destroyPlot()
Removes the static reference to Plot2D. |
void |
finishPlot()
Indicates an end of that gesture and prepares the plot for resetting. |
void |
nameSeries(String name,
int s)
Assigns a name to a series on the graph. |
void |
paint(Graphics g)
|
void |
setPlot(Vector<Accel3D> instance)
Sets the plot to a series of values. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static volatile Plot2D instance
| Constructor Detail |
|---|
public Plot2D()
| Method Detail |
|---|
public void addAccel(Accel3D a3d)
Accel3D to the graph.
a3d - The acceleration sample to be plotted.public void clearData()
public void nameSeries(String name,
int s)
name - The name of the series.s - The number of the series.
public void addDataPoint(double value,
int s)
value - Value to be addeds - Series to which the new value is to be added.public void paint(Graphics g)
paint in class JComponentpublic void finishPlot()
public void destroyPlot()
public void setPlot(Vector<Accel3D> instance)
instance - The gesture to plot on this graph.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||