Class Animations
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.Animations
-
- All Implemented Interfaces:
IsDefaultAnimations
,IsAnimations
public final class Animations extends AbstractNode implements IsAnimations
It animates charts out of the box.
A number of options are provided to configure how the animation looks and how long it takes.
This configuration item is configuring the common animations properties, ANIMATIONS name space.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnimationCollection
create(AnimationCollectionKey collection)
Creates an animation collection instance and stores in the animation options.AnimationCollection
get(AnimationCollectionKey collection)
Returns an animation collection instance if stored in the animation options.boolean
has(AnimationCollectionKey collection)
Returnstrue
if an animation collection instance is stored in the animation options.boolean
isEnabled(AnimationCollectionKey collection)
Returnstrue
if the animation collection is enabled, otherwisefalse
.void
remove(AnimationCollectionKey collection)
Removes an animation collection previously added.void
set(AnimationCollectionKey collection, AnimationCollection animationCollection)
Sets an animation collection instance to store in the animation options.void
setEnabled(AnimationCollectionKey collection, boolean enabled)
Enables or disables an animation collection instance in the animation options.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
-
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, 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
-
setEnabled
public void setEnabled(AnimationCollectionKey collection, boolean enabled)
Enables or disables an animation collection instance in the animation options.- Specified by:
setEnabled
in interfaceIsAnimations
- Parameters:
collection
- collection instance used to check in the animation optionsenabled
- iftrue
it enables an animation collection
-
isEnabled
public boolean isEnabled(AnimationCollectionKey collection)
Returnstrue
if the animation collection is enabled, otherwisefalse
.- Specified by:
isEnabled
in interfaceIsAnimations
- Parameters:
collection
- collection instance used to check in the animation options- Returns:
true
if the animation collection is enabled, otherwisefalse
-
has
public boolean has(AnimationCollectionKey collection)
Returnstrue
if an animation collection instance is stored in the animation options.- Specified by:
has
in interfaceIsDefaultAnimations
- Parameters:
collection
- collection instance used to check in the animation options- Returns:
true
if an animation collection instance is stored in the animation options
-
get
public AnimationCollection get(AnimationCollectionKey collection)
Returns an animation collection instance if stored in the animation options.- Specified by:
get
in interfaceIsAnimations
- Specified by:
get
in interfaceIsDefaultAnimations
- Parameters:
collection
- collection instance used to get for animation options- Returns:
- an animation collection instance or
null
if does not exists
-
set
public void set(AnimationCollectionKey collection, AnimationCollection animationCollection)
Sets an animation collection instance to store in the animation options.- Specified by:
set
in interfaceIsAnimations
- Parameters:
collection
- collection instance used to get for animation optionsanimationCollection
- an animation collection instance to set
-
create
public AnimationCollection create(AnimationCollectionKey collection)
Creates an animation collection instance and stores in the animation options.- Specified by:
create
in interfaceIsAnimations
- Parameters:
collection
- collection key used to create the animation collections- Returns:
- a collection animation options
-
remove
public void remove(AnimationCollectionKey collection)
Removes an animation collection previously added.- Specified by:
remove
in interfaceIsAnimations
- Parameters:
collection
- collection instance used to remove from animation options
-
-