Class Animations
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Animations
-
- All Implemented Interfaces:
IsDefaultAnimations,IsAnimations
public final class Animations extends Object 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 animation properties for a specific sets of element(like bar, point, arc and line) properties.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnimationCollectioncreate(AnimationCollectionKey collection)Creates an animation collection instance and stores in the animation options.AnimationCollectionget(AnimationCollectionKey collection)Returns an animation collection instance if stored in the animation options.booleanhas(AnimationCollectionKey collection)Returnstrueif an animation collection instance is stored in the animation options.booleanisEnabled(AnimationCollectionKey collection)Returnstrueif the animation collection is enabled, otherwisefalse.voidremove(AnimationCollectionKey collection)Removes an animation collection previously added.voidset(AnimationCollectionKey collection, AnimationCollection animationCollection)Sets an animation collection instance to store in the animation options.voidsetEnabled(AnimationCollectionKey collection, boolean enabled)Enables or disables an animation collection instance in the animation options.
-
-
-
Method Detail
-
setEnabled
public void setEnabled(AnimationCollectionKey collection, boolean enabled)
Enables 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(AnimationCollectionKey collection)
Returnstrueif 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
-
has
public boolean has(AnimationCollectionKey collection)
Returnstrueif an animation collection instance is stored in the animation options.- Specified by:
hasin interfaceIsDefaultAnimations- Parameters:
collection- collection instance used to check in the animation options- Returns:
trueif 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:
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(AnimationCollectionKey collection, AnimationCollection animationCollection)
Sets 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(AnimationCollectionKey collection)
Creates 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
-
remove
public void remove(AnimationCollectionKey collection)
Removes an animation collection previously added.- Specified by:
removein interfaceIsAnimations- Parameters:
collection- collection instance used to remove from animation options
-
-