Class Interaction
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.annotation.Interaction
-
- All Implemented Interfaces:
IsDefaultsAnnotationInteraction
public final class Interaction extends NativeObjectContainer implements IsDefaultsAnnotationInteraction
Definitions about how the user can interact with chart elements.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionAxis
getAxis()
Returns which directions are used in calculating distances.InteractionMode
getMode()
Returns which the mode to engaged annotations on events.boolean
isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.void
setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.void
setIntersect(boolean intersect)
iftrue
, the only applies when the mouse position intersects an annotation.void
setMode(InteractionMode mode)
Sets which the mode to engaged annotations on events.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
setMode
public void setMode(InteractionMode mode)
Sets which the mode to engaged annotations on events.- Parameters:
mode
- which the mode to engaged annotations on events.
-
getMode
public InteractionMode getMode()
Returns which the mode to engaged annotations on events.- Specified by:
getMode
in interfaceIsDefaultsAnnotationInteraction
- Returns:
- which the mode to engaged annotations on events.
-
setAxis
public void setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.- Parameters:
axis
- define which directions are used in calculating distances.
-
getAxis
public InteractionAxis getAxis()
Returns which directions are used in calculating distances.- Specified by:
getAxis
in interfaceIsDefaultsAnnotationInteraction
- Returns:
- define which directions are used in calculating distances.
-
setIntersect
public void setIntersect(boolean intersect)
iftrue
, the only applies when the mouse position intersects an annotation.- Parameters:
intersect
- iftrue
, the mode only applies when the mouse position intersects an annotation.
-
isIntersect
public boolean isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.- Specified by:
isIntersect
in interfaceIsDefaultsAnnotationInteraction
- Returns:
- if
true
, the mode only applies when the mouse position intersects an item on the chart.
-
-