T
- The modifier to which this behavior will be attached.public class TooltipBehavior<T extends IChartModifier> extends TooltipBehaviorBase<T>
IChartModifier
implementors.Modifier and Type | Class and Description |
---|---|
protected static class |
TooltipBehavior.TooltipLayout
Defines layout which is stretched to the
IChartModifierSurface size and used for hosting all tooltips and place them properly. |
CURSOR_XY_OFFSET
lastUpdatePoint, modifier, modifierType, parentSurface, services
Constructor and Description |
---|
TooltipBehavior(java.lang.Class<T> modifierType,
int tooltipContainerLayoutResId)
Creates a new instance of
TooltipBehaviorBase class |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
clear()
Clears
ModifierBehavior.lastUpdatePoint x and y to NaN values. |
protected ITooltipContainer |
createTooltip(android.content.Context context)
Create new
ITooltipContainer instance. |
protected TooltipBehavior.TooltipLayout |
createTooltipLayout(android.content.Context context)
Create new
TooltipBehavior.TooltipLayout instance. |
void |
detach() |
TooltipPosition |
getTooltipPosition()
Gets the position of the tooltip related to the current touch point.
|
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. |
protected void |
onObservableSeriesDrasticallyChanged()
Called when the
TooltipBehaviorBase.observableSeries has drastically changed. |
void |
onUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IChartModifier instance handle touch move event. |
void |
setTooltipPosition(TooltipPosition tooltipPosition)
Sets the position of the tooltip related to the current touch point.
|
protected void |
updateTooltip(com.scichart.core.common.Action2<IRenderableSeries,HitTestInfo> hitTestMethod)
Update tooltips if the renderable series and new point is valid according to the new hitTestMethod.
|
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.
|
func, getObservableSeries, getSourceMode, getUseInterpolation, isHitPointValid, isSeriesValid, setObservableSeries, setSourceMode, setUseInterpolation
attachTo, getIsEnabled, isAttached, isLastPointValid, onIsEnabledChanged, resetLastUpdatePoint, setIsEnabled
public TooltipBehavior(java.lang.Class<T> modifierType, @LayoutRes int tooltipContainerLayoutResId)
TooltipBehaviorBase
classmodifierType
- The type of the associated IChartModifier
tooltipContainerLayoutResId
- The layout resource id which will be used to inflate tooltip container.public TooltipPosition getTooltipPosition()
TooltipPosition
related to the current touch point.public void setTooltipPosition(TooltipPosition tooltipPosition)
tooltipPosition
- The TooltipPosition
related to the current touch point.protected void onObservableSeriesDrasticallyChanged()
TooltipBehaviorBase.observableSeries
has drastically changed.onObservableSeriesDrasticallyChanged
in class TooltipBehaviorBase<T extends IChartModifier>
public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class ModifierBehavior<T extends IChartModifier>
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class ModifierBehavior<T extends IChartModifier>
protected TooltipBehavior.TooltipLayout createTooltipLayout(android.content.Context context)
TooltipBehavior.TooltipLayout
instance.context
- The context of the application.TooltipBehavior.TooltipLayout
.protected ITooltipContainer createTooltip(android.content.Context context)
ITooltipContainer
instance.context
- The context of the application.ITooltipContainer
.public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
applyThemeProvider
in class ModifierBehavior<T extends IChartModifier>
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void onBeginUpdate(android.graphics.PointF point, boolean isMaster)
IChartModifier
instance handle touch down event.onBeginUpdate
in class ModifierBehavior<T extends IChartModifier>
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)
IChartModifier
instance handle touch move event.onUpdate
in class ModifierBehavior<T extends IChartModifier>
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 ModifierBehavior<T extends IChartModifier>
point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.public void clear()
ModifierBehavior.lastUpdatePoint
x and y to NaN values.clear
in class ModifierBehavior<T extends IChartModifier>
protected void updateTooltip(float x, float y)
x
- The x value of the point.y
- The x value of the point.protected final void updateTooltip(com.scichart.core.common.Action2<IRenderableSeries,HitTestInfo> hitTestMethod)
hitTestMethod
- The Action2
to perform hit test.