T
- The modifier to which this behavior will be attached.public class PieChartTooltipBehavior<T extends IPieChartModifier> extends PieChartTooltipBehaviorBase<T>
IPieChartModifier
implementors.Modifier and Type | Class and Description |
---|---|
protected static class |
PieChartTooltipBehavior.PieChartTooltipLayout
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 |
---|
PieChartTooltipBehavior(java.lang.Class<T> modifierType,
int tooltipContainerLayoutResId)
Creates a new instance of
PieChartTooltipBehavior class |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
void |
clear()
Clears
PieChartModifierBehavior.lastUpdatePoint x and y to NaN values. |
protected ITooltipContainer |
createTooltip(android.content.Context context)
Create new
ITooltipContainer instance. |
protected PieChartTooltipBehavior.PieChartTooltipLayout |
createTooltipLayout(android.content.Context context)
Create new
PieChartTooltipBehavior.PieChartTooltipLayout 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
IPieChartModifier instance handle touch down event. |
void |
onEndUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IPieChartModifier instance handle touch up event. |
protected void |
onObservableSeriesDrasticallyChanged()
Called when the
PieChartTooltipBehaviorBase.observableSeries has drastically changed. |
void |
onUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IPieChartModifier 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<IPieRenderableSeries,PieHitTestInfo> 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, isHitPointValid, isSeriesValid, setObservableSeries, setSourceMode
attachTo, getIsEnabled, isAttached, isLastPointValid, onIsEnabledChanged, resetLastUpdatePoint, setIsEnabled
public PieChartTooltipBehavior(java.lang.Class<T> modifierType, @LayoutRes int tooltipContainerLayoutResId)
PieChartTooltipBehavior
classmodifierType
- The type of the associated IPieChartModifier
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()
PieChartTooltipBehaviorBase.observableSeries
has drastically changed.onObservableSeriesDrasticallyChanged
in class PieChartTooltipBehaviorBase<T extends IPieChartModifier>
public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class PieChartModifierBehavior<T extends IPieChartModifier>
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class PieChartModifierBehavior<T extends IPieChartModifier>
protected PieChartTooltipBehavior.PieChartTooltipLayout createTooltipLayout(android.content.Context context)
PieChartTooltipBehavior.PieChartTooltipLayout
instance.context
- The context of the application.PieChartTooltipBehavior.PieChartTooltipLayout
.protected ITooltipContainer createTooltip(android.content.Context context)
ITooltipContainer
instance.context
- The context of the application.ITooltipContainer
.public void onBeginUpdate(android.graphics.PointF point, boolean isMaster)
IPieChartModifier
instance handle touch down event.onBeginUpdate
in class PieChartModifierBehavior<T extends IPieChartModifier>
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)
IPieChartModifier
instance handle touch move event.onUpdate
in class PieChartModifierBehavior<T extends IPieChartModifier>
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)
IPieChartModifier
instance handle touch up event.onEndUpdate
in class PieChartModifierBehavior<T extends IPieChartModifier>
point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.public void clear()
PieChartModifierBehavior.lastUpdatePoint
x and y to NaN values.clear
in class PieChartModifierBehavior<T extends IPieChartModifier>
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<IPieRenderableSeries,PieHitTestInfo> hitTestMethod)
hitTestMethod
- The Action2
to perform hit test.