| java.lang.Object | |||||
| ↳ | org.jfree.data.general.AbstractDataset | ||||
| ↳ | org.jfree.data.general.AbstractSeriesDataset | ||||
| ↳ | org.jfree.data.xy.AbstractXYDataset | ||||
| ↳ | org.jfree.data.xy.AbstractIntervalXYDataset | ||||
| ↳ | org.jfree.data.time.DynamicTimeSeriesCollection | ||||
A dynamic dataset.
Like FastTimeSeriesCollection, this class is a functional replacement for JFreeChart's TimeSeriesCollection _and_ TimeSeries classes. FastTimeSeriesCollection is appropriate for a fixed time range; for real-time applications this subclass adds the ability to append new data and discard the oldest. In this class, the arrays used in FastTimeSeriesCollection become FIFO's. NOTE:As presented here, all data is assumed >= 0, an assumption which is embodied only in methods associated with interface RangeInfo.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DynamicTimeSeriesCollection.ValueSequence | A wrapper for a fixed array of float values. | ||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | END | Useful constant for controlling the x-value returned for a time period. | |||||||||
| int | MIDDLE | Useful constant for controlling the x-value returned for a time period. | |||||||||
| int | START | Useful constant for controlling the x-value returned for a time period. | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| historyCount | The history count. | ||||||||||
| pointsInTime | Storage for the x-values. | ||||||||||
| valueHistory | An array for storing the objects that represent each series. | ||||||||||
| workingCalendar | A working calendar (to recycle) | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a dataset with capacity for N series, tied to default
timezone.
| |||||||||||
Constructs an empty dataset, tied to a specific timezone.
| |||||||||||
Creates a new dataset.
| |||||||||||
Creates a new dataset.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a series to the dataset.
| |||||||||||
Adds a value to a series.
| |||||||||||
Adjust the array offset as needed when a new time-period is added:
Increments the indices "oldestAt" and "newestAt", mod(array length),
zeroes the series values at newestAt, returns the new TimePeriod.
| |||||||||||
Appends data at specified index, for loading up with data from file(s).
| |||||||||||
Appends new data.
| |||||||||||
Returns the range of the values in this dataset's domain.
| |||||||||||
Returns the minimum x-value in the dataset.
| |||||||||||
Returns the maximum x-value in the dataset.
| |||||||||||
Returns the end x-value.
| |||||||||||
Returns the end y-value.
| |||||||||||
Returns the number of items in a series.
| |||||||||||
Returns the index of the newest data item.
| |||||||||||
Returns the newest time.
| |||||||||||
Returns the index of the oldest data item.
| |||||||||||
Returns the oldest time.
| |||||||||||
Returns the x position type (START, MIDDLE or END).
| |||||||||||
Returns the value range.
| |||||||||||
Returns the minimum range value.
| |||||||||||
Returns the maximum range value.
| |||||||||||
Returns the number of series in the collection.
| |||||||||||
Returns the key for a series.
| |||||||||||
Returns the start x-value.
| |||||||||||
Returns the start y-value.
| |||||||||||
Returns the x-value.
| |||||||||||
Returns the y-value.
| |||||||||||
Returns the y-value.
| |||||||||||
Invalidates the range info.
| |||||||||||
Returns the actual index to a time offset by "delta" from newestAt.
| |||||||||||
??
| |||||||||||
Sets the x position type (START, MIDDLE or END).
| |||||||||||
Sets the name of a series.
| |||||||||||
Fill the pointsInTime with times using TimePeriod.next():
Will silently return if the time array was already populated.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Finds the domain limits.
| |||||||||||
Returns the maximum value.
| |||||||||||
Sends a
SeriesChangeEvent to all registered listeners. | |||||||||||
Re-map an index, for use in retrieving data.
| |||||||||||
??
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.jfree.data.xy.AbstractIntervalXYDataset
| |||||||||||
From class
org.jfree.data.xy.AbstractXYDataset
| |||||||||||
From class
org.jfree.data.general.AbstractSeriesDataset
| |||||||||||
From class
org.jfree.data.general.AbstractDataset
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.ObjectInputValidation
| |||||||||||
From interface
org.jfree.data.DomainInfo
| |||||||||||
From interface
org.jfree.data.RangeInfo
| |||||||||||
From interface
org.jfree.data.general.Dataset
| |||||||||||
From interface
org.jfree.data.general.SeriesChangeListener
| |||||||||||
From interface
org.jfree.data.general.SeriesDataset
| |||||||||||
From interface
org.jfree.data.xy.IntervalXYDataset
| |||||||||||
From interface
org.jfree.data.xy.XYDataset
| |||||||||||
Useful constant for controlling the x-value returned for a time period.
Useful constant for controlling the x-value returned for a time period.
Useful constant for controlling the x-value returned for a time period.
The history count.
Constructs a dataset with capacity for N series, tied to default timezone.
| nSeries | the number of series to be accommodated. |
|---|---|
| nMoments | the number of TimePeriods to be spanned. |
Constructs an empty dataset, tied to a specific timezone.
| nSeries | the number of series to be accommodated |
|---|---|
| nMoments | the number of TimePeriods to be spanned |
| zone | the timezone. |
Creates a new dataset.
| nSeries | the number of series. |
|---|---|
| nMoments | the number of items per series. |
| timeSample | a time period sample. |
Creates a new dataset.
| nSeries | the number of series. |
|---|---|
| nMoments | the number of items per series. |
| timeSample | a time period sample. |
| zone | the time zone. |
Adds a series to the dataset. Only the y-values are supplied, the x-values are specified elsewhere.
| values | the y-values. |
|---|---|
| seriesNumber | the series index (zero-based). |
| seriesKey | the series key. Use this as-is during setup only, or add the synchronized keyword around the copy loop. |
Adds a value to a series.
| seriesNumber | the series index. |
|---|---|
| index | ??. |
| value | the value. |
Adjust the array offset as needed when a new time-period is added: Increments the indices "oldestAt" and "newestAt", mod(array length), zeroes the series values at newestAt, returns the new TimePeriod.
Appends data at specified index, for loading up with data from file(s).
| newData | the data |
|---|---|
| insertionIndex | the index value at which to put it |
| refresh | value of n in "refresh the display on every nth call" (ignored if <= 0 ) |
Appends new data.
| newData | the data. |
|---|
Returns the range of the values in this dataset's domain.
| includeInterval | a flag that determines whether or not the x-interval is taken into account. |
|---|
Returns the minimum x-value in the dataset.
| includeInterval | a flag that determines whether or not the x-interval is taken into account. |
|---|
Returns the maximum x-value in the dataset.
| includeInterval | a flag that determines whether or not the x-interval is taken into account. |
|---|
Returns the end x-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the end y-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the number of items in a series.
For this implementation, all series have the same number of items.
| series | the series index (zero-based). |
|---|
Returns the index of the newest data item.
Returns the index of the oldest data item.
Returns the x position type (START, MIDDLE or END).
Returns the value range.
| includeInterval | a flag that determines whether or not the y-interval is taken into account. |
|---|
Returns the minimum range value.
| includeInterval | a flag that determines whether or not the y-interval is taken into account. |
|---|
Returns the maximum range value.
| includeInterval | a flag that determines whether or not the y-interval is taken into account. |
|---|
Returns the number of series in the collection.
Returns the key for a series.
| series | the series index (zero-based). |
|---|
Returns the start x-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the start y-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the x-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the y-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Returns the y-value.
| series | the series index (zero-based). |
|---|---|
| item | the item index (zero-based). |
Invalidates the range info.
Returns the actual index to a time offset by "delta" from newestAt.
| delta | the delta. |
|---|
??
| delta | ?? |
|---|
Sets the x position type (START, MIDDLE or END).
| position | The x position type. |
|---|
Sets the name of a series. If planning to add values individually.
| seriesNumber | the series. |
|---|---|
| key | the new key. |
Fill the pointsInTime with times using TimePeriod.next(): Will silently return if the time array was already populated. Also computes the data cached for later use by methods implementing the DomainInfo interface:
| start | the start. |
|---|
Finds the domain limits. Note: this doesn't need to be synchronized because it's called from within another method that already is.
Returns the maximum value.
Re-map an index, for use in retrieving data.
| toFetch | the index. |
|---|
??
| protoIndex | the index. |
|---|