public class XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener, org.jfree.util.PublicCloneable
XYDataset
into an
IntervalXYDataset
suitable for use in creating XY bar charts.Constructor and Description |
---|
XYBarDataset(XYDataset underlying,
double barWidth)
Creates a new dataset.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns an independent copy of the dataset.
|
void |
datasetChanged(DatasetChangeEvent event)
Receives notification of an dataset change event.
|
boolean |
equals(java.lang.Object obj)
Tests this dataset for equality with an arbitrary object.
|
double |
getBarWidth()
Returns the bar width.
|
java.lang.Number |
getEndX(int series,
int item)
Returns the ending X value for the specified series and item.
|
double |
getEndXValue(int series,
int item)
Returns the ending x-value (as a double primitive) for an item within
a series.
|
java.lang.Number |
getEndY(int series,
int item)
Returns the ending Y value for the specified series and item.
|
double |
getEndYValue(int series,
int item)
Returns the ending y-value (as a double primitive) for an item within
a series.
|
int |
getItemCount(int series)
Returns the number of items in a series.
|
int |
getSeriesCount()
Returns the number of series in the dataset.
|
java.lang.Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
java.lang.Number |
getStartX(int series,
int item)
Returns the starting X value for the specified series and item.
|
double |
getStartXValue(int series,
int item)
Returns the starting x-value (as a double primitive) for an item within
a series.
|
java.lang.Number |
getStartY(int series,
int item)
Returns the starting Y value for the specified series and item.
|
double |
getStartYValue(int series,
int item)
Returns the starting y-value (as a double primitive) for an item within
a series.
|
XYDataset |
getUnderlyingDataset()
Returns the underlying dataset that was specified via the constructor.
|
java.lang.Number |
getX(int series,
int item)
Returns the x-value for an item within a series.
|
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 an item within a series.
|
double |
getYValue(int series,
int item)
Returns the y-value (as a double primitive) for an item within a series.
|
void |
setBarWidth(double barWidth)
Sets the bar width and sends a
DatasetChangeEvent to all
registered listeners. |
getDomainOrder
indexOf, seriesChanged
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainOrder
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public XYBarDataset(XYDataset underlying, double barWidth)
underlying
- the underlying dataset (null
not
permitted).barWidth
- the width of the bars.public XYDataset getUnderlyingDataset()
null
).public double getBarWidth()
setBarWidth(double)
public void setBarWidth(double barWidth)
DatasetChangeEvent
to all
registered listeners.barWidth
- the bar width.getBarWidth()
public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public java.lang.Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series index (zero-based).public java.lang.Number getX(int series, int item)
getX
in interface XYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getXValue(int, int)
public double getXValue(int series, int item)
getXValue
in interface XYDataset
getXValue
in class AbstractXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getX(int, int)
public java.lang.Number getY(int series, int item)
getY
in interface XYDataset
series
- the series index (zero-based).item
- the item index (zero-based).null
).getYValue(int, int)
public double getYValue(int series, int item)
getYValue
in interface XYDataset
getYValue
in class AbstractXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getY(int, int)
public java.lang.Number getStartX(int series, int item)
getStartX
in interface IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getStartXValue(int series, int item)
getStartXValue
in interface IntervalXYDataset
getStartXValue
in class AbstractIntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getXValue(int, int)
public java.lang.Number getEndX(int series, int item)
getEndX
in interface IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getEndXValue(int series, int item)
getEndXValue
in interface IntervalXYDataset
getEndXValue
in class AbstractIntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getXValue(int, int)
public java.lang.Number getStartY(int series, int item)
getStartY
in interface IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getStartYValue(int series, int item)
getStartYValue
in interface IntervalXYDataset
getStartYValue
in class AbstractIntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getYValue(int, int)
public java.lang.Number getEndY(int series, int item)
getEndY
in interface IntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).public double getEndYValue(int series, int item)
getEndYValue
in interface IntervalXYDataset
getEndYValue
in class AbstractIntervalXYDataset
series
- the series index (zero-based).item
- the item index (zero-based).getYValue(int, int)
public void datasetChanged(DatasetChangeEvent event)
datasetChanged
in interface DatasetChangeListener
event
- information about the event.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null
permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
PublicCloneable
interface;clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractDataset
java.lang.CloneNotSupportedException
- if the dataset cannot be cloned for
any reason.