public class SeriesSelectionModifier extends MasterSlaveTouchModifierBase
SeriesSelectionModifier
provides the ability to select series via a Chart ModifierConstructor and Description |
---|
SeriesSelectionModifier() |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
protected void |
clearAll()
When overridden in a derived class, this method should clear all markers and tooltips from the
SciChartSurface.chartModifierSurface . |
protected void |
deselectAll()
Deselects all selected
IRenderableSeries instances. |
protected void |
deselectAllBut(IRenderableSeries rSeries)
Deselects all selected
IRenderableSeries instances, except passed in rSeries. |
void |
detach() |
ISeriesStyle |
getSelectedSeriesStyle()
Gets a
ISeriesStyle for the selected IRenderableSeries . |
protected void |
handleMasterTouchDownEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Master
ChartModifierBase MotionEvent.ACTION_DOWN |
protected void |
handleMasterTouchMoveEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Master
ChartModifierBase MotionEvent.ACTION_MOVE |
protected void |
handleMasterTouchUpEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Master
ChartModifierBase MotionEvent.ACTION_UP |
protected void |
handleSlaveTouchDownEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Slave
ChartModifierBase MotionEvent.ACTION_DOWN |
protected void |
handleSlaveTouchMoveEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Slave
ChartModifierBase MotionEvent.ACTION_MOVE |
protected void |
handleSlaveTouchUpEvent(android.graphics.PointF point)
When overridden in a derived class, called to handle the Slave
ChartModifierBase MotionEvent.ACTION_UP |
protected boolean |
isHitPointValid(HitTestInfo hitTestInfo)
When overridden in derived classes, indicates whether
HitTestInfo result of hit-test
should be returned from the updateSeriesInfos(List, Action2) method. |
protected boolean |
isSeriesValid(IRenderableSeries series)
When overridden in derived classes, indicates whether the
IRenderableSeries should be inspected
in order to update SeriesInfo inside the updateSeriesInfos(List, Action2) method. |
void |
onRenderableSeriesDrasticallyChanged(ISciChartSurface surface)
Called when parent
SciChartSurface.getRenderableSeries() collection drastically changed |
void |
onSelectedSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
Called when parent
SciChartSurface.getSelectedRenderableSeries() collection changes |
void |
setSelectedSeriesStyle(ISeriesStyle selectedSeriesStyle)
Sets a
ISeriesStyle for the selected IRenderableSeries . |
protected void |
trySetStyle(IRenderableSeries renderableSeries)
Tries to set
selectedSeriesStyle on the passed in IRenderableSeries instance. |
protected void |
updateSeriesInfos(java.util.List<SeriesInfo> seriesInfos,
com.scichart.core.common.Action2<IRenderableSeries,HitTestInfo> hitTestMethod)
Called internally, gets the
SeriesInfo on all IRenderableSeries collection
on the parent ChartModifierBase.parentSurface using the provided hit-test function. |
protected void |
updateSeriesInfos(java.util.List<SeriesInfo> seriesInfos,
float x,
float y)
Enumerates
IRenderableSeries collection on the parent ChartModifierBase.parentSurface and
updates the SeriesInfo objects in given x y values of the point. |
isEnabledAt, onTouchDown, onTouchMove, onTouchUp, updateCurrentPoint
onTouch, onTouchCancel
applyThemeProvider, getContext, getEventsGroupTag, getIsEnabled, getMasterModifier, getModifierSurface, getParentSurface, getPointRelativeTo, getReceiveHandledEvents, getRenderableSeries, getRenderableSeriesArea, getServices, getXAxes, getXAxis, getXAxis, getYAxes, getYAxis, getYAxis, isAttached, isWithinSourceBounds, onAnnotationsCollectionChanged, onAnnotationsDrasticallyChanged, onGenericMotion, onIsEnabledChanged, onParentSurfaceResized, onRenderableSeriesCollectionChanged, onRenderSurfaceRendered, onXAxesCollectionChanged, onXAxesDrasticallyChanged, onYAxesCollectionChanged, onYAxesDrasticallyChanged, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
public void onRenderableSeriesDrasticallyChanged(ISciChartSurface surface)
SciChartSurface.getRenderableSeries()
collection drastically changedonRenderableSeriesDrasticallyChanged
in interface ISciChartSurfaceChangeListener
onRenderableSeriesDrasticallyChanged
in class ChartModifierBase
surface
- The parent surfacepublic void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class ChartModifierBase
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class ChartModifierBase
public final ISeriesStyle getSelectedSeriesStyle()
ISeriesStyle
for the selected IRenderableSeries
.ISeriesStyle
for the selected IRenderableSeries
.public final void setSelectedSeriesStyle(ISeriesStyle selectedSeriesStyle)
ISeriesStyle
for the selected IRenderableSeries
.selectedSeriesStyle
- The new ISeriesStyle
for selected series.protected void trySetStyle(IRenderableSeries renderableSeries)
selectedSeriesStyle
on the passed in IRenderableSeries
instance.renderableSeries
- The IRenderableSeries
instance to set style on.protected void handleMasterTouchDownEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_DOWN
handleMasterTouchDownEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void updateSeriesInfos(java.util.List<SeriesInfo> seriesInfos, float x, float y)
IRenderableSeries
collection on the parent ChartModifierBase.parentSurface
and
updates the SeriesInfo
objects in given x y values of the point.seriesInfos
- The SeriesInfo
collection to update.x
- The x value of the point to update the SeriesInfo
objects.y
- The x value of the point to update the SeriesInfo
objects.protected final void updateSeriesInfos(java.util.List<SeriesInfo> seriesInfos, com.scichart.core.common.Action2<IRenderableSeries,HitTestInfo> hitTestMethod)
SeriesInfo
on all IRenderableSeries
collection
on the parent ChartModifierBase.parentSurface
using the provided hit-test function.seriesInfos
- The SeriesInfo
objects to update.hitTestMethod
- The Hit-test function.protected boolean isSeriesValid(IRenderableSeries series)
IRenderableSeries
should be inspected
in order to update SeriesInfo
inside the updateSeriesInfos(List, Action2)
method.series
- The IRenderableSeries
instance which will be checked.IRenderableSeries
is valid, else - false.protected boolean isHitPointValid(HitTestInfo hitTestInfo)
HitTestInfo
result of hit-test
should be returned from the updateSeriesInfos(List, Action2)
method.hitTestInfo
- The HitTestInfo
instance which will be checked.HitTestInfo
is valid, else - false.protected void deselectAllBut(IRenderableSeries rSeries)
IRenderableSeries
instances, except passed in rSeries.rSeries
- The IRenderableSeries
instance which will be remain selected.protected void deselectAll()
IRenderableSeries
instances.protected void handleMasterTouchMoveEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_MOVE
handleMasterTouchMoveEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void handleMasterTouchUpEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_UP
handleMasterTouchUpEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void handleSlaveTouchDownEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_DOWN
handleSlaveTouchDownEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void handleSlaveTouchMoveEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_MOVE
handleSlaveTouchMoveEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void handleSlaveTouchUpEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_UP
handleSlaveTouchUpEvent
in class MasterSlaveTouchModifierBase
point
- The current touch pointprotected void clearAll()
SciChartSurface.chartModifierSurface
.clearAll
in class MasterSlaveTouchModifierBase
public void onSelectedSeriesCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IRenderableSeries> args)
SciChartSurface.getSelectedRenderableSeries()
collection changesonSelectedSeriesCollectionChanged
in interface ISciChartSurfaceChangeListener
onSelectedSeriesCollectionChanged
in class ChartModifierBase
args
- The collection changed event args