public class XYSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, DomainInfo, RangeInfo, VetoableChangeListener, org.jfree.util.PublicCloneable, Serializable
XYSeries
objects that can be used as a
dataset.Constructor and Description |
---|
XYSeriesCollection()
Constructs an empty dataset.
|
XYSeriesCollection(XYSeries series)
Constructs a dataset and populates it with a single series.
|
Modifier and Type | Method and Description |
---|---|
void |
addSeries(XYSeries series)
Adds a series to the collection and sends a
DatasetChangeEvent
to all registered listeners. |
Object |
clone()
Returns a clone of this instance.
|
boolean |
equals(Object obj)
Tests this collection for equality with an arbitrary object.
|
Range |
getDomainBounds(boolean includeInterval)
Returns the range of the values in this dataset's domain.
|
double |
getDomainLowerBound(boolean includeInterval)
Returns the minimum x-value in the dataset.
|
DomainOrder |
getDomainOrder()
Returns the order of the domain (X) values, if this is known.
|
double |
getDomainUpperBound(boolean includeInterval)
Returns the maximum x-value in the dataset.
|
Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item.
|
Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item.
|
double |
getIntervalPositionFactor()
Returns the interval position factor.
|
double |
getIntervalWidth()
Returns the interval width.
|
int |
getItemCount(int series)
Returns the number of items in the specified series.
|
Range |
getRangeBounds(boolean includeInterval)
Returns the range of the values in this dataset's range.
|
double |
getRangeLowerBound(boolean includeInterval)
Returns the minimum y-value in the dataset.
|
double |
getRangeUpperBound(boolean includeInterval)
Returns the maximum y-value in the dataset.
|
List |
getSeries()
Returns a list of all the series in the collection.
|
XYSeries |
getSeries(Comparable key)
Returns a series from the collection.
|
XYSeries |
getSeries(int series)
Returns a series from the collection.
|
int |
getSeriesCount()
Returns the number of series in the collection.
|
int |
getSeriesIndex(Comparable key)
Returns the index of the series with the specified key, or -1 if no
series has that key.
|
Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item.
|
Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item.
|
Number |
getX(int series,
int item)
Returns the x-value for the specified series and item.
|
Number |
getY(int series,
int index)
Returns the y-value for the specified series and item.
|
int |
hashCode()
Returns a hash code.
|
int |
indexOf(XYSeries series)
Returns the index of the specified series, or -1 if that series is not
present in the dataset.
|
boolean |
isAutoWidth()
Returns whether the interval width is automatically calculated or not.
|
void |
removeAllSeries()
Removes all the series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
void |
removeSeries(int series)
Removes a series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
void |
removeSeries(XYSeries series)
Removes a series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
void |
setAutoWidth(boolean b)
Sets the flag that indicates whether the interval width is automatically
calculated or not.
|
void |
setIntervalPositionFactor(double factor)
Sets the interval position factor.
|
void |
setIntervalWidth(double width)
Sets the interval width and sends a
DatasetChangeEvent to all
registered listeners. |
void |
vetoableChange(PropertyChangeEvent e)
Receives notification that the key for one of the series in the
collection has changed, and vetos it if the key is already present in
the collection.
|
getEndXValue, getEndYValue, getStartXValue, getStartYValue
getXValue, getYValue
indexOf, seriesChanged
addChangeListener, getGroup, getNotify, hasListener, removeChangeListener, setGroup, setNotify, validateObject
getClass, notify, notifyAll, toString, wait, wait, wait
getEndXValue, getEndYValue, getStartXValue, getStartYValue
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public XYSeriesCollection()
public XYSeriesCollection(XYSeries series)
series
- the series (null
ignored).public DomainOrder getDomainOrder()
getDomainOrder
in interface XYDataset
getDomainOrder
in class AbstractXYDataset
public void addSeries(XYSeries series)
DatasetChangeEvent
to all registered listeners.series
- the series (null
not permitted).IllegalArgumentException
- if the key for the series is null or
not unique within the dataset.public void removeSeries(int series)
DatasetChangeEvent
to all registered listeners.series
- the series index (zero-based).public void removeSeries(XYSeries series)
DatasetChangeEvent
to all registered listeners.series
- the series (null
not permitted).public void removeAllSeries()
DatasetChangeEvent
to all registered listeners.public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public List getSeries()
public int indexOf(XYSeries series)
series
- the series (null
not permitted).public XYSeries getSeries(int series)
series
- the series index (zero-based).IllegalArgumentException
- if series
is not in the
range 0
to getSeriesCount() - 1
.public XYSeries getSeries(Comparable key)
key
- the key (null
not permitted).UnknownKeyException
- if key
is not found in the
collection.public Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).IllegalArgumentException
- if series
is not in the
specified range.public int getSeriesIndex(Comparable key)
key
- the key (null
not permitted).public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series (zero-based index).IllegalArgumentException
- if series
is not in the
range 0
to getSeriesCount() - 1
.public Number getX(int series, int item)
public Number getStartX(int series, int item)
getStartX
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getEndX(int series, int item)
getEndX
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getY(int series, int index)
public Number getStartY(int series, int item)
getStartY
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getEndY(int series, int item)
getEndY
in interface IntervalXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractDataset
CloneNotSupportedException
- if there is a problem.public int hashCode()
public double getDomainLowerBound(boolean includeInterval)
getDomainLowerBound
in interface DomainInfo
includeInterval
- a flag that determines whether or not the
x-interval is taken into account.public double getDomainUpperBound(boolean includeInterval)
getDomainUpperBound
in interface DomainInfo
includeInterval
- a flag that determines whether or not the
x-interval is taken into account.public Range getDomainBounds(boolean includeInterval)
getDomainBounds
in interface DomainInfo
includeInterval
- a flag that determines whether or not the
x-interval is taken into account.null
if the dataset contains no
values).public double getIntervalWidth()
IntervalXYDataset
.public void setIntervalWidth(double width)
DatasetChangeEvent
to all
registered listeners.width
- the width (negative values not permitted).public double getIntervalPositionFactor()
public void setIntervalPositionFactor(double factor)
factor
- the factor.public boolean isAutoWidth()
public void setAutoWidth(boolean b)
b
- a boolean.public Range getRangeBounds(boolean includeInterval)
getRangeBounds
in interface RangeInfo
includeInterval
- ignored.null
if the dataset contains no
values).public double getRangeLowerBound(boolean includeInterval)
getRangeLowerBound
in interface RangeInfo
includeInterval
- a flag that determines whether or not the
y-interval is taken into account.public double getRangeUpperBound(boolean includeInterval)
getRangeUpperBound
in interface RangeInfo
includeInterval
- a flag that determines whether or not the
y-interval is taken into account.public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException
vetoableChange
in interface VetoableChangeListener
e
- the event.PropertyVetoException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics