jyplot.XYErrorBar
Class XYErrorBarSeries
- java.lang.Object
-
- org.jfree.data.general.Series
-
- jyplot.XYErrorBar.XYErrorBarSeries
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class XYErrorBarSeries extends Series
Represents a sequence of zero or more data items in the form (x, y, y start, y end). Items in the series will be sorted into ascending order by X-value, and duplicate X-values are permitted. Both the sorting and duplicate defaults can be changed in the constructor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description XYErrorBarSeries(java.lang.String name)Creates a new empty series.XYErrorBarSeries(java.lang.String name, boolean autoSort, boolean allowDuplicateXValues)Constructs a new xy-series that contains no data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(double x, double y, double ylow, double yhigh)Adds a data item to the series and sends aSeriesChangeEventto all registered listeners.voidadd(double x, double y, double ylow, double yhigh, boolean notify)Adds a data item to the series and, if requested, sends aSeriesChangeEventto all registered listeners.voidclear()Removes all data items from the series.voiddelete(int start, int end)Deletes a range of items from the series and sends aSeriesChangeEventto all registered listeners.booleangetAllowDuplicateXValues()Returns a flag that controls whether duplicate x-values are allowed.booleangetAutoSort()Returns the flag that controls whether the items in the series are automatically sorted.java.lang.NumbergetEndY(int index)Returns the y-value at the specified index.intgetItemCount()Returns the number of items in the series.intgetMaximumItemCount()Returns the maximum number of items that will be retained in the series.java.lang.NumbergetStartY(int index)Returns the y-value at the specified index.java.lang.NumbergetX(int index)Returns the x-value at the specified index.java.lang.NumbergetY(int index)Returns the y-value at the specified index.intindexOf(java.lang.Number x)Returns the index of the item with the specified x-value.voidremove(int index)Removes the item at the specified index.voidsetMaximumItemCount(int maximum)Sets the maximum number of items that will be retained in the series.-
Methods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, clone, equals, fireSeriesChanged, getDescription, getKey, getNotify, hashCode, isEmpty, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
-
-
-
Constructor Detail
-
XYErrorBarSeries
public XYErrorBarSeries(java.lang.String name)
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:
name- the series name (nullnot permitted).
-
XYErrorBarSeries
public XYErrorBarSeries(java.lang.String name, boolean autoSort, boolean allowDuplicateXValues)Constructs a new xy-series that contains no data. You can specify whether or not duplicate x-values are allowed for the series.- Parameters:
name- the series name (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 Detail
-
getAutoSort
public boolean getAutoSort()
Returns the flag that controls whether the items in the series are automatically sorted. There is no setter for this flag, it must be defined in the series constructor.- Returns:
- A boolean.
-
getAllowDuplicateXValues
public boolean getAllowDuplicateXValues()
Returns a flag that controls whether duplicate x-values are allowed. This flag can only be set in the constructor.- Returns:
- A boolean.
-
getItemCount
public int getItemCount()
Returns the number of items in the series.- Specified by:
getItemCountin classSeries- Returns:
- The item count.
-
getMaximumItemCount
public int getMaximumItemCount()
Returns the maximum number of items that will be retained in the series. The default value isInteger.MAX_VALUE).- Returns:
- The maximum item count.
-
setMaximumItemCount
public void setMaximumItemCount(int maximum)
Sets the maximum number of items that will be retained in the series.If you add a new item to the series such that the number of items will exceed the maximum item count, then the FIRST element in the series is automatically removed, ensuring that the maximum item count is not exceeded.
- Parameters:
maximum- the maximum.
-
add
public void add(double x, double y, double ylow, double yhigh)Adds a data item to the series and sends aSeriesChangeEventto all registered listeners.- Parameters:
x- the x value.y- the y value.ylow- the minimum y valueyhigh- the maximum y value
-
add
public void add(double x, double y, double ylow, double yhigh, boolean notify)Adds a data item to the series and, if requested, sends aSeriesChangeEventto all registered listeners.- Parameters:
x- the x value.y- the y value.ylow- the minimum y valueyhigh- the maximum y valuenotify- a flag that controls whether or not aSeriesChangeEventis sent to all registered listeners.
-
delete
public void delete(int start, int end)Deletes a range of items from the series and sends aSeriesChangeEventto all registered listeners.- Parameters:
start- the start index (zero-based).end- the end index (zero-based).
-
remove
public void remove(int index)
Removes the item at the specified index.- Parameters:
index- the index.
-
clear
public void clear()
Removes all data items from the series.
-
getX
public java.lang.Number getX(int index)
Returns the x-value at the specified index.- Parameters:
index- the index (zero-based).- Returns:
- The x-value (never
null).
-
getY
public java.lang.Number getY(int index)
Returns the y-value at the specified index.- Parameters:
index- the index (zero-based).- Returns:
- The y-value (possibly
null).
-
getStartY
public java.lang.Number getStartY(int index)
Returns the y-value at the specified index.- Parameters:
index- the index (zero-based).- Returns:
- The y-value (possibly
null).
-
getEndY
public java.lang.Number getEndY(int index)
Returns the y-value at the specified index.- Parameters:
index- the index (zero-based).- Returns:
- The y-value (possibly
null).
-
indexOf
public int indexOf(java.lang.Number x)
Returns the index of the item with the specified x-value. Note: if the series is not sorted in order of ascending x-values, the result is undefined.- Parameters:
x- the x-value (nullnot permitted).- Returns:
- The index.
-
-
DMelt 3.0 © DataMelt by jWork.ORG