public abstract class BaseRenderableSeries extends RenderableSeriesCore implements IRenderableSeries, ISciChartSurfaceProvider, IDataSeriesObserver
IDataSeries
,
IPointMarker
,
IRenderContext2D
,
IAssetManager2D
,
FastLineRenderableSeries
,
FastMountainRenderableSeries
,
FastColumnRenderableSeries
,
FastOhlcRenderableSeries
,
FastCandlestickRenderableSeries
,
FastBandRenderableSeries
,
FastErrorBarsRenderableSeries
,
FastFixedErrorBarsRenderableSeries
,
FastImpulseRenderableSeries
,
FastUniformHeatmapRenderableSeries
Modifier and Type | Field and Description |
---|---|
protected com.scichart.core.framework.SmartPropertyBoolean |
clipToBoundsProperty |
protected com.scichart.core.framework.SmartProperty<LineDrawMode> |
drawNaNAsProperty |
protected com.scichart.core.framework.SmartProperty<com.scichart.data.numerics.ResamplingMode> |
resamplingModeProperty |
protected com.scichart.core.framework.SmartProperty<com.scichart.drawing.common.PenStyle> |
strokeStyleProperty |
protected static java.lang.String |
TAG |
protected com.scichart.core.framework.SmartProperty<java.lang.String> |
xAxisIdProperty |
protected com.scichart.core.framework.SmartProperty<java.lang.String> |
yAxisIdProperty |
protected com.scichart.core.framework.SmartPropertyDouble |
zeroLineYProperty |
invalidateElementCallback, isSelectedProperty, isVisibleProperty, opacityProperty, services
Modifier | Constructor and Description |
---|---|
protected |
BaseRenderableSeries(ISeriesRenderPassData currentRenderPassData,
IHitProvider hitProvider,
INearestPointProvider nearestPointProvider)
Creates a new instance of
BaseRenderableSeries class |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
detach() |
protected void |
disposeCachedData()
This method is called when series should dispose any cached data
|
protected void |
drawPointMarkers(com.scichart.drawing.common.IRenderContext2D renderContext,
com.scichart.drawing.common.IAssetManager2D assetManager,
com.scichart.core.model.FloatValues xCoords,
com.scichart.core.model.FloatValues yCoords)
Draw the current point marker using the
IRenderContext2D , the IAssetManager2D and coordinates passed in |
boolean |
getClipToBounds()
Gets the value indicating whether this renderable series should be clipped to bounds calculated by
setClipRect(Rect) method |
android.content.Context |
getContext() |
ISeriesRenderPassData |
getCurrentRenderPassData()
Returns the current
ISeriesRenderPassData instance which is used for render pass |
IDataSeries |
getDataSeries()
Gets the
IDataSeries associated with this series |
IReadWriteLock |
getDataSeriesLock()
Gets the
IReadWriteLock instance to lock data series |
LineDrawMode |
getDrawNaNAs()
Gets a value indicating how this renderable series will treat double.NaN.
|
IPaletteProvider |
getPaletteProvider()
Gets the
IPaletteProvider instance associated with this series |
ISciChartSurface |
getParentSurface()
Gets the parent surface that this instance is associated with
|
IPointMarker |
getPointMarker()
Gets the
IPointMarker for this renderable series |
IReadWriteLock |
getRenderPassDataLock()
Gets the
IReadWriteLock instance to lock render pass data |
IRenderPassDataTransformation |
getRenderPassDataTransformation()
Get's the
IRenderPassDataTransformation instance associated with this series. |
com.scichart.data.numerics.ResamplingMode |
getResamplingMode()
Gets the
ResamplingMode used when drawing this series |
int |
getSeriesColor()
Gets the color which represents this
IRenderableSeries instance. |
ISeriesInfoProvider |
getSeriesInfoProvider()
Gets the
ISeriesInfoProvider instance associated with this series. |
com.scichart.drawing.common.PenStyle |
getStrokeStyle()
Gets the stroke style for this renderable series
|
IAxis |
getXAxis()
Gets the XAxis that this
IRenderableSeries is associated with |
java.lang.String |
getXAxisId()
Gets the id of XAxis that this
IRenderableSeries is associated with |
com.scichart.data.model.IRange |
getXRange()
Returns the data range of the
IRenderableSeries on X direction by querying the associated data series
Individual RenderableSeries implementations may override this method to provide custom ranging on per-series basis |
IAxis |
getYAxis()
Gets the YAxis that this
IRenderableSeries is associated with |
java.lang.String |
getYAxisId()
Gets the id of YAxis that this
IRenderableSeries is associated with |
com.scichart.data.model.IRange |
getYRange(ICoordinateCalculator xCoordCalc,
boolean getPositiveRange)
Returns the data range of the
IRenderableSeries on Y direction by querying the associated data series |
protected float |
getYZeroCoord(ICoordinateCalculator yCoordCalc)
Gets a value that determines the position of Y zero line on a chart.
|
double |
getZeroLineY()
Gets the value which determines the zero line in Y direction.
|
boolean |
hasDataSeries()
Gets whether this renderable series has data series to draw
|
void |
hitTest(HitTestInfo hitTestResult,
float x,
float y)
Performs a hit-test at the specific point (x,y coordinate on the parent
IRenderableSeriesArea |
void |
hitTest(HitTestInfo hitTestResult,
float x,
float y,
float hitTestRadius)
Performs a hit-test at the specific point (x,y coordinate on the parent
IRenderableSeriesArea |
protected abstract void |
internalDraw(com.scichart.drawing.common.IRenderContext2D renderContext,
com.scichart.drawing.common.IAssetManager2D assetManager,
ISeriesRenderPassData renderPassData)
Draws the series using the
IRenderContext2D , the IAssetManager2D and the ISeriesRenderPassData passed in |
protected void |
internalUpdate(com.scichart.drawing.common.IAssetManager2D assetManager2D,
RenderPassState renderPassState)
Updates this renderable series instances
|
protected abstract void |
internalUpdateRenderPassData(ISeriesRenderPassData renderPassDataToUpdate,
IDataSeries<?,?> dataSeries,
com.scichart.data.numerics.ResamplingMode resamplingMode,
com.scichart.data.numerics.pointresamplers.IPointResamplerFactory factory)
Updates the current render pass data using the data series, resampling factory passed in
|
void |
invalidateElement() |
protected abstract boolean |
isOfValidType(IDataSeries dataSeries)
Checks whether the data series instance is valid for this series
|
protected boolean |
isUpdateOfRenderPassDataRequired(ICoordinateCalculator xCoordCalc,
ICoordinateCalculator yCoordCalc,
com.scichart.core.common.Size viewportSize)
Checks whether this renderable series need to update its render pass data
|
boolean |
isValidForDrawing()
Checks whether this series is valid for drawing
|
boolean |
isValidForUpdate()
Checks whether this series is valid for update
|
void |
onDataSeriesChanged(IDataSeriesCore dataSeries,
int dataSeriesUpdate)
Called when data series changes
|
void |
onDraw(com.scichart.drawing.common.IRenderContext2D renderContext,
com.scichart.drawing.common.IAssetManager2D assetManager) |
void |
onRenderSurfaceChanged()
Called when new
IRenderSurface instance is set for parent ISciChartSurface |
protected void |
onStrokeStyleChanged(com.scichart.drawing.common.PenStyle oldStrokeStyle,
com.scichart.drawing.common.PenStyle newStrokeStyle)
Called when
getStrokeStyle() property changes |
protected void |
setClipRect(android.graphics.Rect clipRect)
Sets the clip rect which is used by this series if
getClipToBounds() is true |
void |
setClipToBounds(boolean clipToBounds)
Sets the value indicating whether this renderable series should be clipped to bounds calculated by
setClipRect(Rect) method |
void |
setDataSeries(IDataSeries dataSeries)
Sets the
IDataSeries associated with this series |
void |
setDrawNaNAs(LineDrawMode drawNaNAs)
Sets a value indicating how this renderable series will treat double.NaN.
|
void |
setPaletteProvider(IPaletteProvider paletteProvider)
Set the
IPaletteProvider instance associated with this series |
void |
setPointMarker(IPointMarker pointMarker)
Sets the
IPointMarker for this renderable series |
void |
setRenderPassDataTransformation(IRenderPassDataTransformation renderPassDataTransformation)
Set's the
IRenderPassDataTransformation instance associated with this series. |
void |
setResamplingMode(com.scichart.data.numerics.ResamplingMode resamplingMode)
Sets the
ResamplingMode used when drawing this series |
void |
setSeriesInfoProvider(ISeriesInfoProvider seriesInfoProvider)
Sets the
ISeriesInfoProvider instance associated with this series. |
void |
setStrokeStyle(com.scichart.drawing.common.PenStyle strokeStyle)
Sets the stroke style of this renderable series
|
void |
setXAxisId(java.lang.String xAxisId)
Sets the id of XAxis that this
IRenderableSeries is associated with |
void |
setYAxisId(java.lang.String yAxisId)
Sets the id of YAxis that this
IRenderableSeries is associated with |
void |
setZeroLineY(double zeroLineY)
Sets the value which determines the zero line in Y direction.
|
void |
update(com.scichart.drawing.common.IAssetManager2D assetManager,
RenderPassState renderPassState)
Updates the state of this
IUpdatable before rendering |
void |
updateRenderPassData(IAxis xAxis,
IAxis yAxis,
RenderPassState renderPassState)
Called during render pass and updates current render pass data
|
void |
verticalSliceHitTest(HitTestInfo hitTestResult,
float x,
float y)
Performs a hit-test at the specific point with zero hit-test radium.
|
addIsSelectedChangeListener, addIsVisibleChangeListener, decrementSuspend, getIsSelected, getIsSuspended, getIsVisible, getOpacity, getSelectedSeriesStyle, getServices, getUpdateSuspenderCount, isAttached, removeIsSelectedChangeListener, removeIsVisibleChangeListener, resumeUpdates, setIsSelected, setIsVisible, setOpacity, setSelectedSeriesStyle, suspendUpdates
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addIsSelectedChangeListener, addIsVisibleChangeListener, getIsSelected, getIsVisible, getOpacity, getSelectedSeriesStyle, removeIsSelectedChangeListener, removeIsVisibleChangeListener, setIsSelected, setIsVisible, setOpacity, setSelectedSeriesStyle
protected static final java.lang.String TAG
protected final com.scichart.core.framework.SmartProperty<com.scichart.data.numerics.ResamplingMode> resamplingModeProperty
protected final com.scichart.core.framework.SmartProperty<LineDrawMode> drawNaNAsProperty
protected final com.scichart.core.framework.SmartPropertyDouble zeroLineYProperty
protected final com.scichart.core.framework.SmartProperty<com.scichart.drawing.common.PenStyle> strokeStyleProperty
protected final com.scichart.core.framework.SmartProperty<java.lang.String> xAxisIdProperty
protected final com.scichart.core.framework.SmartProperty<java.lang.String> yAxisIdProperty
protected final com.scichart.core.framework.SmartPropertyBoolean clipToBoundsProperty
protected BaseRenderableSeries(ISeriesRenderPassData currentRenderPassData, IHitProvider hitProvider, INearestPointProvider nearestPointProvider)
BaseRenderableSeries
classcurrentRenderPassData
- The render pass data instancehitProvider
- The hit provider instancenearestPointProvider
- The nearest point provider instancepublic void onDataSeriesChanged(IDataSeriesCore dataSeries, int dataSeriesUpdate)
onDataSeriesChanged
in interface IDataSeriesObserver
dataSeries
- The data series instance which changeddataSeriesUpdate
- The change actionpublic int getSeriesColor()
IRenderableSeries
instance.getSeriesColor
in interface IRenderableSeries
IRenderableSeries
instance.public final com.scichart.drawing.common.PenStyle getStrokeStyle()
getStrokeStyle
in interface IRenderableSeries
public final void setStrokeStyle(com.scichart.drawing.common.PenStyle strokeStyle)
setStrokeStyle
in interface IRenderableSeries
strokeStyle
- New stroke styleprotected void onStrokeStyleChanged(com.scichart.drawing.common.PenStyle oldStrokeStyle, com.scichart.drawing.common.PenStyle newStrokeStyle)
getStrokeStyle()
property changesoldStrokeStyle
- The old stroke stylenewStrokeStyle
- The new stroke stylepublic final com.scichart.data.numerics.ResamplingMode getResamplingMode()
ResamplingMode
used when drawing this seriesgetResamplingMode
in interface IRenderableSeries
public void setResamplingMode(com.scichart.data.numerics.ResamplingMode resamplingMode)
ResamplingMode
used when drawing this seriessetResamplingMode
in interface IRenderableSeries
resamplingMode
- New resampling modepublic final IDataSeries getDataSeries()
IDataSeries
associated with this seriesgetDataSeries
in interface IRenderableSeries
public final void setDataSeries(IDataSeries dataSeries)
IDataSeries
associated with this seriessetDataSeries
in interface IRenderableSeries
dataSeries
- New data seriespublic final boolean hasDataSeries()
hasDataSeries
in interface IRenderableSeries
protected abstract boolean isOfValidType(IDataSeries dataSeries)
dataSeries
- The data series instance to checkpublic final IPointMarker getPointMarker()
IPointMarker
for this renderable seriesgetPointMarker
in interface IRenderableSeries
public final void setPointMarker(IPointMarker pointMarker)
IPointMarker
for this renderable seriessetPointMarker
in interface IRenderableSeries
pointMarker
- New point markerpublic final IPaletteProvider getPaletteProvider()
IPaletteProvider
instance associated with this seriesgetPaletteProvider
in interface IRenderableSeries
IPaletteProvider
instancepublic final void setPaletteProvider(IPaletteProvider paletteProvider)
IPaletteProvider
instance associated with this seriessetPaletteProvider
in interface IRenderableSeries
paletteProvider
- The new IPaletteProvider
instancepublic final ISeriesInfoProvider getSeriesInfoProvider()
ISeriesInfoProvider
instance associated with this series.getSeriesInfoProvider
in interface IRenderableSeries
ISeriesInfoProvider
instancepublic final void setSeriesInfoProvider(ISeriesInfoProvider seriesInfoProvider)
ISeriesInfoProvider
instance associated with this series.setSeriesInfoProvider
in interface IRenderableSeries
seriesInfoProvider
- New ISeriesInfoProvider
instancepublic final IRenderPassDataTransformation getRenderPassDataTransformation()
IRenderPassDataTransformation
instance associated with this series.getRenderPassDataTransformation
in interface IRenderableSeries
IRenderPassDataTransformation
instance.public final void setRenderPassDataTransformation(IRenderPassDataTransformation renderPassDataTransformation)
IRenderPassDataTransformation
instance associated with this series.setRenderPassDataTransformation
in interface IRenderableSeries
renderPassDataTransformation
- New IRenderPassDataTransformation
instance.public final java.lang.String getXAxisId()
IRenderableSeries
is associated withgetXAxisId
in interface IRenderableSeries
public final void setXAxisId(java.lang.String xAxisId)
IRenderableSeries
is associated withsetXAxisId
in interface IRenderableSeries
xAxisId
- New XAxis idpublic final java.lang.String getYAxisId()
IRenderableSeries
is associated withgetYAxisId
in interface IRenderableSeries
public final void setYAxisId(java.lang.String yAxisId)
IRenderableSeries
is associated withsetYAxisId
in interface IRenderableSeries
yAxisId
- New YAxis idpublic final IAxis getXAxis()
IRenderableSeries
is associated withgetXAxis
in interface IRenderableSeries
public final IAxis getYAxis()
IRenderableSeries
is associated withgetYAxis
in interface IRenderableSeries
public final LineDrawMode getDrawNaNAs()
LineDrawMode
for available optionspublic final void setDrawNaNAs(LineDrawMode drawNaNAs)
LineDrawMode
for available optionsdrawNaNAs
- New drawNaNAs valuepublic final double getZeroLineY()
public final void setZeroLineY(double zeroLineY)
zeroLineY
- The new zeroLieY valuepublic final boolean getClipToBounds()
setClipRect(Rect)
methodpublic final void setClipToBounds(boolean clipToBounds)
setClipRect(Rect)
methodclipToBounds
- The new clipToBounds
valuepublic void attachTo(com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class RenderableSeriesCore
protected void disposeCachedData()
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class RenderableSeriesCore
public void onRenderSurfaceChanged()
IRenderSurface
instance is set for parent ISciChartSurface
onRenderSurfaceChanged
in interface IRenderSurfaceChangedListener
public final android.content.Context getContext()
getContext
in interface com.scichart.core.framework.IContextProvider
public final ISciChartSurface getParentSurface()
getParentSurface
in interface ISciChartSurfaceProvider
public final ISeriesRenderPassData getCurrentRenderPassData()
ISeriesRenderPassData
instance which is used for render passgetCurrentRenderPassData
in interface IRenderableSeries
public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic final void onDraw(com.scichart.drawing.common.IRenderContext2D renderContext, com.scichart.drawing.common.IAssetManager2D assetManager)
onDraw
in interface com.scichart.drawing.common.IDrawable
public boolean isValidForUpdate()
isValidForUpdate
in interface IRenderableSeriesCore
public boolean isValidForDrawing()
isValidForDrawing
in interface IRenderableSeriesCore
protected void setClipRect(android.graphics.Rect clipRect)
getClipToBounds()
is trueclipRect
- The clip rect to setprotected abstract void internalDraw(com.scichart.drawing.common.IRenderContext2D renderContext, com.scichart.drawing.common.IAssetManager2D assetManager, ISeriesRenderPassData renderPassData)
IRenderContext2D
, the IAssetManager2D
and the ISeriesRenderPassData
passed inrenderContext
- The render context. This is a graphics object which has methods to draw lines, quads and polygons to the screenassetManager
- The asset manager. This is manager for graphic assets which has method for creation pens, brushes and texturesrenderPassData
- The render pass data which contain a resampled point series, the index range of point on the screen
and the current coordinate calculator of XAxis and YAxis to convert data-point to screen pointsprotected final void drawPointMarkers(com.scichart.drawing.common.IRenderContext2D renderContext, com.scichart.drawing.common.IAssetManager2D assetManager, com.scichart.core.model.FloatValues xCoords, com.scichart.core.model.FloatValues yCoords)
IRenderContext2D
, the IAssetManager2D
and coordinates passed inrenderContext
- The render context. This is a graphics object which has methods to draw lines, quads and polygons to the screenassetManager
- The asset manager. This is manager for graphic assets which has method for creation pens, brushes and texturesxCoords
- The x coordinates to draw point marker atyCoords
- The y coordinates to draw point marker atpublic final void update(com.scichart.drawing.common.IAssetManager2D assetManager, RenderPassState renderPassState)
IUpdatable
before renderingupdate
in interface IUpdatable
assetManager
- The IAssetManager2D
used in current render passrenderPassState
- The RenderPassState
used in current render passprotected void internalUpdate(com.scichart.drawing.common.IAssetManager2D assetManager2D, RenderPassState renderPassState)
assetManager2D
- The IAssetManager2D
used for this render passrenderPassState
- The RenderPassState
for this render passpublic final void updateRenderPassData(IAxis xAxis, IAxis yAxis, RenderPassState renderPassState)
updateRenderPassData
in interface IRenderableSeries
xAxis
- The XAxis instance that this IRenderableSeries
is associated withyAxis
- The YAxis instance that this IRenderableSeries
is associated withrenderPassState
- The current render pass stateprotected boolean isUpdateOfRenderPassDataRequired(ICoordinateCalculator xCoordCalc, ICoordinateCalculator yCoordCalc, com.scichart.core.common.Size viewportSize)
xCoordCalc
- The current coordinate calculator for XAxisyCoordCalc
- The current coordinate calculator for YAxisviewportSize
- The current viewport managerinternalUpdateRenderPassData(ISeriesRenderPassData, IDataSeries, ResamplingMode, IPointResamplerFactory)
should be calledprotected abstract void internalUpdateRenderPassData(ISeriesRenderPassData renderPassDataToUpdate, IDataSeries<?,?> dataSeries, com.scichart.data.numerics.ResamplingMode resamplingMode, com.scichart.data.numerics.pointresamplers.IPointResamplerFactory factory) throws java.lang.Exception
renderPassDataToUpdate
- The render pass data to updatedataSeries
- The data series associated with this renderable series instanceresamplingMode
- The resampling mode associated with this renderable series instancefactory
- The IPointResamplerFactory
to usejava.lang.Exception
- If any exception occursprotected float getYZeroCoord(ICoordinateCalculator yCoordCalc)
FastColumnRenderableSeries
, FastMountainRenderableSeries
, FastImpulseRenderableSeries
yCoordCalc
- The ICoordinateCalculator
for YAxispublic final IReadWriteLock getRenderPassDataLock()
IReadWriteLock
instance to lock render pass datagetRenderPassDataLock
in interface IRenderableSeries
IReadWriteLock
instance to lock render pass datapublic final IReadWriteLock getDataSeriesLock()
IReadWriteLock
instance to lock data seriesgetDataSeriesLock
in interface IRenderableSeries
IReadWriteLock
instance to lock data seriespublic void invalidateElement()
invalidateElement
in interface com.scichart.core.framework.IInvalidatableElement
public com.scichart.data.model.IRange getXRange()
IRenderableSeries
on X direction by querying the associated data series
Individual RenderableSeries implementations may override this method to provide custom ranging on per-series basisgetXRange
in interface IRenderableSeries
public com.scichart.data.model.IRange getYRange(ICoordinateCalculator xCoordCalc, boolean getPositiveRange)
IRenderableSeries
on Y direction by querying the associated data seriesgetYRange
in interface IRenderableSeries
xCoordCalc
- The XAxis coordinate calculator currently used.getPositiveRange
- Indicates whether to return positive YRange onlypublic final void hitTest(HitTestInfo hitTestResult, float x, float y)
IRenderableSeriesArea
hitTest
in interface IRenderableSeries
hitTestResult
- The HitTestInfo
instance where result of hit-test should be storedx
- The x coordinate in pixels relative to parent IRenderableSeriesArea
y
- The y coordinate in pixels relative to parent IRenderableSeriesArea
public final void hitTest(HitTestInfo hitTestResult, float x, float y, float hitTestRadius)
IRenderableSeriesArea
hitTest
in interface IRenderableSeries
hitTestResult
- The HitTestInfo
instance where result of hit-test should be storedx
- The x coordinate in pixels relative to parent IRenderableSeriesArea
y
- The y coordinate in pixels relative to parent IRenderableSeriesArea
hitTestRadius
- The radius in pixels to determine whether hit point is over a data pointpublic final void verticalSliceHitTest(HitTestInfo hitTestResult, float x, float y)
verticalSliceHitTest
in interface IRenderableSeries
hitTestResult
- The HitTestInfo
instance where result of hit-test should be storedx
- The x coordinate in pixels relative to parent IRenderableSeriesArea
y
- The y coordinate in pixels relative to parent IRenderableSeriesArea