|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.xy.AbstractXYDataset
org.jfree.data.xy.AbstractIntervalXYDataset
org.jfree.data.time.TimeSeriesCollection
A collection of time series objects.
This class implements the XYDataset
interface, as well as the
extended IntervalXYDataset
interface. This makes it a convenient dataset for use with
the XYPlot
class.
Field Summary | |
static int |
END
Useful constant for controlling the x-value returned for a time period. |
static int |
MIDDLE
Useful constant for controlling the x-value returned for a time period. |
static int |
START
Useful constant for controlling the x-value returned for a time period. |
Constructor Summary | |
TimeSeriesCollection()
Constructs an empty dataset, tied to the default timezone. |
|
TimeSeriesCollection(TimeSeries series)
Constructs a dataset containing a single series (more can be added), tied to the default timezone. |
|
TimeSeriesCollection(TimeSeries series,
java.util.TimeZone zone)
Constructs a dataset containing a single series (more can be added), tied to a specific timezone. |
|
TimeSeriesCollection(java.util.TimeZone zone)
Constructs an empty dataset, tied to a specific timezone. |
Method Summary | |
void |
addSeries(TimeSeries series)
Adds a series to the collection and sends a DatasetChangeEvent to
all registered listeners. |
boolean |
equals(java.lang.Object obj)
Tests this time series collection for equality with another object. |
boolean |
getDomainIsPointsInTime()
Returns a flag that controls whether the domain is treated as 'points in time'. |
Range |
getDomainRange()
Returns the range of the values in the series domain. |
java.lang.Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item. |
java.lang.Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item. |
int |
getItemCount(int series)
Returns the number of items in the specified series. |
java.lang.Number |
getMaximumDomainValue()
Returns the maximum value in the dataset (or null if all the values in
the domain are null ). |
java.lang.Number |
getMinimumDomainValue()
Returns the minimum value in the dataset (or null if all the values in
the domain are null ). |
int |
getPosition()
Deprecated. Use getXPosition(). |
java.util.List |
getSeries()
Returns a list of all the series in the collection. |
TimeSeries |
getSeries(int series)
Returns a series. |
TimeSeries |
getSeries(java.lang.String name)
Returns the series with the specified name, or null if there is no such series. |
int |
getSeriesCount()
Returns the number of series in the collection. |
java.lang.String |
getSeriesName(int series)
Returns the name of a series. |
java.lang.Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item. |
java.lang.Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item. |
int[] |
getSurroundingItems(int series,
long milliseconds)
Returns the indices of the two data items surrounding a particular millisecond value. |
java.lang.Number |
getX(int series,
int item)
Returns the x-value for the specified series and item. |
protected long |
getX(RegularTimePeriod period)
Returns the x-value for a time period. |
TimePeriodAnchor |
getXPosition()
Returns the position within each time period that is used for the X value when the collection is used as an XYDataset . |
double |
getXValue(int series,
int item)
Returns the x-value (as a double primitive) for an item within a series. |
java.lang.Number |
getY(int series,
int item)
Returns the y-value for the specified series and item. |
int |
hashCode()
Returns a hash code value for the object. |
void |
removeAllSeries()
Removes all the series from the collection and sends a DatasetChangeEvent
to all registered listeners. |
void |
removeSeries(int index)
Removes a series from the collection. |
void |
removeSeries(TimeSeries series)
Removes the specified series from the collection and sends a DatasetChangeEvent
to all registered listeners. |
void |
setDomainIsPointsInTime(boolean flag)
Sets a flag that controls whether the domain is treated as 'points in time', or time periods. |
void |
setPosition(int position)
Deprecated. Use setXPosition(...). |
void |
setXPosition(TimePeriodAnchor anchor)
Sets the position within each time period that is used for the X values when the collection is used as an XYDataset , then sends a DatasetChangeEvent is sent to
all registered listeners. |
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset |
getEndXValue, getEndYValue, getStartXValue, getStartYValue |
Methods inherited from class org.jfree.data.xy.AbstractXYDataset |
getDomainOrder, getYValue |
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset |
seriesChanged |
Methods inherited from class org.jfree.data.general.AbstractDataset |
addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.data.xy.XYDataset |
getDomainOrder, getYValue |
Methods inherited from interface org.jfree.data.general.Dataset |
addChangeListener, getGroup, removeChangeListener, setGroup |
Methods inherited from interface org.jfree.data.xy.IntervalXYDataset |
getEndXValue, getEndYValue, getStartXValue, getStartYValue |
Field Detail |
public static final int START
public static final int MIDDLE
public static final int END
Constructor Detail |
public TimeSeriesCollection()
public TimeSeriesCollection(java.util.TimeZone zone)
zone
- the timezone (null
permitted, will use
TimeZone.getDefault()
in that case).public TimeSeriesCollection(TimeSeries series)
series
- the series (null
permitted).public TimeSeriesCollection(TimeSeries series, java.util.TimeZone zone)
series
- a series to add to the collection (null
permitted).zone
- the timezone (null
permitted, will use
TimeZone.getDefault()
in that case).Method Detail |
public boolean getDomainIsPointsInTime()
This flag is used when determining the max and min values for the domain. If true, then only the x-values are considered for the max and min values. If false, then the start and end x-values will also be taken into consideration
public void setDomainIsPointsInTime(boolean flag)
flag
- the flag.public TimePeriodAnchor getXPosition()
XYDataset
.
null
).public void setXPosition(TimePeriodAnchor anchor)
XYDataset
, then sends a DatasetChangeEvent
is sent to
all registered listeners.
anchor
- the anchor position (null
not permitted).public java.util.List getSeries()
public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public TimeSeries getSeries(int series)
series
- the index of the series (zero-based).
public TimeSeries getSeries(java.lang.String name)
null
if there is no such series.
name
- the series name (null
permitted).
public java.lang.String getSeriesName(int series)
getSeriesName
in interface SeriesDataset
getSeriesName
in class AbstractSeriesDataset
series
- the index of the series (zero-based).
public void addSeries(TimeSeries series)
DatasetChangeEvent
to
all registered listeners.
series
- the series (null
not permitted).public void removeSeries(TimeSeries series)
DatasetChangeEvent
to all registered listeners.
series
- the series (null
not permitted).public void removeSeries(int index)
index
- the series index (zero-based).public void removeAllSeries()
DatasetChangeEvent
to all registered listeners.
public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series index (zero-based).
public double getXValue(int series, int item)
getXValue
in interface XYDataset
getXValue
in class AbstractXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).
public java.lang.Number getX(int series, int item)
getX
in interface XYDataset
series
- the series (zero-based index).item
- the item (zero-based index).
protected long getX(RegularTimePeriod period)
period
- the time period.
public java.lang.Number getStartX(int series, int item)
getStartX
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).
public java.lang.Number getEndX(int series, int item)
getEndX
in interface IntervalXYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getY(int series, int item)
getY
in interface XYDataset
series
- the series (zero-based index).item
- the item (zero-based index).
null
).public java.lang.Number getStartY(int series, int item)
getStartY
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).
null
).public java.lang.Number getEndY(int series, int item)
getEndY
in interface IntervalXYDataset
series
- te series (zero-based index).item
- the item (zero-based index).
null
).public int[] getSurroundingItems(int series, long milliseconds)
series
- the series index.milliseconds
- the time.
public java.lang.Number getMinimumDomainValue()
null
if all the values in
the domain are null
).
getMinimumDomainValue
in interface DomainInfo
public java.lang.Number getMaximumDomainValue()
null
if all the values in
the domain are null
).
getMaximumDomainValue
in interface DomainInfo
public Range getDomainRange()
getDomainRange
in interface DomainInfo
null
).public boolean equals(java.lang.Object obj)
obj
- the other object.
public int hashCode()
public int getPosition()
public void setPosition(int position)
Use the constants START
, MIDDLE
and END
.
position
- the position.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |