public final class AnnotationOptions extends AbstractPluginOptions
AnnotationPlugin.ID
plugin options where to set all configuration items needed to the plugin.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DOUBLE_CLICK_SPEED
Default double click speed in milliseconds, 350.
|
static DrawTime |
DEFAULT_DRAW_TIME
Default draw time,
DrawTime.AFTER_DATASETS_DRAW . |
Constructor and Description |
---|
AnnotationOptions()
Creates new
AnnotationPlugin.ID plugin options. |
AnnotationOptions(IsChart chart)
Creates new
AnnotationPlugin.ID plugin options, relating to chart instance for default. |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotations(AbstractAnnotation... annotations)
Adds an annotations for plugin.
|
protected void |
applyingDefaults()
This is invoked before storing the plugins options as default.
|
AbstractAnnotation |
getAnnotation(AnnotationId id)
Returns the annotation with the id passed as argument or
null if not exist. |
AbstractAnnotation |
getAnnotation(String id)
Returns the annotation with the id passed as argument or
null if not exist. |
List<AbstractAnnotation> |
getAnnotations()
Returns the collection of annotations.
|
int |
getDoubleClickSpeed()
Returns the double-click speed in milliseconds used to distinguish single-clicks from double-clicks whenever you need to capture both.
|
DrawTime |
getDrawTime()
Returns the draw time which defines when the annotations are drawn.
|
boolean |
hasAnnotation(AnnotationId id)
Returns
true if the annotation with the id passed as argument exists. |
boolean |
hasAnnotation(String id)
Returns
true if the annotation with the id passed as argument exists. |
void |
removeAnnotation(AnnotationId id)
Removes the annotation by the id passed as argument, if exists.
|
void |
removeAnnotation(String id)
Removes the annotation by the id passed as argument, if exists.
|
void |
setAnnotations(AbstractAnnotation... annotations)
Sets a set of annotations for plugin.
|
void |
setDoubleClickSpeed(int speed)
Sets the double-click speed in milliseconds used to distinguish single-clicks from double-clicks whenever you need to capture both.
|
void |
setDrawTime(DrawTime drawTime)
Sets the draw time which defines when the annotations are drawn.
|
applyingDefaults, getEvents, getId, getPluginId, loadGlobalsPluginOptions, setEvents, setEvents, store, store, store, store
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final int DEFAULT_DOUBLE_CLICK_SPEED
public static final DrawTime DEFAULT_DRAW_TIME
DrawTime.AFTER_DATASETS_DRAW
.public AnnotationOptions()
AnnotationPlugin.ID
plugin options.public AnnotationOptions(IsChart chart)
AnnotationPlugin.ID
plugin options, relating to chart instance for default.chart
- chart instance related to the plugin optionsprotected void applyingDefaults()
AbstractPluginOptions
applyingDefaults
in class AbstractPluginOptions
public void setDrawTime(DrawTime drawTime)
drawTime
- the draw time which defines when the annotations are drawnpublic DrawTime getDrawTime()
public void setDoubleClickSpeed(int speed)
speed
- the double-click speed in millisecondspublic int getDoubleClickSpeed()
public boolean hasAnnotation(String id)
true
if the annotation with the id passed as argument exists.id
- annotation id to checktrue
if the annotation with the id passed as argument existspublic boolean hasAnnotation(AnnotationId id)
true
if the annotation with the id passed as argument exists.id
- annotation id to checktrue
if the annotation with the id passed as argument existspublic void removeAnnotation(String id)
id
- annotation id to checkpublic void removeAnnotation(AnnotationId id)
id
- annotation id to checkpublic void addAnnotations(AbstractAnnotation... annotations)
annotations
- set of annotations.public void setAnnotations(AbstractAnnotation... annotations)
null
, removes all annotations.annotations
- set of annotations. If null
, removes all annotationspublic List<AbstractAnnotation> getAnnotations()
public AbstractAnnotation getAnnotation(String id)
null
if not exist.id
- annotation id to use to retrieve the annotationnull
if not existpublic AbstractAnnotation getAnnotation(AnnotationId id)
null
if not exist.id
- annotation id to checknull
if not exist