T
- The modifier to which this behavior will be attached.public class TooltipBehavior<T extends IChartModifier> extends TooltipBehaviorBase<T> implements TooltipLayoutHelper.SeriesTooltipCallback<ISeriesTooltip>
IChartModifier
implementors.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. |
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.
|
boolean |
tryUpdateTooltip(ISeriesTooltip seriesTooltip,
float x,
float y)
Tries to update tooltip with latest information for specified (x, y) coordinates on screen
|
protected void |
updateHitTestInfo(HitTestInfo hitTestInfo,
IRenderableSeries rs,
float x,
float y) |
func, getObservableSeries, getSourceMode, getUseInterpolation, isHitPointValid, isSeriesValid, setObservableSeries, setSourceMode, setUseInterpolation
attachTo, getIsEnabled, isAttached, isLastPointValid, onIsEnabledChanged, resetLastUpdatePoint, setIsEnabled
public TooltipBehavior(java.lang.Class<T> modifierType, 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(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>
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>
public boolean tryUpdateTooltip(ISeriesTooltip seriesTooltip, float x, float y)
TooltipLayoutHelper.SeriesTooltipCallback
tryUpdateTooltip
in interface TooltipLayoutHelper.SeriesTooltipCallback<ISeriesTooltip>
seriesTooltip
- The tooltip to updatex
- The x coordinate on screeny
- The y coordinate on screenprotected void updateHitTestInfo(HitTestInfo hitTestInfo, IRenderableSeries rs, float x, float y)