Class AbstractAnimations
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.options.AbstractAnimations
-
- All Implemented Interfaces:
IsDefaultAnimations,IsAnimations
public abstract class AbstractAnimations extends NativeObjectContainer implements IsAnimations
Abstract configuration to animate 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAnimations(AbstractNode parent, IsDefaultAnimations defaultValues, NativeObject nativeObject)Creates a animations config to use for chart configuration, wrapping a native object instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Key collection)Returnstrueif an animation collection instance is stored in the animation options.AnimationCollectioncreate(Key collection)Creates an animation collection instance and stores in the animation options.voiddelete(Key collection)Removes an animation collection previously added.AnimationCollectionget(Key collection)Returns an animation collection instance if stored in the animation options.booleanisEnabled(Key collection)Returnstrueif the animation collection is enabled, otherwisefalse.voidset(Key collection, AnimationCollection animationCollection)Sets an animation collection instance to store in the animation options.voidsetEnabled(Key collection, boolean enabled)Enables or disables an animation collection instance in the animation options.-
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, 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.options.IsAnimations
create, delete, get, isEnabled, set, setEnabled
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultAnimations
contains
-
-
-
-
Constructor Detail
-
AbstractAnimations
protected AbstractAnimations(AbstractNode parent, IsDefaultAnimations defaultValues, NativeObject nativeObject)
Creates a animations config to use for chart configuration, wrapping a native object instance.- Parameters:
parent- the native object container which animations belongs to.defaultValues- default providernativeObject- native object to map java script properties
-
-
Method Detail
-
contains
public boolean contains(Key collection)
Description copied from interface:IsDefaultAnimationsReturnstrueif an animation collection instance is stored in the animation options.- Specified by:
containsin interfaceIsDefaultAnimations- Parameters:
collection- collection instance used to check in the animation options- Returns:
trueif an animation collection instance is stored in the animation options
-
setEnabled
public void setEnabled(Key collection, boolean enabled)
Description copied from interface:IsAnimationsEnables or disables an animation collection instance in the animation options.- Specified by:
setEnabledin interfaceIsAnimations- Parameters:
collection- collection instance used to check in the animation optionsenabled- iftrueit enables an animation collection
-
isEnabled
public boolean isEnabled(Key collection)
Description copied from interface:IsAnimationsReturnstrueif the animation collection is enabled, otherwisefalse.- Specified by:
isEnabledin interfaceIsAnimations- Parameters:
collection- collection instance used to check in the animation options- Returns:
trueif the animation collection is enabled, otherwisefalse
-
get
public AnimationCollection get(Key collection)
Description copied from interface:IsAnimationsReturns an animation collection instance if stored in the animation options.- Specified by:
getin interfaceIsAnimations- Specified by:
getin interfaceIsDefaultAnimations- Parameters:
collection- collection instance used to get for animation options- Returns:
- an animation collection instance or
nullif does not exists
-
set
public void set(Key collection, AnimationCollection animationCollection)
Description copied from interface:IsAnimationsSets an animation collection instance to store in the animation options.- Specified by:
setin interfaceIsAnimations- Parameters:
collection- collection instance used to get for animation optionsanimationCollection- an animation collection instance to set
-
create
public AnimationCollection create(Key collection)
Description copied from interface:IsAnimationsCreates an animation collection instance and stores in the animation options.- Specified by:
createin interfaceIsAnimations- Parameters:
collection- collection key used to create the animation collections- Returns:
- a collection animation options
-
delete
public void delete(Key collection)
Description copied from interface:IsAnimationsRemoves an animation collection previously added.- Specified by:
deletein interfaceIsAnimations- Parameters:
collection- collection instance used to remove from animation options
-
-