T
- The modifier to which this behavior will be attached.public class CursorTooltipBehavior<T extends CursorModifier> extends TooltipBehavior<T>
CursorModifier
and inheritors.TooltipBehavior.TooltipLayout
CURSOR_XY_OFFSET
lastUpdatePoint, modifier, modifierType, parentSurface, services
Constructor and Description |
---|
CursorTooltipBehavior(java.lang.Class<T> modifierType,
int tooltipContainerLayoutResId)
Creates a new instance of
CursorTooltipBehavior class. |
Modifier and Type | Method and Description |
---|---|
protected TooltipBehavior.TooltipLayout |
createTooltipLayout(android.content.Context context)
Create new
TooltipBehavior.TooltipLayout instance. |
protected boolean |
isHitPointValid(HitTestInfo hitTestInfo)
Gets the value indicating whether the
HitTestInfo instance is valid. |
void |
onBeginUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IChartModifier instance handle touch down event. |
void |
onEndUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IChartModifier instance handle touch up event. |
void |
onUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IChartModifier instance handle touch move event. |
protected void |
updateTooltip(float x,
float y)
Update tooltips if the renderable series and new point is valid according to the new x and y values.
|
applyThemeProvider, attachTo, clear, createTooltip, detach, getTooltipPosition, onObservableSeriesDrasticallyChanged, setTooltipPosition, updateTooltip
func, getObservableSeries, getSourceMode, getUseInterpolation, isSeriesValid, setObservableSeries, setSourceMode, setUseInterpolation
attachTo, getIsEnabled, isAttached, isLastPointValid, onIsEnabledChanged, resetLastUpdatePoint, setIsEnabled
public CursorTooltipBehavior(java.lang.Class<T> modifierType, @LayoutRes int tooltipContainerLayoutResId)
CursorTooltipBehavior
class.modifierType
- The type of the associated IChartModifier
.tooltipContainerLayoutResId
- The layout resource id which will be used to inflate tooltip container.protected void updateTooltip(float x, float y)
updateTooltip
in class TooltipBehavior<T extends CursorModifier>
x
- The x value of the point.y
- The x value of the point.protected boolean isHitPointValid(HitTestInfo hitTestInfo)
HitTestInfo
instance is valid.isHitPointValid
in class TooltipBehaviorBase<T extends CursorModifier>
hitTestInfo
- The HitTestInfo
instance to test.public void onBeginUpdate(android.graphics.PointF point, boolean isMaster)
TooltipBehavior
IChartModifier
instance handle touch down event.onBeginUpdate
in class TooltipBehavior<T extends CursorModifier>
point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.public void onUpdate(android.graphics.PointF point, boolean isMaster)
TooltipBehavior
IChartModifier
instance handle touch move event.onUpdate
in class TooltipBehavior<T extends CursorModifier>
point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.public void onEndUpdate(android.graphics.PointF point, boolean isMaster)
IChartModifier
instance handle touch up event.onEndUpdate
in class TooltipBehavior<T extends CursorModifier>
point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.protected TooltipBehavior.TooltipLayout createTooltipLayout(android.content.Context context)
TooltipBehavior.TooltipLayout
instance.createTooltipLayout
in class TooltipBehavior<T extends CursorModifier>
context
- The context of the application.TooltipBehavior.TooltipLayout
.