Class Transitions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.Transitions
-
- All Implemented Interfaces:
HasCallbackScope
,IsDefaultTransitions
,IsTransitions
public final class Transitions extends AbstractNode implements IsTransitions, HasCallbackScope
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 transitions properties, TRANSITIONS name space.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnimationTransition
create(TransitionKey transition)
Creates an animation transition instance and stores in the animation options.AnimationTransition
get(TransitionKey transition)
Returns an animation transition instance if stored in the animation options.String
getScope()
Returns the scope of the options, which is the options are used for defaults, chart defaults or chart.boolean
has(TransitionKey transition)
Returnstrue
if an animation transition instance is stored in the animation options.void
remove(TransitionKey transition)
Removes an animation transition previously added.void
set(TransitionKey transition, AnimationTransition animationTransition)
Sets an animation transition instance to store in the animation options.-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getScope
public String getScope()
Description copied from interface:HasCallbackScope
Returns the scope of the options, which is the options are used for defaults, chart defaults or chart.- Specified by:
getScope
in interfaceHasCallbackScope
- Returns:
- the scope of the options
-
has
public boolean has(TransitionKey transition)
Returnstrue
if an animation transition instance is stored in the animation options.- Specified by:
has
in interfaceIsDefaultTransitions
- Parameters:
transition
- transition instance used to check in the animation options- Returns:
true
if an animation transition instance is stored in the animation options
-
get
public AnimationTransition get(TransitionKey transition)
Returns an animation transition instance if stored in the animation options.- Specified by:
get
in interfaceIsDefaultTransitions
- Specified by:
get
in interfaceIsTransitions
- Parameters:
transition
- transition instance used to get for animation options- Returns:
- an animation transition instance or
null
if does not exists
-
set
public void set(TransitionKey transition, AnimationTransition animationTransition)
Sets an animation transition instance to store in the animation options.- Specified by:
set
in interfaceIsTransitions
- Parameters:
transition
- transition instance used to get for animation optionsanimationTransition
- an animation transition instance to set
-
create
public AnimationTransition create(TransitionKey transition)
Creates an animation transition instance and stores in the animation options.- Specified by:
create
in interfaceIsTransitions
- Parameters:
transition
- transition key used to create the animation transitions- Returns:
- a transition animation options
-
remove
public void remove(TransitionKey transition)
Removes an animation transition previously added.- Specified by:
remove
in interfaceIsTransitions
- Parameters:
transition
- transition instance used to remove from animation options
-
-