Class CursorModifier
The 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 CursorModifier#setIsEnabled(boolean) to True to enable this behaviour. See Also: TooltipModifier, RolloverModifier
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class CursorModifier extends TooltipModifierWithAxisLabelsBase
Constructors
CursorModifier()
Creates a new instance of the CursorModifier class.
Declaration
public CursorModifier()
CursorModifier(CursorTooltipBehavior<?> cursorTooltipBehavior, AxisTooltipsBehaviorBase<?> axisTooltipsBehavior, CursorCrosshairDrawableBehavior<?> crosshairDrawableBehavior)
Creates a new instance of the CursorModifier class.
Declaration
protected CursorModifier(CursorTooltipBehavior<?> cursorTooltipBehavior, AxisTooltipsBehaviorBase<?> axisTooltipsBehavior, CursorCrosshairDrawableBehavior<?> crosshairDrawableBehavior)
Parameters
Type | Name | Description |
---|---|---|
CursorTooltipBehavior<?> | cursorTooltipBehavior | The CursorTooltipBehavior which will be associated with this modifier. |
AxisTooltipsBehaviorBase<?> | axisTooltipsBehavior | The AxisTooltipsBehavior which will be associated with this modifier. |
CursorCrosshairDrawableBehavior<?> | crosshairDrawableBehavior | The CursorCrosshairDrawableBehavior which will be associated with this modifier. |
CursorModifier(int tooltipContainerLayoutResId)
Creates a new instance of the CursorModifier class.
Declaration
public CursorModifier(int tooltipContainerLayoutResId)
Parameters
Type | Name | Description |
---|---|---|
int | tooltipContainerLayoutResId | The layout resource id which will be used to inflate tooltip container. |
Methods
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
Declaration
public void applyThemeProvider(IThemeProvider themeProvider)
Parameters
Type | Name | Description |
---|---|---|
IThemeProvider | themeProvider |
Overrides
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
Type | Name | Description |
---|---|---|
IServiceContainer | services |
Overrides
clearAll()
When overridden in a derived class, this method should clear all markers and tooltips from the SciChartSurface#getModifierSurface().
Declaration
protected void clearAll()
Overrides
detach()
Declaration
public void detach()
Overrides
getCrosshairPaint()
Gets the Paint instance which will be used by CursorCrosshairDrawableBehavior to draw the crosshair.
Declaration
public final Paint getCrosshairPaint()
Returns
Type | Description |
---|---|
android.graphics.Paint | The Paint instance which will be used by CursorCrosshairDrawableBehavior to draw the crosshair. |
getCustomPointOffset()
Gets the PointF value which will replace CursorModifier#getOffset() and will be used to shift tooltip and the marker in custom x and y directions.
Declaration
public final PointF getCustomPointOffset()
Returns
Type | Description |
---|---|
android.graphics.PointF | The custom PointF offset to shift tooltip. |
getMarkerPlacement()
Gets the Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point.
Declaration
public final Placement getMarkerPlacement()
Returns
Type | Description |
---|---|
Placement | The one of the Placement modes, to place tooltip properly. |
getOffset()
Gets the offset on which tooltip and the marker will be shifted in x and y directions.
Declaration
public final float getOffset()
Returns
Type | Description |
---|---|
float | The offset on which tooltip and the marker will be shifted in x and y directions. |
getTooltipPosition()
Gets the TooltipPosition mode, to determine where to place tooltip relatively to the marker.
Declaration
public final TooltipPosition getTooltipPosition()
Returns
Type | Description |
---|---|
TooltipPosition | The one of the TooltipPosition modes, to place tooltip properly. |
handleMasterTouchDownEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_DOWN
Declaration
protected void handleMasterTouchDownEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleMasterTouchMoveEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_MOVE
Declaration
protected void handleMasterTouchMoveEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleMasterTouchUpEvent(PointF point)
When overridden in a derived class, called to handle the Master ChartModifierBase MotionEvent#ACTION_UP
Declaration
protected void handleMasterTouchUpEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleSlaveTouchDownEvent(PointF point)
When overridden in a derived class, called to handle the Slave ChartModifierBase MotionEvent#ACTION_DOWN
Declaration
protected void handleSlaveTouchDownEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleSlaveTouchMoveEvent(PointF point)
When overridden in a derived class, called to handle the Slave ChartModifierBase MotionEvent#ACTION_MOVE
Declaration
protected void handleSlaveTouchMoveEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
handleSlaveTouchUpEvent(PointF point)
When overridden in a derived class, called to handle the Slave ChartModifierBase MotionEvent#ACTION_UP
Declaration
protected void handleSlaveTouchUpEvent(PointF point)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | point |
Overrides
setCustomPointOffset(PointF customPointOffset)
Sets the PointF value which will replace CursorModifier#getOffset() and will be used to shift tooltip and the marker in custom x and y directions.
Declaration
public final void setCustomPointOffset(PointF customPointOffset)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | customPointOffset | The new PointF value which will replace CursorModifier#getOffset() and will be used to shift tooltip and the marker in custom x and y directions. |
setMarkerPlacement(Placement markerPlacement)
Sets the Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point.
Declaration
public void setMarkerPlacement(Placement markerPlacement)
Parameters
Type | Name | Description |
---|---|---|
Placement | markerPlacement | The new Placement mode, to determine where to place tooltip and the marker relatively to the Hit-test point. |
setOffset(float offset)
Sets the offset on which tooltip and the marker will be shifted in x and y directions.
Declaration
public final void setOffset(float offset)
Parameters
Type | Name | Description |
---|---|---|
float | offset | Value which indicates the offset on which tooltip and the marker will be shifted in x and y directions. |
setTooltipPosition(TooltipPosition tooltipPosition)
Sets the TooltipPosition mode, to determine where to place tooltip relatively to the marker.
Declaration
public final void setTooltipPosition(TooltipPosition tooltipPosition)
Parameters
Type | Name | Description |
---|---|---|
TooltipPosition | tooltipPosition | The new TooltipPosition mode, to determine where to place tooltip relatively to the marker. |
updateCurrentPoint(PointF currentPoint, 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).
Declaration
protected boolean updateCurrentPoint(PointF currentPoint, ModifierTouchEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | currentPoint | |
ModifierTouchEventArgs | args |
Returns
Type | Description |
---|---|
boolean |