public class

XYBarDataset

extends AbstractIntervalXYDataset
implements DatasetChangeListener IntervalXYDataset
java.lang.Object
   ↳ org.jfree.data.general.AbstractDataset
     ↳ org.jfree.data.general.AbstractSeriesDataset
       ↳ org.jfree.data.xy.AbstractXYDataset
         ↳ org.jfree.data.xy.AbstractIntervalXYDataset
           ↳ org.jfree.data.xy.XYBarDataset

Class Overview

A dataset wrapper class that converts a standard XYDataset into an IntervalXYDataset suitable for use in creating XY bar charts.

Summary

Public Constructors
XYBarDataset(XYDataset underlying, double barWidth)
Creates a new dataset.
Public Methods
Object clone()
Returns an independent copy of the dataset.
void datasetChanged(DatasetChangeEvent event)
Receives notification of an dataset change event.
boolean equals(Object obj)
Tests this dataset for equality with an arbitrary object.
double getBarWidth()
Returns the bar width.
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.
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.
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.
double getStartXValue(int series, int item)
Returns the starting x-value (as a double primitive) for an item within a series.
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.
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.
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.
[Expand]
Inherited Methods
From class org.jfree.data.xy.AbstractIntervalXYDataset
From class org.jfree.data.xy.AbstractXYDataset
From class org.jfree.data.general.AbstractSeriesDataset
From class org.jfree.data.general.AbstractDataset
From class java.lang.Object
From interface java.io.ObjectInputValidation
From interface org.jfree.data.general.Dataset
From interface org.jfree.data.general.DatasetChangeListener
From interface org.jfree.data.general.SeriesChangeListener
From interface org.jfree.data.general.SeriesDataset
From interface org.jfree.data.xy.IntervalXYDataset
From interface org.jfree.data.xy.XYDataset

Public Constructors

public XYBarDataset (XYDataset underlying, double barWidth)

Creates a new dataset.

Parameters
underlying the underlying dataset (null not permitted).
barWidth the width of the bars.

Public Methods

public Object clone ()

Returns an independent copy of the dataset. Note that:

  • the underlying dataset is only cloned if it implements the PublicCloneable interface;
  • the listeners registered with this dataset are not carried over to the cloned dataset.

Returns
  • An independent copy of the dataset.
Throws
CloneNotSupportedException if the dataset cannot be cloned for any reason.

public void datasetChanged (DatasetChangeEvent event)

Receives notification of an dataset change event.

Parameters
event information about the event.

public boolean equals (Object obj)

Tests this dataset for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public double getBarWidth ()

Returns the bar width.

Returns
  • The bar width.

public Number getEndX (int series, int item)

Returns the ending X value for the specified series and item.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public double getEndXValue (int series, int item)

Returns the ending x-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public Number getEndY (int series, int item)

Returns the ending Y value for the specified series and item.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public double getEndYValue (int series, int item)

Returns the ending y-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public int getItemCount (int series)

Returns the number of items in a series.

Parameters
series the series index (zero-based).
Returns
  • The item count.

public int getSeriesCount ()

Returns the number of series in the dataset.

Returns
  • The series count.

public Comparable getSeriesKey (int series)

Returns the key for a series.

Parameters
series the series index (in the range 0 to getSeriesCount() - 1).
Returns
  • The series key.

public Number getStartX (int series, int item)

Returns the starting X value for the specified series and item.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public double getStartXValue (int series, int item)

Returns the starting x-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public Number getStartY (int series, int item)

Returns the starting Y value for the specified series and item.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public double getStartYValue (int series, int item)

Returns the starting y-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.

public XYDataset getUnderlyingDataset ()

Returns the underlying dataset that was specified via the constructor.

Returns
  • The underlying dataset (never null).

public Number getX (int series, int item)

Returns the x-value for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The x-value.

public double getXValue (int series, int item)

Returns the x-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.
See Also

public Number getY (int series, int item)

Returns the y-value for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The y-value (possibly null).

public double getYValue (int series, int item)

Returns the y-value (as a double primitive) for an item within a series.

Parameters
series the series index (zero-based).
item the item index (zero-based).
Returns
  • The value.
See Also

public void setBarWidth (double barWidth)

Sets the bar width and sends a DatasetChangeEvent to all registered listeners.

Parameters
barWidth the bar width.
See Also