|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AbstractSeriesDataset net.clackrouter.chart.ClackOccData
public class ClackOccData
Represents a collection of (x,y) values that contain instanteneuous and average queue size. This collection should be constantly updated by a box and it is used by a chart to read the (x,y) values and display them. When a new (x,y) value is added to the dataset, it fires an event that informs a chart to update itself.
Field Summary | |
---|---|
static java.awt.Color[] |
colors
|
static int |
MIN_DRAW_INTERVAL
|
Constructor Summary | |
---|---|
ClackOccData()
Constructs queue size dataset. |
Method Summary | |
---|---|
void |
addXYValue(java.lang.String key,
java.lang.Number x,
java.lang.Number y)
Adds the supplied (x,y) tuple to the instantaneous series, calculates the running average and adds (x, average) tuple to the average series. |
DomainOrder |
getDomainOrder()
|
int |
getItemCount(int series)
Returns the number of items in the specified series. |
int |
getSeriesCount()
Returns the number of series in the data source. |
java.lang.String |
getSeriesKey(int series)
Returns the name of the series. |
java.lang.Number |
getX(int series_int,
int item)
Returns the x value for the specified series and item. |
double |
getXValue(int series,
int item)
|
java.lang.Number |
getY(int series_int,
int item)
Returns the y value for the specified series and item. |
double |
getYValue(int series,
int item)
|
void |
remove_all_with_x_lessthan(java.lang.String key,
double x_thresh)
Useful for timing out values older than a certain x value |
void |
removeEverySeries()
|
void |
removeSeries(java.lang.String key)
|
void |
setRenderer(StandardXYItemRenderer r)
|
void |
updateRealtime(boolean updateRealtime)
Specifies if the dataset should notify listeners of changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.awt.Color[] colors
public static int MIN_DRAW_INTERVAL
Constructor Detail |
---|
public ClackOccData()
Method Detail |
---|
public void removeSeries(java.lang.String key)
public void setRenderer(StandardXYItemRenderer r)
public DomainOrder getDomainOrder()
public void addXYValue(java.lang.String key, java.lang.Number x, java.lang.Number y)
x
- Domain value, can be absolute or relative timey
- Number of packets in the queuepublic void remove_all_with_x_lessthan(java.lang.String key, double x_thresh)
key
- x_thresh
- public java.lang.Number getX(int series_int, int item)
series
- The index (zero-based) of the seriesitem
- The index (zero-based) of the required item
public double getXValue(int series, int item)
public java.lang.Number getY(int series_int, int item)
series
- The index (zero-based) of the seriesitem
- The index (zero-based) of the required item
public double getYValue(int series, int item)
public int getSeriesCount()
public java.lang.String getSeriesKey(int series)
series
- The index (zero-based) of the series
public int getItemCount(int series)
series
- The index (zero-based) of the series
public void updateRealtime(boolean updateRealtime)
updateRealtime
- True if changes should be immediately reflected
in the datasetpublic void removeEverySeries()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |