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 protected
AbstractAnimations(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 boolean
contains(Key collection)
Returnstrue
if an animation collection instance is stored in the animation options.AnimationCollection
create(Key collection)
Creates an animation collection instance and stores in the animation options.void
delete(Key collection)
Removes an animation collection previously added.AnimationCollection
get(Key collection)
Returns an animation collection instance if stored in the animation options.boolean
isEnabled(Key collection)
Returnstrue
if the animation collection is enabled, otherwisefalse
.void
set(Key collection, AnimationCollection animationCollection)
Sets an animation collection instance to store in the animation options.void
setEnabled(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:IsDefaultAnimations
Returnstrue
if an animation collection instance is stored in the animation options.- Specified by:
contains
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
-
setEnabled
public void setEnabled(Key collection, boolean enabled)
Description copied from interface:IsAnimations
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(Key collection)
Description copied from interface:IsAnimations
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
-
get
public AnimationCollection get(Key collection)
Description copied from interface:IsAnimations
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(Key collection, AnimationCollection animationCollection)
Description copied from interface:IsAnimations
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(Key collection)
Description copied from interface:IsAnimations
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
-
delete
public void delete(Key collection)
Description copied from interface:IsAnimations
Removes an animation collection previously added.- Specified by:
delete
in interfaceIsAnimations
- Parameters:
collection
- collection instance used to remove from animation options
-
-