Public Member Functions | |
void | draw (TopicManager tm, TextPaint mPaint, Canvas canvas, int width, int height) |
Graph (String field) | |
Private Attributes | |
long | counter |
String | field |
double | max |
double | min |
List< Double > | pastValues |
double | recentMax |
double | recentMin |
Static Private Attributes | |
static final int | MAX_POINTS = 100 |
static final int | MILLISECONDS_REDRAW_GRAPH = 5000 |
Class to draw line graph of recent values of a topic's selected field on the display. The bounds of the graph are dynamically updated to fit the recently recieved data. THis means that when a new value is recieved that is larger than the bounds the graphical range will be expanded. After a while the graph shrinks the range to fit the mose recent data recieved.
Definition at line 37 of file Graph.java.
edu.nimbus.glass.screens.Graph.Graph | ( | String | field | ) | [inline] |
Definition at line 51 of file Graph.java.
void edu.nimbus.glass.screens.Graph.draw | ( | TopicManager | tm, |
TextPaint | mPaint, | ||
Canvas | canvas, | ||
int | width, | ||
int | height | ||
) | [inline, virtual] |
Implements edu.nimbus.glass.screens.Screen.
Definition at line 63 of file Graph.java.
long edu.nimbus.glass.screens.Graph.counter [private] |
Definition at line 49 of file Graph.java.
String edu.nimbus.glass.screens.Graph.field [private] |
Definition at line 42 of file Graph.java.
double edu.nimbus.glass.screens.Graph.max [private] |
Definition at line 48 of file Graph.java.
final int edu.nimbus.glass.screens.Graph.MAX_POINTS = 100 [static, private] |
Definition at line 39 of file Graph.java.
final int edu.nimbus.glass.screens.Graph.MILLISECONDS_REDRAW_GRAPH = 5000 [static, private] |
Definition at line 40 of file Graph.java.
double edu.nimbus.glass.screens.Graph.min [private] |
Definition at line 47 of file Graph.java.
List<Double> edu.nimbus.glass.screens.Graph.pastValues [private] |
Definition at line 43 of file Graph.java.
double edu.nimbus.glass.screens.Graph.recentMax [private] |
Definition at line 45 of file Graph.java.
double edu.nimbus.glass.screens.Graph.recentMin [private] |
Definition at line 46 of file Graph.java.