Package org.jfree.data.xy
Class VectorSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.ComparableObjectSeries
org.jfree.data.xy.VectorSeries
- All Implemented Interfaces:
Serializable,Cloneable
A list of (x,y, deltaX, deltaY) data items.
- See Also:
-
Field Summary
Fields inherited from class org.jfree.data.ComparableObjectSeries
data -
Constructor Summary
ConstructorsConstructorDescriptionVectorSeries(Comparable key) Creates a new empty series.VectorSeries(Comparable key, boolean autoSort, boolean allowDuplicateXValues) Constructs a new series that contains no data. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x, double y, double deltaX, double deltaY) Adds a data item to the series.voidadd(VectorDataItem 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.doublegetVectorXValue(int index) Returns the x-component of the vector for an item in the series.doublegetVectorYValue(int index) Returns the y-component of the vector for an item in the series.doublegetXValue(int index) Returns the x-value for the specified item.doublegetYValue(int index) Returns the y-value for the specified item.remove(int index) Removes the item at the specified index and sends aSeriesChangeEventto all registered listeners.Methods inherited from class org.jfree.data.ComparableObjectSeries
add, add, add, clear, clone, delete, equals, getAllowDuplicateXValues, getAutoSort, getItemCount, getMaximumItemCount, hashCode, indexOf, 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
-
VectorSeries
Creates a new empty series.- Parameters:
key- the series key (nullnot permitted).
-
VectorSeries
Constructs a new 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.- Parameters:
x- the x-value.y- the y-value.deltaX- the vector x.deltaY- the vector y.
-
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?
-
remove
Removes the item at the specified index and sends aSeriesChangeEventto all registered listeners.- Overrides:
removein classComparableObjectSeries- Parameters:
index- the index.- Returns:
- The item removed.
-
getXValue
Returns the x-value for the specified item.- Parameters:
index- the item index.- Returns:
- The x-value.
-
getYValue
Returns the y-value for the specified item.- Parameters:
index- the item index.- Returns:
- The y-value.
-
getVectorXValue
Returns the x-component of the vector for an item in the series.- Parameters:
index- the item index.- Returns:
- The x-component of the vector.
-
getVectorYValue
Returns the y-component of the vector for an item in the series.- Parameters:
index- the item index.- Returns:
- The y-component of the vector.
-
getDataItem
Returns the data item at the specified index.- Overrides:
getDataItemin classComparableObjectSeries- Parameters:
index- the item index.- Returns:
- The data item.
-