Package org.jfree.data.xy
Class XIntervalSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.ComparableObjectSeries
org.jfree.data.xy.XIntervalSeries
- All Implemented Interfaces:
Serializable,Cloneable
A list of (x, x-low, x-high, y) data items.
- See Also:
-
Field Summary
Fields inherited from class org.jfree.data.ComparableObjectSeries
data -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty series.XIntervalSeries(Comparable key, boolean autoSort, boolean allowDuplicateXValues) Constructs a new xy-series that contains no data. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x, double xLow, double xHigh, double y) Adds a data item to the series and sends aSeriesChangeEventto all registered listeners.voidadd(XIntervalDataItem item, boolean notify) Adds a data item to the series and, if requested, sends aSeriesChangeEventto all registered listeners.getDataItem(int index) Returns the data item at the specified index.getX(int index) Returns the x-value for the specified item.doublegetXHighValue(int index) Returns the upper bound of the x-interval for the specified item.doublegetXLowValue(int index) Returns the lower bound of the x-interval for the specified item.doublegetYValue(int index) Returns the y-value for the specified item.Methods inherited from class org.jfree.data.ComparableObjectSeries
add, add, add, clear, clone, delete, equals, getAllowDuplicateXValues, getAutoSort, getItemCount, getMaximumItemCount, hashCode, indexOf, remove, remove, setMaximumItemCount, update, updateByIndexMethods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, canEqual, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
Constructor Details
-
XIntervalSeries
Creates a new empty series. By default, items added to the series will be sorted into ascending order by x-value, and duplicate x-values will be allowed (these defaults can be modified with another constructor.- Parameters:
key- the series key (nullnot permitted).
-
XIntervalSeries
Constructs a new xy-series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.- Parameters:
key- the series key (nullnot permitted).autoSort- a flag that controls whether or not the items in the series are sorted.allowDuplicateXValues- a flag that controls whether duplicate x-values are allowed.
-
-
Method Details
-
add
Adds a data item to the series and sends aSeriesChangeEventto all registered listeners.- Parameters:
x- the x-value.xLow- the lower bound of the y-interval.xHigh- the upper bound of the y-interval.y- the y-value.
-
add
Adds a data item to the series and, if requested, sends aSeriesChangeEventto all registered listeners.- Parameters:
item- the data item (nullnot permitted).notify- notify listeners?
-
getX
Returns the x-value for the specified item.- Parameters:
index- the item index.- Returns:
- The x-value (never
null).
-
getXLowValue
Returns the lower bound of the x-interval for the specified item.- Parameters:
index- the item index.- Returns:
- The lower bound of the x-interval.
-
getXHighValue
Returns the upper bound of the x-interval for the specified item.- Parameters:
index- the item index.- Returns:
- The upper bound of the x-interval.
-
getYValue
Returns the y-value for the specified item.- Parameters:
index- the item index.- Returns:
- The y-value.
-
getDataItem
Returns the data item at the specified index.- Overrides:
getDataItemin classComparableObjectSeries- Parameters:
index- the item index.- Returns:
- The data item.
-