Package org.jfree.data
Class XYBarDataset
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,Dataset,DatasetChangeListener,IntervalXYDataset,SeriesChangeListener,SeriesDataset,XYDataset
public class XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener
A dataset wrapper class that converts a standard
XYDataset into an
IntervalXYDataset suitable for use in creating XY bar charts.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description XYBarDataset(XYDataset underlying, double barWidth)Creates a new dataset. -
Method Summary
Modifier and Type Method Description voiddatasetChanged(DatasetChangeEvent event)Receives notification of an dataset change event.NumbergetEndXValue(int series, int item)Returns the ending X value for the specified series and item.NumbergetEndYValue(int series, int item)Returns the ending Y value for the specified series and item.intgetItemCount(int series)Returns the number of items in a series.intgetSeriesCount()Returns the number of series in the dataset.StringgetSeriesName(int series)Returns the name of a series.NumbergetStartXValue(int series, int item)Returns the starting X value for the specified series and item.NumbergetStartYValue(int series, int item)Returns the starting Y value for the specified series and item.NumbergetXValue(int series, int item)Returns the x-value for an item within a series.NumbergetYValue(int series, int item)Returns the y-value for an item within a series.Methods inherited from class org.jfree.data.AbstractIntervalXYDataset
getEndX, getEndY, getStartX, getStartYMethods inherited from class org.jfree.data.AbstractXYDataset
getX, getYMethods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChangedMethods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObjectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroupMethods inherited from interface org.jfree.data.IntervalXYDataset
getEndX, getEndY, getStartX, getStartY
-
Constructor Details
-
XYBarDataset
Creates a new dataset.- Parameters:
underlying- the underlying dataset.barWidth- the width of the bars.
-
-
Method Details
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the dataset.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- The series count.
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesNamein interfaceSeriesDataset- Specified by:
getSeriesNamein classAbstractSeriesDataset- Parameters:
series- the series (zero-based index).- Returns:
- The series name.
-
getItemCount
public int getItemCount(int series)Returns the number of items in a series.- Specified by:
getItemCountin interfaceXYDataset- Parameters:
series- the series (zero-based index).- Returns:
- The item count.
-
getXValue
Returns the x-value for an item within a series. The x-values may or may not be returned in ascending order, that is up to the class implementing the interface. -
getYValue
Returns the y-value for an item within a series. -
getStartXValue
Returns the starting X value for the specified series and item.- Specified by:
getStartXValuein interfaceIntervalXYDataset- Parameters:
series- the series (zero-based index).item- the item within a series (zero-based index).- Returns:
- The starting X value for the specified series and item.
-
getEndXValue
Returns the ending X value for the specified series and item.- Specified by:
getEndXValuein interfaceIntervalXYDataset- Parameters:
series- the series (zero-based index).item- the item within a series (zero-based index).- Returns:
- The ending X value for the specified series and item.
-
getStartYValue
Returns the starting Y value for the specified series and item.- Specified by:
getStartYValuein interfaceIntervalXYDataset- Parameters:
series- the series (zero-based index).item- the item within a series (zero-based index).- Returns:
- The starting Y value for the specified series and item.
-
getEndYValue
Returns the ending Y value for the specified series and item.- Specified by:
getEndYValuein interfaceIntervalXYDataset- Parameters:
series- the series (zero-based index).item- the item within a series (zero-based index).- Returns:
- The ending Y value for the specified series and item.
-
datasetChanged
Receives notification of an dataset change event.- Specified by:
datasetChangedin interfaceDatasetChangeListener- Parameters:
event- information about the event.
-