public abstract class PieChartModifierBehavior<T extends IPieChartModifier>
extends java.lang.Object
implements com.scichart.core.framework.IAttachable
Modifier and Type | Field and Description |
---|---|
protected android.graphics.PointF |
lastUpdatePoint |
protected T |
modifier |
protected java.lang.Class<T> |
modifierType |
protected ISciPieChartSurface |
parentSurface |
protected com.scichart.core.AttachableServiceContainer |
services |
Modifier | Constructor and Description |
---|---|
protected |
PieChartModifierBehavior(java.lang.Class<T> modifierType)
Creates a new instance of
PieChartModifierBehavior class. |
Modifier and Type | Method and Description |
---|---|
void |
attachTo(com.scichart.core.IServiceContainer services) |
static void |
attachTo(PieChartModifierBehavior behavior,
IPieChartModifier modifier,
boolean isEnabled)
Attaches the
PieChartModifierBehavior instance to the IPieChartModifier instance with isEnabled value passed in. |
void |
clear()
Clears
lastUpdatePoint x and y to NaN values. |
void |
detach() |
boolean |
getIsEnabled()
Gets a value indicating whether the current
PieChartModifierBehavior instance is enabled on the related IPieChartModifier instance. |
boolean |
isAttached() |
protected boolean |
isLastPointValid()
Gets a value indicating whether the
lastUpdatePoint is valid. |
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 |
onIsEnabledChanged(boolean isEnabled)
Called when is enabled has changed.
|
void |
onUpdate(android.graphics.PointF point,
boolean isMaster)
Called when associated
IPieChartModifier instance handle touch move event. |
protected void |
resetLastUpdatePoint()
Resets
lastUpdatePoint x and y to NaN values. |
void |
setIsEnabled(boolean isEnabled)
Sets a value indicating whether the current
PieChartModifierBehavior instance is enabled on the related IPieChartModifier instance. |
protected final java.lang.Class<T extends IPieChartModifier> modifierType
protected final com.scichart.core.AttachableServiceContainer services
protected T extends IPieChartModifier modifier
protected ISciPieChartSurface parentSurface
protected android.graphics.PointF lastUpdatePoint
protected PieChartModifierBehavior(java.lang.Class<T> modifierType)
PieChartModifierBehavior
class.modifierType
- Type of the modifier to which this modifier will be attached.public final boolean getIsEnabled()
PieChartModifierBehavior
instance is enabled on the related IPieChartModifier
instance.PieChartModifierBehavior
instance is enabled.public final void setIsEnabled(boolean isEnabled)
PieChartModifierBehavior
instance is enabled on the related IPieChartModifier
instance.isEnabled
- Enabled or not enabled.protected void onIsEnabledChanged(boolean isEnabled)
isEnabled
- Enabled or not enabled.protected boolean isLastPointValid()
lastUpdatePoint
is valid.lastUpdatePoint
is valid.public void attachTo(@NonNull com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
public final boolean isAttached()
isAttached
in interface com.scichart.core.framework.IAttachable
protected final void resetLastUpdatePoint()
lastUpdatePoint
x and y to NaN values.public void onBeginUpdate(android.graphics.PointF point, boolean isMaster)
IPieChartModifier
instance handle touch down event.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.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.point
- The current touch point.isMaster
- Indicates whether this behavior is called on the master chart.public void clear()
lastUpdatePoint
x and y to NaN values.public static void attachTo(PieChartModifierBehavior behavior, IPieChartModifier modifier, boolean isEnabled)
PieChartModifierBehavior
instance to the IPieChartModifier
instance with isEnabled value passed in.behavior
- The PieChartModifierBehavior
instance which will be attached to the passed in IPieChartModifier
instance.modifier
- The IPieChartModifier
instance to which the passed in PieChartModifierBehavior
instance will be attached.isEnabled
- Value which identifies whether the PieChartModifierBehavior
instance is enabled or not.