Class AnimationCollection
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AnimationCollection
-
- All Implemented Interfaces:
HasCallbackScope
,IsDefaultAnimationCollection
,IsDefaultBaseAnimation
public final class AnimationCollection extends AbstractNode implements IsDefaultAnimationCollection
Is the base animation options with common properties for animation properties (property and collections of properties).- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected D
getDefaultValues()
Returns the default values.int
getDelay()
Returns the delay before starting the animations.DelayCallback
getDelayCallback()
Returns the callback to set the delay before starting the animations.int
getDuration()
Returns the number of milliseconds an animation takes.DurationCallback
getDurationCallback()
Returns the callback to set the number of milliseconds an animation takes.Easing
getEasing()
Returns the animation easing.EasingCallback
getEasingCallback()
Returns the callback to set the animation easing.double
getFrom()
Returns the start value for the animation as number.boolean
getFromAsBoolean()
Returns the start value for the animation as number.IsColor
getFromAsColor()
Returns the start value for the animation as color.String
getFromAsString()
Returns the start value for the animation as color string.FromCallback
getFromCallback()
Returns the callback to set the start value for the animation.LoopCallback
getLoopCallback()
Returns the callback to loop the animations endlessly.List<AnimationPropertyKey>
getProperties()
Returns the properties defined in the animation collection.String
getScope()
Returns the scope of the options, which is the options are used for defaults, chart defaults or chart.double
getTo()
Returns the end value for the animation as number.boolean
getToAsBoolean()
Returns the end value for the animation as number.IsColor
getToAsColor()
Returns the end value for the animation as color.String
getToAsString()
Returns the end value for the animation as color string.ToCallback
getToCallback()
Returns the callback to set the end value for the animation.AnimationType
getType()
Returns the type offrom
property and determines the interpolator used.boolean
isLoop()
If set totrue
, loops the animations endlessly.void
setDelay(int delay)
Sets the delay before starting the animations.void
setDelay(DelayCallback delayCallback)
Sets the delay before starting the animations by a callback.void
setDelay(NativeCallback delayCallback)
Sets the delay before starting the animations by a callback.void
setDuration(int milliseconds)
Sets the number of milliseconds an animation takes.void
setDuration(DurationCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.void
setDuration(NativeCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.void
setEasing(EasingCallback easingCallback)
Sets the animation easing by a callback.void
setEasing(NativeCallback easingCallback)
Sets the animation easing by a callback.void
setEasing(Easing easing)
Sets the animation easing.void
setFrom(boolean from)
Sets the end value for the animation as number.void
setFrom(double from)
Sets the start value for the animation as number.void
setFrom(String from)
Sets the start value for the animation as color string.void
setFrom(FromCallback fromCallback)
Sets the start value for the animation by a callback.void
setFrom(NativeCallback fromCallback)
Sets the start value for the animation by a callback.void
setFrom(IsColor from)
Sets the start value for the animation as color.void
setLoop(boolean loop)
If set totrue
, loops the animations endlessly.void
setLoop(LoopCallback loopCallback)
Sets to loop the animations endlessly by a callback.void
setLoop(NativeCallback loopCallback)
Sets to loop the animations endlessly by a callback.void
setProperties(List<AnimationPropertyKey> properties)
Sets the properties to be defined in the animation collection.void
setProperties(AnimationPropertyKey... properties)
Sets the properties to be defined in the animation collection.void
setTo(boolean to)
Sets the end value for the animation as number.void
setTo(double to)
Sets the end value for the animation as number.void
setTo(String to)
Sets the end value for the animation as color string.void
setTo(NativeCallback toCallback)
Sets the end value for the animation by a callback.void
setTo(ToCallback toCallback)
Sets the end value for the animation by a callback.void
setTo(IsColor to)
Sets the end value for the animation as color.void
setType(AnimationType type)
Sets the type offrom
property and determines the interpolator used.-
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, 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, 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.defaults.IsDefaultBaseAnimation
getDelay, getDelayCallback, getDuration, getDurationCallback, getEasing, getEasingCallback, getLoopCallback, isLoop
-
-
-
-
Method Detail
-
setType
public void setType(AnimationType type)
Sets the type offrom
property and determines the interpolator used.- Parameters:
type
- the type offrom
property and determines the interpolator used.
-
getType
public AnimationType getType()
Returns the type offrom
property and determines the interpolator used.- Specified by:
getType
in interfaceIsDefaultAnimationCollection
- Returns:
- the type of
from
property and determines the interpolator used.
-
setFrom
public void setFrom(boolean from)
Sets the end value for the animation as number.- Parameters:
from
- the start end for the animation as number.
-
setFrom
public void setFrom(double from)
Sets the start value for the animation as number.- Parameters:
from
- the start value for the animation as number.
-
setFrom
public void setFrom(String from)
Sets the start value for the animation as color string.- Parameters:
from
- the start value for the animation as color string.
-
setFrom
public void setFrom(IsColor from)
Sets the start value for the animation as color.- Parameters:
from
- the start value for the animation as color.
-
getFrom
public double getFrom()
Returns the start value for the animation as number.- Specified by:
getFrom
in interfaceIsDefaultAnimationCollection
- Returns:
- the start value for the animation as number.
-
getFromAsBoolean
public boolean getFromAsBoolean()
Returns the start value for the animation as number.- Specified by:
getFromAsBoolean
in interfaceIsDefaultAnimationCollection
- Returns:
- the start value for the animation as number.
-
getFromAsString
public String getFromAsString()
Returns the start value for the animation as color string.- Specified by:
getFromAsString
in interfaceIsDefaultAnimationCollection
- Returns:
- the start value for the animation as color string.
-
getFromAsColor
public IsColor getFromAsColor()
Returns the start value for the animation as color.- Returns:
- the start value for the animation as color.
-
setTo
public void setTo(boolean to)
Sets the end value for the animation as number.- Parameters:
to
- the end value for the animation as number.
-
setTo
public void setTo(double to)
Sets the end value for the animation as number.- Parameters:
to
- the end value for the animation as number.
-
setTo
public void setTo(String to)
Sets the end value for the animation as color string.- Parameters:
to
- the end value for the animation as color string.
-
setTo
public void setTo(IsColor to)
Sets the end value for the animation as color.- Parameters:
to
- the end value for the animation as color.
-
getTo
public double getTo()
Returns the end value for the animation as number.- Specified by:
getTo
in interfaceIsDefaultAnimationCollection
- Returns:
- the end value for the animation as number.
-
getToAsBoolean
public boolean getToAsBoolean()
Returns the end value for the animation as number.- Specified by:
getToAsBoolean
in interfaceIsDefaultAnimationCollection
- Returns:
- the end value for the animation as number.
-
getToAsString
public String getToAsString()
Returns the end value for the animation as color string.- Specified by:
getToAsString
in interfaceIsDefaultAnimationCollection
- Returns:
- the end value for the animation as color string.
-
getToAsColor
public IsColor getToAsColor()
Returns the end value for the animation as color.- Returns:
- the end value for the animation as color.
-
setProperties
public void setProperties(AnimationPropertyKey... properties)
Sets the properties to be defined in the animation collection.- Parameters:
properties
- the properties to be defined in the animation collection
-
setProperties
public void setProperties(List<AnimationPropertyKey> properties)
Sets the properties to be defined in the animation collection.- Parameters:
properties
- the properties to be defined in the animation collection
-
getProperties
public List<AnimationPropertyKey> getProperties()
Returns the properties defined in the animation collection.- Specified by:
getProperties
in interfaceIsDefaultAnimationCollection
- Returns:
- the properties defined in the animation collection
-
getFromCallback
public FromCallback getFromCallback()
Returns the callback to set the start value for the animation.- Specified by:
getFromCallback
in interfaceIsDefaultAnimationCollection
- Returns:
- the callback instance to use to set the start value for the animation
-
setFrom
public void setFrom(FromCallback fromCallback)
Sets the start value for the animation by a callback.- Parameters:
fromCallback
- the callback instance to use to set the start value for the animation
-
setFrom
public void setFrom(NativeCallback fromCallback)
Sets the start value for the animation by a callback.- Parameters:
fromCallback
- the callback instance to use to set the start value for the animation
-
getToCallback
public ToCallback getToCallback()
Returns the callback to set the end value for the animation.- Specified by:
getToCallback
in interfaceIsDefaultAnimationCollection
- Returns:
- the callback instance to use to set the end value for the animation
-
setTo
public void setTo(ToCallback toCallback)
Sets the end value for the animation by a callback.- Parameters:
toCallback
- the callback instance to use to set the end value for the animation
-
setTo
public void setTo(NativeCallback toCallback)
Sets the end value for the animation by a callback.- Parameters:
toCallback
- the callback instance to use to set the end value for the animation
-
getDefaultValues
protected final D getDefaultValues()
Returns the default values.- Returns:
- the default values
-
getScope
public final 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
-
setEasing
public final void setEasing(Easing easing)
Sets the animation easing.- Parameters:
easing
- animation easing.
-
getEasing
public final Easing getEasing()
Returns the animation easing.- Specified by:
getEasing
in interfaceIsDefaultBaseAnimation
- Returns:
- animation easing.
-
setDuration
public final void setDuration(int milliseconds)
Sets the number of milliseconds an animation takes.- Parameters:
milliseconds
- the number of milliseconds an animation takes.
-
getDuration
public final int getDuration()
Returns the number of milliseconds an animation takes.- Specified by:
getDuration
in interfaceIsDefaultBaseAnimation
- Returns:
- the number of milliseconds an animation takes.
-
setDelay
public final void setDelay(int delay)
Sets the delay before starting the animations.- Parameters:
delay
- the delay before starting the animations
-
getDelay
public final int getDelay()
Returns the delay before starting the animations.- Specified by:
getDelay
in interfaceIsDefaultBaseAnimation
- Returns:
- the delay before starting the animations
-
setLoop
public final void setLoop(boolean loop)
If set totrue
, loops the animations endlessly.- Parameters:
loop
-true
if loops the animations endlessly.
-
isLoop
public final boolean isLoop()
If set totrue
, loops the animations endlessly.- Specified by:
isLoop
in interfaceIsDefaultBaseAnimation
- Returns:
true
if loops the animations endlessly.
-
getDurationCallback
public DurationCallback getDurationCallback()
Returns the callback to set the number of milliseconds an animation takes.- Specified by:
getDurationCallback
in interfaceIsDefaultBaseAnimation
- Returns:
- the callback instance to use
-
setDuration
public void setDuration(DurationCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.- Parameters:
durationCallback
- the callback instance to use
-
setDuration
public void setDuration(NativeCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.- Parameters:
durationCallback
- the callback instance to use
-
getDelayCallback
public DelayCallback getDelayCallback()
Returns the callback to set the delay before starting the animations.- Specified by:
getDelayCallback
in interfaceIsDefaultBaseAnimation
- Returns:
- the callback instance to use
-
setDelay
public void setDelay(DelayCallback delayCallback)
Sets the delay before starting the animations by a callback.- Parameters:
delayCallback
- the callback instance to use
-
setDelay
public void setDelay(NativeCallback delayCallback)
Sets the delay before starting the animations by a callback.- Parameters:
delayCallback
- the callback instance to use
-
getLoopCallback
public LoopCallback getLoopCallback()
Returns the callback to loop the animations endlessly.- Specified by:
getLoopCallback
in interfaceIsDefaultBaseAnimation
- Returns:
- the callback instance to use
-
setLoop
public void setLoop(LoopCallback loopCallback)
Sets to loop the animations endlessly by a callback.- Parameters:
loopCallback
- the callback instance to use
-
setLoop
public void setLoop(NativeCallback loopCallback)
Sets to loop the animations endlessly by a callback.- Parameters:
loopCallback
- the callback instance to use
-
getEasingCallback
public EasingCallback getEasingCallback()
Returns the callback to set the animation easing.- Specified by:
getEasingCallback
in interfaceIsDefaultBaseAnimation
- Returns:
- the callback instance to use
-
setEasing
public void setEasing(EasingCallback easingCallback)
Sets the animation easing by a callback.- Parameters:
easingCallback
- the callback instance to use
-
setEasing
public void setEasing(NativeCallback easingCallback)
Sets the animation easing by a callback.- Parameters:
easingCallback
- the callback instance to use
-
-