|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.data.AbstractDataset | +--org.jfree.data.AbstractSeriesDataset | +--org.jfree.data.time.TimePeriodValuesCollection
A collection of TimePeriodValues
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 | |
TimePeriodValuesCollection()
Constructs an empty dataset, tied to the default timezone. |
|
TimePeriodValuesCollection(TimePeriodValues series)
Constructs a dataset containing a single series (more can be added), tied to the default timezone. |
|
TimePeriodValuesCollection(TimePeriodValues series,
java.util.TimeZone zone)
Constructs a dataset containing a single series (more can be added), tied to a specific timezone. |
|
TimePeriodValuesCollection(java.util.TimeZone zone)
Constructs an empty dataset, tied to a specific timezone. |
Method Summary | |
void |
addSeries(TimePeriodValues series)
Adds a series to the collection. |
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 |
getEndXValue(int series,
int item)
Returns the ending X value for the specified series and item. |
java.lang.Number |
getEndYValue(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()
Returns the position of the x-value returned for a time period (START, MIDDLE, or END). |
TimePeriodValues |
getSeries(int series)
Returns a 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 |
getStartXValue(int series,
int item)
Returns the starting X value for the specified series and item. |
java.lang.Number |
getStartYValue(int series,
int item)
Returns the starting Y value for the specified series and item. |
java.lang.Number |
getXValue(int series,
int item)
Returns the x-value for the specified series and item. |
java.lang.Number |
getYValue(int series,
int item)
Returns the y-value for the specified series and item. |
void |
removeSeries(int index)
Removes a series from the collection. |
void |
removeSeries(TimePeriodValues series)
Removes the specified series from the collection. |
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)
Sets the position - this controls the x-value that is returned for a particular time period. |
Methods inherited from class org.jfree.data.AbstractSeriesDataset |
seriesChanged |
Methods inherited from class org.jfree.data.AbstractDataset |
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.data.Dataset |
addChangeListener, getGroup, removeChangeListener, setGroup |
Field Detail |
public static final int START
public static final int MIDDLE
public static final int END
Constructor Detail |
public TimePeriodValuesCollection()
public TimePeriodValuesCollection(java.util.TimeZone zone)
zone
- the timezone.public TimePeriodValuesCollection(TimePeriodValues series)
series
- the series.public TimePeriodValuesCollection(TimePeriodValues series, java.util.TimeZone zone)
series
- the series.zone
- the timezone.Method Detail |
public int getPosition()
public void setPosition(int position)
Use the constants START, MIDDLE and END.
position
- the position.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 new value of the flag.public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public TimePeriodValues getSeries(int series)
series
- The index of the series (zero-based).
public java.lang.String getSeriesName(int series)
This method is provided for convenience.
getSeriesName
in interface SeriesDataset
getSeriesName
in class AbstractSeriesDataset
series
- The index of the series (zero-based).
public void addSeries(TimePeriodValues series)
Notifies all registered listeners that the dataset has changed.
series
- the time series.public void removeSeries(TimePeriodValues series)
series
- the series to remove.public void removeSeries(int index)
index
- the series index (zero-based).public int getItemCount(int series)
This method is provided for convenience.
getItemCount
in interface XYDataset
series
- The index of the series of interest (zero-based).
public java.lang.Number getXValue(int series, int item)
getXValue
in interface XYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getStartXValue(int series, int item)
getStartXValue
in interface IntervalXYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getEndXValue(int series, int item)
getEndXValue
in interface IntervalXYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getYValue(int series, int item)
getYValue
in interface XYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getStartYValue(int series, int item)
getStartYValue
in interface IntervalXYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getEndYValue(int series, int item)
getEndYValue
in interface IntervalXYDataset
series
- The series (zero-based index).item
- The item (zero-based index).
public java.lang.Number getMinimumDomainValue()
getMinimumDomainValue
in interface DomainInfo
public java.lang.Number getMaximumDomainValue()
getMaximumDomainValue
in interface DomainInfo
public Range getDomainRange()
getDomainRange
in interface DomainInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |