Class OHLCDataSeriesArray
java.lang.Object
com.illumon.iris.db.plot.AbstractSeriesInternal
com.illumon.iris.db.plot.datasets.AbstractDataSeries
com.illumon.iris.db.plot.datasets.xy.AbstractXYDataSeries
com.illumon.iris.db.plot.datasets.ohlc.OHLCDataSeriesArray
- All Implemented Interfaces:
DataSeries
,DataSeriesInternal
,OHLCDataSeries
,OHLCDataSeriesInternal
,ValidatingDataSeries
,XYDataSeries
,XYDataSeriesInternal
,PlotExceptionCause
,Series
,SeriesInternal
,Serializable
- Direct Known Subclasses:
OHLCDataSeriesSwappableTableArray
,OHLCDataSeriesTableArray
public class OHLCDataSeriesArray extends AbstractXYDataSeries implements OHLCDataSeriesInternal
An implementation of
OHLCDataSeriesInternal
.
This Doesn't allow for multiple series.- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description OHLCDataSeriesArray(AxesImpl axes, int id, Comparable name, IndexableNumericData time, IndexableNumericData open, IndexableNumericData high, IndexableNumericData low, IndexableNumericData close)
Creates an OHLCDataSeriesArray instance.OHLCDataSeriesArray(AxesImpl axes, int id, Comparable name, IndexableNumericData time, IndexableNumericData open, IndexableNumericData high, IndexableNumericData low, IndexableNumericData close, AbstractXYDataSeries series)
protected
OHLCDataSeriesArray(OHLCDataSeriesArray series, AxesImpl axes)
Creates a copy of a series using a different Axes and a different listener. -
Method Summary
Modifier and Type Method Description OHLCDataSeriesArray
copy(AxesImpl axes)
Create a copy of the series on a different set of axes.OHLCDataSeriesArray
createSnapshot()
Live data sets must override this implementation.IndexableNumericData
getClose()
double
getClose(int item)
Gets the close value at indexi
.IndexableNumericData
getHigh()
double
getHigh(int item)
Gets the high value at indexi
.IndexableNumericData
getLow()
double
getLow(int item)
Gets the low value at indexi
.IndexableNumericData
getOpen()
double
getOpen(int item)
Gets the open value at indexi
.IndexableNumericData
getTime()
double
getX(int item)
Gets the x value of the data point at indexi
.org.jfree.data.Range
getXRange()
Gets the x range of this dataset.double
getY(int item)
Gets the y value of the data point at indexi
.org.jfree.data.Range
getYRange()
Gets the y range of this dataset.void
onClose()
Series shut down after the plot is closed.int
size()
Gets the size of this data set.Methods inherited from class com.illumon.iris.db.plot.datasets.xy.AbstractXYDataSeries
colorsSetSpecific, errorBarColor, errorBarColor, errorBarColor, getPointColor, getPointLabel, getPointShape, getPointSize, getSeriesColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointLabel, pointLabelFormat, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, snapshotModifiers, toolTipPattern, validate, xToolTipPattern, yToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.datasets.AbstractDataSeries
chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPointLabelFormat, getPointsVisible, getXToolTipPattern, getYToolTipPattern, setErrorBarColor, setErrorBarColor, setErrorBarColor, setGradientVisible, setLineColor, setLineColor, setLineColor, setLineStyle, setLinesVisible, setPointLabelFormat, setPointsVisible, setXToolTipPattern, setYToolTipPattern
Methods inherited from class com.illumon.iris.db.plot.AbstractSeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, axes, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, id, name, removeTableHandle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSeries
errorBarColor, errorBarColor, errorBarColor, gradientVisible, lineColor, lineColor, lineColor, lineStyle, linesVisible, pointColor, pointColor, pointColor, pointColorByY, pointColorByY, pointLabel, pointLabelFormat, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointsVisible, seriesColor, seriesColor, seriesColor, toolTipPattern, xToolTipPattern, yToolTipPattern
Methods inherited from interface com.illumon.iris.db.plot.datasets.DataSeriesInternal
axes, chart, getErrorBarColor, getGradientVisible, getLineColor, getLineStyle, getLinesVisible, getPlotInfo, getPointLabelFormat, getPointsVisible, getSeriesColor, getXToolTipPattern, getYToolTipPattern, id, name
Methods inherited from interface com.illumon.iris.db.plot.SeriesInternal
addSwappableTable, addTableHandle, addTableMapHandle, dataChangeListener, getSwappableTables, getTableHandles, getTableMapHandles, onInflate, removeTableHandle
Methods inherited from interface com.illumon.iris.db.plot.datasets.xy.XYDataSeries
pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColor, pointColorInteger, pointLabel, pointLabel, pointLabel, pointLabel, pointShape, pointShape, pointShape, pointShape, pointShape, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize, pointSize
Methods inherited from interface com.illumon.iris.db.plot.datasets.xy.XYDataSeriesInternal
drawXError, drawYError, getEndX, getEndY, getPointColor, getPointLabel, getPointShape, getPointSize, getStartX, getStartY, sort
-
Constructor Details
-
OHLCDataSeriesArray
public OHLCDataSeriesArray(AxesImpl axes, int id, Comparable name, IndexableNumericData time, IndexableNumericData open, IndexableNumericData high, IndexableNumericData low, IndexableNumericData close)Creates an OHLCDataSeriesArray instance. This dataset is suited for open-high-low-close charts.- Parameters:
axes
- axes on which the dataset will be plottedid
- data series idname
- series nametime
- time dataopen
- open datahigh
- high datalow
- low dataclose
- close data- Throws:
com.fishlib.base.verify.RequirementFailure
-time
,open
,high
,low
,close
must not be null
-
OHLCDataSeriesArray
public OHLCDataSeriesArray(AxesImpl axes, int id, Comparable name, IndexableNumericData time, IndexableNumericData open, IndexableNumericData high, IndexableNumericData low, IndexableNumericData close, AbstractXYDataSeries series) -
OHLCDataSeriesArray
Creates a copy of a series using a different Axes and a different listener.- Parameters:
series
- series to copy.axes
- new axes to use.
-
-
Method Details
-
copy
Description copied from interface:SeriesInternal
Create a copy of the series on a different set of axes.- Specified by:
copy
in interfaceDataSeriesInternal
- Specified by:
copy
in interfaceOHLCDataSeriesInternal
- Specified by:
copy
in interfaceSeriesInternal
- Specified by:
copy
in interfaceXYDataSeriesInternal
- Parameters:
axes
- new axes.- Returns:
- copy of the series on a different set of axes.
-
getOpen
public double getOpen(int item)Description copied from interface:OHLCDataSeriesInternal
Gets the open value at indexi
.- Specified by:
getOpen
in interfaceOHLCDataSeriesInternal
- Parameters:
item
- index- Returns:
- open value at given index
-
getHigh
public double getHigh(int item)Description copied from interface:OHLCDataSeriesInternal
Gets the high value at indexi
.- Specified by:
getHigh
in interfaceOHLCDataSeriesInternal
- Parameters:
item
- index- Returns:
- high value at given index
-
getLow
public double getLow(int item)Description copied from interface:OHLCDataSeriesInternal
Gets the low value at indexi
.- Specified by:
getLow
in interfaceOHLCDataSeriesInternal
- Parameters:
item
- index- Returns:
- low value at given index
-
getClose
public double getClose(int item)Description copied from interface:OHLCDataSeriesInternal
Gets the close value at indexi
.- Specified by:
getClose
in interfaceOHLCDataSeriesInternal
- Parameters:
item
- index- Returns:
- close value at given index
-
size
public int size()Description copied from interface:DataSeriesInternal
Gets the size of this data set.- Specified by:
size
in interfaceDataSeriesInternal
- Returns:
- size of this data set
-
createSnapshot
Live data sets must override this implementation. See OHLCDataSeriesTableArray for an example.- Specified by:
createSnapshot
in interfaceDataSeriesInternal
- Specified by:
createSnapshot
in interfaceOHLCDataSeriesInternal
- Specified by:
createSnapshot
in interfaceXYDataSeriesInternal
-
getX
public double getX(int item)Description copied from interface:XYDataSeriesInternal
Gets the x value of the data point at indexi
.- Specified by:
getX
in interfaceXYDataSeriesInternal
- Parameters:
item
- index- Returns:
- x value of this data point at index
i
-
getY
public double getY(int item)Description copied from interface:XYDataSeriesInternal
Gets the y value of the data point at indexi
.- Specified by:
getY
in interfaceXYDataSeriesInternal
- Parameters:
item
- index- Returns:
- x value of this data point at index
i
-
getXRange
public org.jfree.data.Range getXRange()Description copied from interface:XYDataSeriesInternal
Gets the x range of this dataset. Should never return null.- Specified by:
getXRange
in interfaceXYDataSeriesInternal
- Returns:
- x range of this dataset
-
getYRange
public org.jfree.data.Range getYRange()Description copied from interface:XYDataSeriesInternal
Gets the y range of this dataset. Should never return null.- Specified by:
getYRange
in interfaceXYDataSeriesInternal
- Returns:
- y range of this dataset
-
onClose
public void onClose()Description copied from interface:SeriesInternal
Series shut down after the plot is closed.- Specified by:
onClose
in interfaceSeriesInternal
- Overrides:
onClose
in classAbstractXYDataSeries
-
getTime
-
getOpen
-
getHigh
-
getLow
-
getClose
-