public class CursorModifier extends TooltipModifierWithAxisLabelsBase
CursorModifier
provides a cross-hairs (cursor) plus tooltip with X,Y data values under the finger as the touch moves.
Add to a SciChartSurface
and set ChartModifierCore.setIsEnabled(boolean)
to True to enable this behaviour.RolloverModifier
,
TooltipModifier
showTooltipProperty, sourceModeProperty, tooltipBehavior, useInterpolationProperty
services
Modifier | Constructor and Description |
---|---|
|
CursorModifier()
Creates a new instance of the
CursorModifier class. |
protected |
CursorModifier(CursorTooltipBehavior<?> cursorTooltipBehavior,
AxisTooltipsBehaviorBase<?> axisTooltipsBehavior,
CursorCrosshairDrawableBehavior<?> crosshairDrawableBehavior)
Creates a new instance of the
CursorModifier class. |
|
CursorModifier(int tooltipContainerLayoutResId)
Creates a new instance of the
CursorModifier class. |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
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.getModifierSurface() . |
void |
detach() |
android.graphics.Paint |
getCrosshairPaint()
Gets the
Paint instance which will be used by CursorCrosshairDrawableBehavior to draw the crosshair. |
android.graphics.PointF |
getCustomPointOffset()
Gets the
PointF value which will replace getOffset() and will be used to shift tooltip and the marker in custom x and y directions. |
Placement |
getMarkerPlacement()
Gets the
Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point. |
float |
getOffset()
Gets the offset on which tooltip and the marker will be shifted in x and y directions.
|
TooltipPosition |
getTooltipPosition()
Gets the
TooltipPosition mode, to determine where to place tooltip relatively to the marker. |
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 |
void |
setCustomPointOffset(android.graphics.PointF customPointOffset)
Sets the
PointF value which will replace getOffset() and will be used to shift tooltip and the marker in custom x and y directions. |
void |
setMarkerPlacement(Placement markerPlacement)
Sets the
Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point. |
void |
setOffset(float offset)
Sets the offset on which tooltip and the marker will be shifted in x and y directions.
|
void |
setTooltipPosition(TooltipPosition tooltipPosition)
Sets the
TooltipPosition mode, to determine where to place tooltip relatively to the marker. |
protected void |
updateCurrentPoint(android.graphics.PointF currentPoint,
com.scichart.core.utility.touch.ModifierTouchEventArgs args)
Updates the passed in current point when one of the following methods was called:
MasterSlaveTouchModifierBase.onTouchDown(ModifierTouchEventArgs) ,
MasterSlaveTouchModifierBase.onTouchMove(ModifierTouchEventArgs) ,
MasterSlaveTouchModifierBase.onTouchUp(ModifierTouchEventArgs) . |
getShowAxisLabels, getXAxesWithOverlays, getYAxesWithOverlays, onXAxesDrasticallyChanged, onYAxesDrasticallyChanged, setShowAxisLabels
getObservableSeries, getShowTooltip, getSourceMode, getUseInterpolation, onRenderableSeriesDrasticallyChanged, setShowTooltip, setSourceMode, setUseInterpolation
isEnabledAt, onIsEnabledChanged, onTouchDown, onTouchMove, onTouchUp
onTouch, onTouchCancel
getContext, getMasterModifier, getModifierSurface, getParentSurface, getPointRelativeTo, getRenderableSeries, getRenderableSeriesArea, getXAxes, getXAxis, getXAxis, getYAxes, getYAxis, getYAxis, isWithinSourceBounds, onAnnotationsCollectionChanged, onAnnotationsDrasticallyChanged, onParentSurfaceResized, onRenderSurfaceRendered, onXAxesCollectionChanged, onYAxesCollectionChanged
checkPointerCounter, getEventsGroupTag, getIsEnabled, getReceiveHandledEvents, getServices, isAttached, onGenericMotion, onRenderableSeriesCollectionChanged, onSelectedSeriesCollectionChanged, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventsGroupTag, getIsEnabled, setIsEnabled
getName, getReceiveHandledEvents, onGenericMotion
onRenderableSeriesCollectionChanged, onSelectedSeriesCollectionChanged
public CursorModifier()
CursorModifier
class.public CursorModifier(int tooltipContainerLayoutResId)
CursorModifier
class.tooltipContainerLayoutResId
- The layout resource id which will be used to inflate tooltip container.protected CursorModifier(CursorTooltipBehavior<?> cursorTooltipBehavior, AxisTooltipsBehaviorBase<?> axisTooltipsBehavior, CursorCrosshairDrawableBehavior<?> crosshairDrawableBehavior)
CursorModifier
class.cursorTooltipBehavior
- The CursorTooltipBehavior
which will be associated with this modifier.axisTooltipsBehavior
- The AxisTooltipsBehavior
which will be associated with this modifier.crosshairDrawableBehavior
- The CursorCrosshairDrawableBehavior
which will be associated with this modifier.public final float getOffset()
public final void setOffset(float offset)
offset
- Value which indicates the offset on which tooltip and the marker will be shifted in x and y directions.public final android.graphics.PointF getCustomPointOffset()
PointF
value which will replace getOffset()
and will be used to shift tooltip and the marker in custom x and y directions.PointF
offset to shift tooltip.public final void setCustomPointOffset(android.graphics.PointF customPointOffset)
PointF
value which will replace getOffset()
and will be used to shift tooltip and the marker in custom x and y directions.customPointOffset
- The new PointF
value which will replace getOffset()
and will be used to shift tooltip and the marker in custom x and y directions.public final Placement getMarkerPlacement()
Placement
mode, to determine where to place tooltip and the marker relatively to the Hit-test point.Placement
modes, to place tooltip properly.public void setMarkerPlacement(Placement markerPlacement)
Placement
mode, to determine where to place tooltip and the marker relatively to the Hit-test point.markerPlacement
- The new Placement
mode, to determine where to place tooltip and the marker relatively to the Hit-test point.public final TooltipPosition getTooltipPosition()
TooltipPosition
mode, to determine where to place tooltip relatively to the marker.TooltipPosition
modes, to place tooltip properly.public final void setTooltipPosition(TooltipPosition tooltipPosition)
TooltipPosition
mode, to determine where to place tooltip relatively to the marker.tooltipPosition
- The new TooltipPosition
mode, to determine where to place tooltip relatively to the marker.public final android.graphics.Paint getCrosshairPaint()
Paint
instance which will be used by CursorCrosshairDrawableBehavior
to draw the crosshair.Paint
instance which will be used by CursorCrosshairDrawableBehavior
to draw the crosshair.public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
applyThemeProvider
in class TooltipModifierWithAxisLabelsBase
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void attachTo(com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class TooltipModifierWithAxisLabelsBase
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class TooltipModifierWithAxisLabelsBase
protected void handleMasterTouchDownEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_DOWN
handleMasterTouchDownEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void handleMasterTouchUpEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_UP
handleMasterTouchUpEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void handleMasterTouchMoveEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_MOVE
handleMasterTouchMoveEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void handleSlaveTouchDownEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_DOWN
handleSlaveTouchDownEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void handleSlaveTouchMoveEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_MOVE
handleSlaveTouchMoveEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void handleSlaveTouchUpEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_UP
handleSlaveTouchUpEvent
in class TooltipModifierWithAxisLabelsBase
point
- The current touch pointprotected void clearAll()
SciChartSurface.getModifierSurface()
.clearAll
in class TooltipModifierWithAxisLabelsBase
protected void updateCurrentPoint(android.graphics.PointF currentPoint, com.scichart.core.utility.touch.ModifierTouchEventArgs args)
MasterSlaveTouchModifierBase.onTouchDown(ModifierTouchEventArgs)
,
MasterSlaveTouchModifierBase.onTouchMove(ModifierTouchEventArgs)
,
MasterSlaveTouchModifierBase.onTouchUp(ModifierTouchEventArgs)
.updateCurrentPoint
in class MasterSlaveTouchModifierBase
currentPoint
- The point which will be updated.args
- The ModifierTouchEventArgs
which is used to update the passed in currentPoint.