Class ModifierBehavior<T>
Defines a base class with behavior for IChartModifierCore implementors.
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class ModifierBehavior<T> implements IAttachable, IThemeable
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
ModifierBehavior(Class<T> modifierType)
Creates a new instance of ModifierBehavior class.
Declaration
protected ModifierBehavior(Class<T> modifierType)
Parameters
| Type | Name | Description |
|---|---|---|
| Class<T> | modifierType | Type of the modifier to which this modifier will be attached. |
Fields
lastUpdatePoint
Declaration
protected PointF lastUpdatePoint
Field Value
| Type | Description |
|---|---|
| android.graphics.PointF |
modifier
Declaration
protected T modifier
Field Value
| Type | Description |
|---|---|
| T |
modifierType
Declaration
protected final Class<T> modifierType
Field Value
| Type | Description |
|---|---|
| Class<T> |
parentSurface
Declaration
protected ISciChartSurfaceBase parentSurface
Field Value
| Type | Description |
|---|---|
| ISciChartSurfaceBase |
services
Declaration
protected final AttachableServiceContainer services
Field Value
| Type | Description |
|---|---|
| AttachableServiceContainer |
Methods
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
Declaration
public void applyThemeProvider(IThemeProvider themeProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| IThemeProvider | themeProvider |
attachTo(ModifierBehavior behavior, IChartModifierCore modifier, boolean isEnabled)
Attaches the ModifierBehavior instance to the IChartModifierCore instance with isEnabled value passed in.
Declaration
public static void attachTo(ModifierBehavior behavior, IChartModifierCore modifier, boolean isEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| behavior | The ModifierBehavior instance which will be attached to the passed in IChartModifierCore instance. |
|
| IChartModifierCore | modifier | The IChartModifierCore instance to which the passed in ModifierBehavior instance will be attached. |
| boolean | isEnabled | Value which identifies whether the ModifierBehavior instance is enabled or not. |
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceContainer | services |
clear()
Clears ModifierBehavior#lastUpdatePoint x and y to NaN values.
Declaration
public void clear()
detach()
Declaration
public void detach()
getIsEnabled()
Gets a value indicating whether the current ModifierBehavior instance is enabled on the related IChartModifier instance.
Declaration
public final boolean getIsEnabled()
Returns
| Type | Description |
|---|---|
| boolean | True if the current ModifierBehavior instance is enabled. |
isAttached()
Declaration
public final boolean isAttached()
Returns
| Type | Description |
|---|---|
| boolean |
isLastPointValid()
Gets a value indicating whether the ModifierBehavior#lastUpdatePoint is valid.
Declaration
protected boolean isLastPointValid()
Returns
| Type | Description |
|---|---|
| boolean | True if ModifierBehavior#lastUpdatePoint is valid. |
onBeginUpdate(PointF point, boolean isMaster)
Called when associated IChartModifier instance handle touch down event.
Declaration
public void onBeginUpdate(PointF point, boolean isMaster)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.PointF | point | The current touch point. |
| boolean | isMaster | Indicates whether this behavior is called on the master chart. |
onEndUpdate(PointF point, boolean isMaster)
Called when associated IChartModifier instance handle touch up event.
Declaration
public void onEndUpdate(PointF point, boolean isMaster)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.PointF | point | The current touch point. |
| boolean | isMaster | Indicates whether this behavior is called on the master chart. |
onIsEnabledChanged(boolean isEnabled)
Called when is enabled has changed.
Declaration
protected void onIsEnabledChanged(boolean isEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| boolean | isEnabled | Enabled or not enabled. |
onUpdate(PointF point, boolean isMaster)
Called when associated IChartModifier instance handle touch move event.
Declaration
public void onUpdate(PointF point, boolean isMaster)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.PointF | point | The current touch point. |
| boolean | isMaster | Indicates whether this behavior is called on the master chart. |
resetLastUpdatePoint()
Resets ModifierBehavior#lastUpdatePoint x and y to NaN values.
Declaration
protected final void resetLastUpdatePoint()
setIsEnabled(boolean isEnabled)
Sets a value indicating whether the current ModifierBehavior instance is enabled on the related IChartModifier instance.
Declaration
public final void setIsEnabled(boolean isEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| boolean | isEnabled | Enabled or not enabled. |