Class AnnotationCreationModifier
Defines a custom modifier which allows creation of annotation on touch gestures
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class AnnotationCreationModifier extends TouchModifierBase
Constructors
AnnotationCreationModifier()
Declaration
public AnnotationCreationModifier()
Methods
createAnnotation(ISciChartSurface parentSurface, IAnnotationFactory annotationFactory, int annotationType)
Creates an annotation
Declaration
protected IAnnotation createAnnotation(ISciChartSurface parentSurface, IAnnotationFactory annotationFactory, int annotationType)
Parameters
| Type | Name | Description |
|---|---|---|
| ISciChartSurface | parentSurface | |
| IAnnotationFactory | annotationFactory | |
| int | annotationType |
Returns
| Type | Description |
|---|---|
| IAnnotation |
getAnnotationFactory()
Gets the annotation factory which creates new annotations which are used this modifier
Declaration
public final IAnnotationFactory getAnnotationFactory()
Returns
| Type | Description |
|---|---|
| IAnnotationFactory | The current annotation factory |
getAnnotationType()
Gets the type of annotation to create
Declaration
public final int getAnnotationType()
Returns
| Type | Description |
|---|---|
| int | The current annotation type |
getXAxisId()
Gets the xAxis id for annotations created by this modifier
Declaration
public final String getXAxisId()
Returns
| Type | Description |
|---|---|
| String | The current xAxis id |
getYAxisId()
Gets the yAxis id for annotations created by this modifier
Declaration
public final String getYAxisId()
Returns
| Type | Description |
|---|---|
| String | The current yAxis id |
onAnnotationCreated(IAnnotation newAnnotation)
Called when new annotation is created
Declaration
protected final void onAnnotationCreated(IAnnotation newAnnotation)
Parameters
| Type | Name | Description |
|---|---|---|
| IAnnotation | newAnnotation |
onTouchDown(ModifierTouchEventArgs args)
Called when MotionEvent#ACTION_DOWN event occurs
Declaration
protected boolean onTouchDown(ModifierTouchEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ModifierTouchEventArgs | args |
Returns
| Type | Description |
|---|---|
| boolean |
Overrides
onTouchMove(ModifierTouchEventArgs args)
Called when MotionEvent#ACTION_MOVE event occurs
Declaration
protected boolean onTouchMove(ModifierTouchEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ModifierTouchEventArgs | args |
Returns
| Type | Description |
|---|---|
| boolean |
Overrides
onTouchUp(ModifierTouchEventArgs args)
Called when MotionEvent#ACTION_UP event occurs
Declaration
protected boolean onTouchUp(ModifierTouchEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| ModifierTouchEventArgs | args |
Returns
| Type | Description |
|---|---|
| boolean |
Overrides
setAnnotationCreationListener(OnAnnotationCreatedListener listener)
Sets the OnAnnotationCreatedListener instance which is called whenever new annotation is created by this modifier
Declaration
public final void setAnnotationCreationListener(OnAnnotationCreatedListener listener)
Parameters
| Type | Name | Description |
|---|---|---|
| OnAnnotationCreatedListener | listener | The new listener instance |
setAnnotationFactory(IAnnotationFactory annotationFactory)
Sets the annotation factory which creates new annotations which are used this modifier
Declaration
public final void setAnnotationFactory(IAnnotationFactory annotationFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IAnnotationFactory | annotationFactory | The new annotation factory |
setAnnotationType(int annotationType)
Sets the type of annotation to create
Declaration
public final void setAnnotationType(int annotationType)
Parameters
| Type | Name | Description |
|---|---|---|
| int | annotationType | The new annotation type |
setXAxisId(String xAxisId)
Sets the xAxis id for annotations created by this modifier
Declaration
public final void setXAxisId(String xAxisId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | xAxisId | The new xAxis id |
setYAxisId(String yAxisId)
Sets the yAxis id for annotations created by this modifier
Declaration
public final void setYAxisId(String yAxisId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | yAxisId | The new xAxis id |