|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.util.chart.Series
public class Series
The Series class. A Series is a data series in a chart; its view is a Category object. The data are cached and then transferred to an OpenGL device.
Field Summary | |
---|---|
protected java.nio.FloatBuffer |
cache
A buffer to cache new data points before they are transfered to the OpenGL device - if buffer extension available. |
protected int |
capacity
The max number of data points in the series. |
protected static int |
DEFAULT_CAPACITY
Default capacity of series |
protected int |
dimension
The dimension of the elements (=vertices) |
protected int |
elementsCount
number of flushed elements (= dimension * verticesCount) |
protected int |
elementSize
number of bytes per element |
protected javax.media.opengl.GL |
gl
The interface to opengl |
protected java.nio.FloatBuffer |
vertices
Local buffer that holds charted points in case buffer extension not available. |
Constructor Summary | |
---|---|
Series(int dimensions)
Create a new Series object with default capacity. |
|
Series(int dimensions,
int capacity)
Create a new Series object with capacity . |
Method Summary | |
---|---|
void |
add(float x,
float y)
Add a data item to the series cache. |
void |
add(float x,
float y,
float z)
Add a data item to the series cache. |
void |
clear()
Clears points. |
void |
draw(javax.media.opengl.GL gl,
int method)
Flushes data to opengl graphics device and draws the vertices. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_CAPACITY
protected int dimension
protected int capacity
protected final int elementSize
protected int elementsCount
protected java.nio.FloatBuffer cache
protected java.nio.FloatBuffer vertices
protected javax.media.opengl.GL gl
Constructor Detail |
---|
public Series(int dimensions, int capacity)
capacity
.
dimensions
- the number of dimensions (2 or 3)capacity
- max number of pointspublic Series(int dimensions)
dimensions
- the number of dimensions (2 or 3)Method Detail |
---|
public void add(float x, float y)
x
- the x valuey
- the y valuepublic void add(float x, float y, float z)
public void clear()
public void draw(javax.media.opengl.GL gl, int method)
gl
- the OpenGL context (must be identical betweeen calls)method
- the method of drawing the series line segments, e.g. GL.GL_LINE_STRIP
.
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |