Package org.pepstock.charba.client
Class UpdateConfiguration
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.UpdateConfiguration
-
- All Implemented Interfaces:
IsDefaultAnimation,IsDefaultAnimations,IsDefaultBaseAnimation,IsAnimation,IsAnimations
public final class UpdateConfiguration extends NativeObjectContainer implements IsAnimation, IsAnimations
Object can be provided with additional configuration for the update process.
This is useful when update is manually called inside an event handler and some different animation is desired.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static TransitionKeyUPDATEDefault animation mode key, used for chart updating.
-
Constructor Summary
Constructors Constructor Description UpdateConfiguration()Creates an empty animation mode to use for chart updating.
-
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.intgetDelay()Returns the delay before starting the animations.DelayCallbackgetDelayCallback()Returns the callback to set the delay before starting the animations.intgetDuration()Returns the number of milliseconds an animation takes.DurationCallbackgetDurationCallback()Returns the callback to set the number of milliseconds an animation takes.EasinggetEasing()Returns the animation easing.EasingCallbackgetEasingCallback()Returns the callback to set the animation easing.LoopCallbackgetLoopCallback()Returns the callback to loop the animations endlessly.booleanhas(AnimationCollectionKey collection)Returnstrueif an animation collection instance is stored in the animation options.booleanisAnimateRotate()Iftrue, the chart will animate in with a rotation animation.booleanisAnimateScale()Iftrue, will animate scaling the chart from the center outwards.booleanisEnabled(AnimationCollectionKey collection)Returnstrueif the animation collection is enabled, otherwisefalse.booleanisLoop()If set totrue, loops the animations endlessly.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.voidsetAnimateRotate(boolean animateRotate)Iftrue, the chart will animate in with a rotation animation.voidsetAnimateScale(boolean animateScale)Iftrue, will animate scaling the chart from the center outwards.voidsetDelay(int delay)Sets the delay before starting the animations.voidsetDelay(DelayCallback delayCallback)Sets the delay before starting the animations by a callback.voidsetDelay(NativeCallback delayCallback)Sets the delay before starting the animations by a callback.voidsetDuration(int milliseconds)Sets the number of milliseconds an animation takes.voidsetDuration(DurationCallback durationCallback)Sets the number of milliseconds an animation takes by a callback.voidsetDuration(NativeCallback durationCallback)Sets the number of milliseconds an animation takes by a callback.voidsetEasing(EasingCallback easingCallback)Sets the animation easing by a callback.voidsetEasing(NativeCallback easingCallback)Sets the animation easing by a callback.voidsetEasing(Easing easing)Sets the animation easing.voidsetEnabled(AnimationCollectionKey collection, boolean enabled)Enables or disables an animation collection instance in the animation options.voidsetLoop(boolean loop)If set totrue, loops the animations endlessly.voidsetLoop(LoopCallback loopCallback)Sets to loop the animations endlessly by a callback.voidsetLoop(NativeCallback loopCallback)Sets to loop the animations endlessly by a callback.-
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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
UPDATE
public static final TransitionKey UPDATE
Default animation mode key, used for chart updating.
-
-
Method Detail
-
setEasing
public void setEasing(Easing easing)
Sets the animation easing.- Specified by:
setEasingin interfaceIsAnimation- Parameters:
easing- animation easing.
-
getEasing
public Easing getEasing()
Returns the animation easing.- Specified by:
getEasingin interfaceIsDefaultBaseAnimation- Returns:
- animation easing.
-
setDuration
public void setDuration(int milliseconds)
Sets the number of milliseconds an animation takes.- Specified by:
setDurationin interfaceIsAnimation- Parameters:
milliseconds- the number of milliseconds an animation takes.
-
getDuration
public int getDuration()
Returns the number of milliseconds an animation takes.- Specified by:
getDurationin interfaceIsDefaultBaseAnimation- Returns:
- the number of milliseconds an animation takes.
-
setDelay
public void setDelay(int delay)
Sets the delay before starting the animations.- Specified by:
setDelayin interfaceIsAnimation- Parameters:
delay- the delay before starting the animations
-
getDelay
public int getDelay()
Returns the delay before starting the animations.- Specified by:
getDelayin interfaceIsDefaultBaseAnimation- Returns:
- the delay before starting the animations
-
setLoop
public void setLoop(boolean loop)
If set totrue, loops the animations endlessly.- Specified by:
setLoopin interfaceIsAnimation- Parameters:
loop-trueif loops the animations endlessly.
-
isLoop
public boolean isLoop()
If set totrue, loops the animations endlessly.- Specified by:
isLoopin interfaceIsDefaultBaseAnimation- Returns:
trueif loops the animations endlessly.
-
setAnimateRotate
public void setAnimateRotate(boolean animateRotate)
Iftrue, the chart will animate in with a rotation animation.- Specified by:
setAnimateRotatein interfaceIsAnimation- Parameters:
animateRotate- Iftrue, the chart will animate in with a rotation animation.
-
isAnimateRotate
public boolean isAnimateRotate()
Iftrue, the chart will animate in with a rotation animation.- Specified by:
isAnimateRotatein interfaceIsDefaultAnimation- Returns:
- if
true, the chart will animate in with a rotation animation.
-
setAnimateScale
public void setAnimateScale(boolean animateScale)
Iftrue, will animate scaling the chart from the center outwards.- Specified by:
setAnimateScalein interfaceIsAnimation- Parameters:
animateScale- Iftrue, will animate scaling the chart from the center outwards.
-
isAnimateScale
public boolean isAnimateScale()
Iftrue, will animate scaling the chart from the center outwards.- Specified by:
isAnimateScalein interfaceIsDefaultAnimation- Returns:
- If
true, will animate scaling the chart from the center outwards.
-
getDurationCallback
public DurationCallback getDurationCallback()
Description copied from interface:IsDefaultBaseAnimationReturns the callback to set the number of milliseconds an animation takes.- Specified by:
getDurationCallbackin interfaceIsDefaultBaseAnimation- Returns:
- the callback instance to use
-
getDelayCallback
public DelayCallback getDelayCallback()
Description copied from interface:IsDefaultBaseAnimationReturns the callback to set the delay before starting the animations.- Specified by:
getDelayCallbackin interfaceIsDefaultBaseAnimation- Returns:
- the callback instance to use
-
getLoopCallback
public LoopCallback getLoopCallback()
Description copied from interface:IsDefaultBaseAnimationReturns the callback to loop the animations endlessly.- Specified by:
getLoopCallbackin interfaceIsDefaultBaseAnimation- Returns:
- the callback instance to use
-
getEasingCallback
public EasingCallback getEasingCallback()
Description copied from interface:IsDefaultBaseAnimationReturns the callback to set the animation easing.- Specified by:
getEasingCallbackin interfaceIsDefaultBaseAnimation- Returns:
- the callback instance to use
-
setDuration
public void setDuration(DurationCallback durationCallback)
Description copied from interface:IsAnimationSets the number of milliseconds an animation takes by a callback.- Specified by:
setDurationin interfaceIsAnimation- Parameters:
durationCallback- the callback instance to use
-
setDelay
public void setDelay(DelayCallback delayCallback)
Description copied from interface:IsAnimationSets the delay before starting the animations by a callback.- Specified by:
setDelayin interfaceIsAnimation- Parameters:
delayCallback- the callback instance to use
-
setLoop
public void setLoop(LoopCallback loopCallback)
Description copied from interface:IsAnimationSets to loop the animations endlessly by a callback.- Specified by:
setLoopin interfaceIsAnimation- Parameters:
loopCallback- the callback instance to use
-
setEasing
public void setEasing(EasingCallback easingCallback)
Description copied from interface:IsAnimationSets the animation easing by a callback.- Specified by:
setEasingin interfaceIsAnimation- Parameters:
easingCallback- the callback instance to use
-
setDuration
public void setDuration(NativeCallback durationCallback)
Description copied from interface:IsAnimationSets the number of milliseconds an animation takes by a callback.- Specified by:
setDurationin interfaceIsAnimation- Parameters:
durationCallback- the callback instance to use
-
setDelay
public void setDelay(NativeCallback delayCallback)
Description copied from interface:IsAnimationSets the delay before starting the animations by a callback.- Specified by:
setDelayin interfaceIsAnimation- Parameters:
delayCallback- the callback instance to use
-
setLoop
public void setLoop(NativeCallback loopCallback)
Description copied from interface:IsAnimationSets to loop the animations endlessly by a callback.- Specified by:
setLoopin interfaceIsAnimation- Parameters:
loopCallback- the callback instance to use
-
setEasing
public void setEasing(NativeCallback easingCallback)
Description copied from interface:IsAnimationSets the animation easing by a callback.- Specified by:
setEasingin interfaceIsAnimation- Parameters:
easingCallback- the callback instance to use
-
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
-
-