Package org.pepstock.charba.client.items
Class InteractionOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.InteractionOptions
-
- All Implemented Interfaces:
IsDefaultInteraction
public final class InteractionOptions extends NativeObjectContainer implements IsDefaultInteraction
Definitions about how the interaction with events will be applied on chart elements.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description InteractionOptions()
Creates an interaction item with defaults.InteractionOptions(IsInteractionMode mode)
Creates an interaction item with passed mode and all other configuration as defaults.InteractionOptions(IsInteractionMode mode, boolean intersect)
Creates an interaction item with passed mode and intersect and all other configuration as defaults.InteractionOptions(IsInteractionMode mode, boolean intersect, InteractionAxis axis)
Creates an interaction item with all passed arguments.InteractionOptions(InteractionEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionAxis
getAxis()
Returns which directions are used in calculating distances.IsInteractionMode
getMode()
Returns which elements appear in the interaction.boolean
isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.boolean
isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.NativeObject
nativeObject()
Returns the native object instance.void
setAxis(InteractionAxis axis)
Sets which directions are used in calculating distances.void
setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.void
setIntersect(boolean intersect)
iftrue
, the mode only applies when the mouse position intersects an item on the chart.void
setMode(String name)
Sets which elements appear in the interaction.void
setMode(IsInteractionMode mode)
Sets which elements appear in the interaction.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultInteraction
create
-
-
-
-
Constructor Detail
-
InteractionOptions
public InteractionOptions()
Creates an interaction item with defaults.
-
InteractionOptions
public InteractionOptions(IsInteractionMode mode)
Creates an interaction item with passed mode and all other configuration as defaults.- Parameters:
mode
- how the event will be apply on elements
-
InteractionOptions
public InteractionOptions(IsInteractionMode mode, boolean intersect)
Creates an interaction item with passed mode and intersect and all other configuration as defaults.- Parameters:
mode
- how the event will be apply on elementsintersect
- iftrue
, the mode only applies when the mouse position intersects an element on the chart.
-
InteractionOptions
public InteractionOptions(IsInteractionMode mode, boolean intersect, InteractionAxis axis)
Creates an interaction item with all passed arguments.- Parameters:
mode
- how to interact with the elements on charts.intersect
- iftrue
, the mode only applies when the mouse position intersects an element on the chart.axis
- which directions are used in calculating distances.
-
InteractionOptions
public InteractionOptions(InteractionEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.- Parameters:
envelop
- envelop with the native object instance to be wrapped.
-
-
Method Detail
-
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 interfaceIsDefaultInteraction
- Returns:
- define which directions are used in calculating distances.
-
setIncludeInvisible
public void setIncludeInvisible(boolean includeInvisible)
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Parameters:
includeInvisible
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
isIncludeInvisible
public boolean isIncludeInvisible()
If true, the invisible points that are outside of the chart area will also be included when evaluating interactions.- Specified by:
isIncludeInvisible
in interfaceIsDefaultInteraction
- Returns:
- if true, the invisible points that are outside of the chart area will also be included when evaluating interactions.
-
setMode
public void setMode(IsInteractionMode mode)
Sets which elements appear in the interaction.- Parameters:
mode
- which elements appear in the interaction.
-
setMode
public void setMode(String name)
Sets which elements appear in the interaction.- Parameters:
name
- which elements appear in the interaction.
-
getMode
public IsInteractionMode getMode()
Returns which elements appear in the interaction.- Specified by:
getMode
in interfaceIsDefaultInteraction
- Returns:
- which elements appear in the interaction.
-
setIntersect
public void setIntersect(boolean intersect)
iftrue
, the mode only applies when the mouse position intersects an item on the chart.- Parameters:
intersect
- iftrue
, the mode only applies when the mouse position intersects an item on the chart.
-
isIntersect
public boolean isIntersect()
iftrue
, the mode only applies when the mouse position intersects an item on the chart.- Specified by:
isIntersect
in interfaceIsDefaultInteraction
- Returns:
- if
true
, the mode only applies when the mouse position intersects an item on the chart.
-
nativeObject
public NativeObject nativeObject()
Returns the native object instance.- Returns:
- the native object instance.
-
-