public class TooltipModifier extends TooltipModifierBase
RolloverModifier
provides a touch-over tooltip to a chart, outputting a singleSeriesInfo
object to bind to which updates as the touch moves over data-points
Add to a SciChartSurface
and set ChartModifierBase.isEnabled
to True to enable this behaviour.CursorModifier
,
RolloverModifier
showTooltipProperty, sourceModeProperty, tooltipBehavior, useInterpolationProperty
Modifier | Constructor and Description |
---|---|
|
TooltipModifier()
Creates a new instance of the
TooltipModifier class. |
|
TooltipModifier(DrawableBehavior<?> drawableBehavior)
Creates a new instance of the
TooltipModifier class with the DrawableBehavior instance. |
|
TooltipModifier(DrawableBehavior<?> drawableBehavior,
int tooltipContainerLayoutResId)
Creates a new instance of the
TooltipModifier class. |
protected |
TooltipModifier(TooltipBehavior<?> tooltipBehavior,
DrawableBehavior<?> drawableBehavior)
Creates a new instance of the
TooltipModifier 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.chartModifierSurface . |
void |
detach() |
android.graphics.PointF |
getCustomPointOffset()
Gets the
PointF value which will replace CursorModifier.offset 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.
|
android.graphics.Paint |
getTooltipPointMarkerPaint()
Gets the
Paint instance which will be used by CrossDrawableBehavior do draw the marker. |
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 |
void |
setCustomPointOffset(android.graphics.PointF customPointOffset)
Sets the
PointF value which will replace CursorModifier.offset 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) . |
getObservableSeries, getShowTooltip, getSourceMode, getUseInterpolation, handleSlaveTouchDownEvent, handleSlaveTouchMoveEvent, handleSlaveTouchUpEvent, onRenderableSeriesDrasticallyChanged, setShowTooltip, setSourceMode, setUseInterpolation
isEnabledAt, onTouchDown, onTouchMove, onTouchUp
onTouch, onTouchCancel
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, onSelectedSeriesCollectionChanged, onXAxesCollectionChanged, onXAxesDrasticallyChanged, onYAxesCollectionChanged, onYAxesDrasticallyChanged, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
public TooltipModifier()
TooltipModifier
class.public TooltipModifier(DrawableBehavior<?> drawableBehavior)
TooltipModifier
class with the DrawableBehavior
instance.drawableBehavior
- The DrawableBehavior
instance which will be use to show marker which will identify what point will be Hit-tested.public TooltipModifier(DrawableBehavior<?> drawableBehavior, @LayoutRes int tooltipContainerLayoutResId)
TooltipModifier
class.drawableBehavior
- The DrawableBehavior
instance which will be use to show marker which will identify what point will be Hit-tested.tooltipContainerLayoutResId
- The layout resource id which will be used to inflate tooltip container.protected TooltipModifier(TooltipBehavior<?> tooltipBehavior, DrawableBehavior<?> drawableBehavior)
TooltipModifier
class.tooltipBehavior
- The TooltipBehavior
which will be associated with this modifier.drawableBehavior
- The DrawableBehavior
instance which will be use to show marker which will identify what point will be Hit-tested.public float getOffset()
public 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 android.graphics.PointF getCustomPointOffset()
PointF
value which will replace CursorModifier.offset
and will be used to shift tooltip and the marker in custom x and y directions.PointF
offset to shift tooltip.public void setCustomPointOffset(android.graphics.PointF customPointOffset)
PointF
value which will replace CursorModifier.offset
and will be used to shift tooltip and the marker in custom x and y directions.customPointOffset
- The new PointF
value which will replace CursorModifier.offset
and will be used to shift tooltip and the marker in custom x and y directions.public 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 TooltipPosition getTooltipPosition()
TooltipPosition
mode, to determine where to place tooltip relatively to the marker.TooltipPosition
modes, to place tooltip properly.public 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 getTooltipPointMarkerPaint()
Paint
instance which will be used by CrossDrawableBehavior
do draw the marker.Paint
instance which will be used by CrossDrawableBehavior
do draw the marker.public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class TooltipModifierBase
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class TooltipModifierBase
protected void clearAll()
SciChartSurface.chartModifierSurface
.clearAll
in class TooltipModifierBase
public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
applyThemeProvider
in class TooltipModifierBase
themeProvider
- The IThemeProvider
instance which provides new theme for current instanceprotected void handleMasterTouchDownEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_DOWN
handleMasterTouchDownEvent
in class TooltipModifierBase
point
- The current touch pointprotected void handleMasterTouchUpEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_UP
handleMasterTouchUpEvent
in class TooltipModifierBase
point
- The current touch pointprotected void handleMasterTouchMoveEvent(android.graphics.PointF point)
ChartModifierBase
MotionEvent.ACTION_MOVE
handleMasterTouchMoveEvent
in class TooltipModifierBase
point
- The current touch pointprotected 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.