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 DgetDefaultValues()Returns the default values.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.doublegetFrom()Returns the start value for the animation as number.booleangetFromAsBoolean()Returns the start value for the animation as number.IsColorgetFromAsColor()Returns the start value for the animation as color.StringgetFromAsString()Returns the start value for the animation as color string.FromCallbackgetFromCallback()Returns the callback to set the start value for the animation.LoopCallbackgetLoopCallback()Returns the callback to loop the animations endlessly.List<AnimationPropertyKey>getProperties()Returns the properties defined in the animation collection.StringgetScope()Returns the scope of the options, which is the options are used for defaults, chart defaults or chart.doublegetTo()Returns the end value for the animation as number.booleangetToAsBoolean()Returns the end value for the animation as number.IsColorgetToAsColor()Returns the end value for the animation as color.StringgetToAsString()Returns the end value for the animation as color string.ToCallbackgetToCallback()Returns the callback to set the end value for the animation.AnimationTypegetType()Returns the type offromproperty and determines the interpolator used.booleanisLoop()If set totrue, loops the animations endlessly.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.voidsetFrom(boolean from)Sets the end value for the animation as number.voidsetFrom(double from)Sets the start value for the animation as number.voidsetFrom(String from)Sets the start value for the animation as color string.voidsetFrom(FromCallback fromCallback)Sets the start value for the animation by a callback.voidsetFrom(NativeCallback fromCallback)Sets the start value for the animation by a callback.voidsetFrom(IsColor from)Sets the start value for the animation as color.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.voidsetProperties(List<AnimationPropertyKey> properties)Sets the properties to be defined in the animation collection.voidsetProperties(AnimationPropertyKey... properties)Sets the properties to be defined in the animation collection.voidsetTo(boolean to)Sets the end value for the animation as number.voidsetTo(double to)Sets the end value for the animation as number.voidsetTo(String to)Sets the end value for the animation as color string.voidsetTo(NativeCallback toCallback)Sets the end value for the animation by a callback.voidsetTo(ToCallback toCallback)Sets the end value for the animation by a callback.voidsetTo(IsColor to)Sets the end value for the animation as color.voidsetType(AnimationType type)Sets the type offromproperty 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 offromproperty and determines the interpolator used.- Parameters:
type- the type offromproperty and determines the interpolator used.
-
getType
public AnimationType getType()
Returns the type offromproperty and determines the interpolator used.- Specified by:
getTypein interfaceIsDefaultAnimationCollection- Returns:
- the type of
fromproperty 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:
getFromin 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:
getFromAsBooleanin 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:
getFromAsStringin 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:
getToin 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:
getToAsBooleanin 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:
getToAsStringin 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:
getPropertiesin 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:
getFromCallbackin 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:
getToCallbackin 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:HasCallbackScopeReturns the scope of the options, which is the options are used for defaults, chart defaults or chart.- Specified by:
getScopein 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:
getEasingin 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:
getDurationin 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:
getDelayin interfaceIsDefaultBaseAnimation- Returns:
- the delay before starting the animations
-
setLoop
public final void setLoop(boolean loop)
If set totrue, loops the animations endlessly.- Parameters:
loop-trueif loops the animations endlessly.
-
isLoop
public final boolean isLoop()
If set totrue, loops the animations endlessly.- Specified by:
isLoopin interfaceIsDefaultBaseAnimation- Returns:
trueif loops the animations endlessly.
-
getDurationCallback
public DurationCallback getDurationCallback()
Returns the callback to set the number of milliseconds an animation takes.- Specified by:
getDurationCallbackin 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:
getDelayCallbackin 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:
getLoopCallbackin 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:
getEasingCallbackin 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
-
-