Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
public class XYSeriesCollection
extends AbstractIntervalXYDataset
implements IntervalXYDataset, DomainInfo, Serializable
XYSeries
objects that can be used as a
dataset.
Constructor Summary | |
| |
|
Method Summary | |
void |
|
Object |
|
boolean |
|
Range |
|
double |
|
double |
|
Number |
|
Number |
|
double |
|
double |
|
int |
|
List |
|
XYSeries |
|
int |
|
Comparable |
|
Number |
|
Number |
|
Number |
|
Number |
|
int |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset | |
getEndXValue , getEndYValue , getStartXValue , getStartYValue |
Methods inherited from class org.jfree.data.xy.AbstractXYDataset | |
getDomainOrder , getXValue , getYValue |
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset | |
getSeriesCount , getSeriesKey , indexOf , seriesChanged |
Methods inherited from class org.jfree.data.general.AbstractDataset | |
addChangeListener , clone , fireDatasetChanged , getGroup , hasListener , notifyListeners , removeChangeListener , setGroup , validateObject |
public XYSeriesCollection(XYSeries series)
Constructs a dataset and populates it with a single series.
- Parameters:
series
- the series (null
ignored).
public void addSeries(XYSeries series)
Adds a series to the collection and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
series
- the series (null
not permitted).
public Object clone() throws CloneNotSupportedException
Returns a clone of this instance.
- Overrides:
- clone in interface AbstractDataset
- Returns:
- A clone.
public boolean equals(Object obj)
Tests this collection for equality with an arbitrary object.
- Parameters:
obj
- the object (null
permitted).
- Returns:
- A boolean.
public Range getDomainBounds(boolean includeInterval)
Returns the range of the values in this dataset's domain.
- Specified by:
- getDomainBounds in interface DomainInfo
- Parameters:
includeInterval
- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The range.
public double getDomainLowerBound(boolean includeInterval)
Returns the minimum x-value in the dataset.
- Specified by:
- getDomainLowerBound in interface DomainInfo
- Parameters:
includeInterval
- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The minimum value.
public double getDomainUpperBound(boolean includeInterval)
Returns the maximum x-value in the dataset.
- Specified by:
- getDomainUpperBound in interface DomainInfo
- Parameters:
includeInterval
- a flag that determines whether or not the x-interval is taken into account.
- Returns:
- The maximum value.
public Number getEndX(int series, int item)
Returns the ending X value for the specified series and item.
- Specified by:
- getEndX in interface IntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).
- Returns:
- The ending X value.
public Number getEndY(int series, int item)
Returns the ending Y value for the specified series and item.
- Specified by:
- getEndY in interface IntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).
- Returns:
- The ending Y value.
public double getIntervalPositionFactor()
Returns the interval position factor.
- Returns:
- The interval position factor.
public double getIntervalWidth()
Returns the interval width. This is used to calculate the start and end x-values, if/when the dataset is used as anIntervalXYDataset
.
- Returns:
- The interval width.
public int getItemCount(int series)
Returns the number of items in the specified series.
- Specified by:
- getItemCount in interface XYDataset
- Parameters:
series
- the series (zero-based index).
- Returns:
- The item count.
public List getSeries()
Returns a list of all the series in the collection.
- Returns:
- The list (which is unmodifiable).
public XYSeries getSeries(int series)
Returns a series from the collection.
- Parameters:
series
- the series index (zero-based).
- Returns:
- The series.
public int getSeriesCount()
Returns the number of series in the collection.
- Specified by:
- getSeriesCount in interface SeriesDataset
- Overrides:
- getSeriesCount in interface AbstractSeriesDataset
- Returns:
- The series count.
public Comparable getSeriesKey(int series)
Returns the key for a series.
- Specified by:
- getSeriesKey in interface SeriesDataset
- Overrides:
- getSeriesKey in interface AbstractSeriesDataset
- Parameters:
series
- the series index (in the range0
togetSeriesCount() - 1
).
- Returns:
- The key for a series.
public Number getStartX(int series, int item)
Returns the starting X value for the specified series and item.
- Specified by:
- getStartX in interface IntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).
- Returns:
- The starting X value.
public Number getStartY(int series, int item)
Returns the starting Y value for the specified series and item.
- Specified by:
- getStartY in interface IntervalXYDataset
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).
- Returns:
- The starting Y value.
public Number getX(int series, int item)
Returns the x-value for the specified series and item.
- Parameters:
series
- the series (zero-based index).item
- the item (zero-based index).
- Returns:
- The value.
public Number getY(int series, int index)
Returns the y-value for the specified series and item.
- Parameters:
series
- the series (zero-based index).index
- the index of the item of interest (zero-based).
- Returns:
- The value (possibly
null
).
public boolean isAutoWidth()
Returns whether the interval width is automatically calculated or not.
- Returns:
- Whether the width is automatically calculated or not.
public void removeAllSeries()
Removes all the series from the collection and sends aDatasetChangeEvent
to all registered listeners.
public void removeSeries(int series)
Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
series
- the series index (zero-based).
public void removeSeries(XYSeries series)
Removes a series from the collection and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
series
- the series (null
not permitted).
public void setAutoWidth(boolean b)
Sets the flag that indicates wether the interval width is automatically calculated or not.
- Parameters:
b
- a boolean.
public void setIntervalPositionFactor(double factor)
Sets the interval position factor. This controls where the x-value is in relation to the interval surrounding the x-value (0.0 means the x-value will be positioned at the start, 0.5 in the middle, and 1.0 at the end).
- Parameters:
factor
- the factor.
public void setIntervalWidth(double width)
Sets the interval width and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
width
- the width (negative values not permitted).