public class Animation extends Object implements IsAnimation
Modifier and Type | Method and Description |
---|---|
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.
|
LoopCallback |
getLoopCallback()
Returns the callback to loop the animations endlessly.
|
boolean |
isAnimateRotate()
If true, the chart will animate in with a rotation animation.
|
boolean |
isAnimateScale()
If true, will animate scaling the chart from the center outwards.
|
boolean |
isLoop()
If set to
true , loops the animations endlessly. |
void |
onAdd(AddHandlerEvent event)
Invoked when a new event handler is added.
|
void |
onRemove(RemoveHandlerEvent event)
Invoked when a chart event handler is removed.
|
static void |
register(IsChart chart,
org.pepstock.charba.client.configuration.IsEventProvider provider)
Adds the event provider implementation as handlers of chart.
|
void |
setAnimateRotate(boolean animateRotate)
If true, the chart will animate in with a rotation animation.
|
void |
setAnimateScale(boolean animateScale)
If true, will animate scaling the chart from the center outwards.
|
void |
setDelay(DelayCallback delayCallback)
Sets the delay before starting the animations by a callback.
|
void |
setDelay(int delay)
Sets the delay before starting the animations.
|
void |
setDelay(NativeCallback delayCallback)
Sets the delay before starting the animations by a callback.
|
void |
setDuration(DurationCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.
|
void |
setDuration(int milliseconds)
Sets the number of milliseconds an animation takes.
|
void |
setDuration(NativeCallback durationCallback)
Sets the number of milliseconds an animation takes by a callback.
|
void |
setEasing(Easing easing)
Sets the animation easing.
|
void |
setEasing(EasingCallback easingCallback)
Sets the animation easing by a callback.
|
void |
setEasing(NativeCallback easingCallback)
Sets the animation easing by a callback.
|
void |
setLoop(boolean loop)
If set to
true , 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.
|
public void setEasing(Easing easing)
setEasing
in interface IsAnimation
easing
- animation easing.public Easing getEasing()
getEasing
in interface IsDefaultBaseAnimation
public void setDuration(int milliseconds)
setDuration
in interface IsAnimation
milliseconds
- the number of milliseconds an animation takes.public int getDuration()
getDuration
in interface IsDefaultBaseAnimation
public void setAnimateRotate(boolean animateRotate)
setAnimateRotate
in interface IsAnimation
animateRotate
- If true, the chart will animate in with a rotation animation.public boolean isAnimateRotate()
isAnimateRotate
in interface IsDefaultAnimation
public void setAnimateScale(boolean animateScale)
setAnimateScale
in interface IsAnimation
animateScale
- If true, will animate scaling the chart from the center outwards.public boolean isAnimateScale()
isAnimateScale
in interface IsDefaultAnimation
public void setDelay(int delay)
setDelay
in interface IsAnimation
delay
- the delay before starting the animationspublic int getDelay()
getDelay
in interface IsDefaultBaseAnimation
public void setLoop(boolean loop)
true
, loops the animations endlessly.setLoop
in interface IsAnimation
loop
- true
if loops the animations endlessly.public boolean isLoop()
true
, loops the animations endlessly.isLoop
in interface IsDefaultBaseAnimation
true
if loops the animations endlessly.public DurationCallback getDurationCallback()
getDurationCallback
in interface IsDefaultBaseAnimation
public void setDuration(DurationCallback durationCallback)
setDuration
in interface IsAnimation
durationCallback
- the callback instance to usepublic void setDuration(NativeCallback durationCallback)
setDuration
in interface IsAnimation
durationCallback
- the callback instance to usepublic DelayCallback getDelayCallback()
getDelayCallback
in interface IsDefaultBaseAnimation
public void setDelay(DelayCallback delayCallback)
setDelay
in interface IsAnimation
delayCallback
- the callback instance to usepublic void setDelay(NativeCallback delayCallback)
setDelay
in interface IsAnimation
delayCallback
- the callback instance to usepublic LoopCallback getLoopCallback()
getLoopCallback
in interface IsDefaultBaseAnimation
public void setLoop(LoopCallback loopCallback)
setLoop
in interface IsAnimation
loopCallback
- the callback instance to usepublic void setLoop(NativeCallback loopCallback)
setLoop
in interface IsAnimation
loopCallback
- the callback instance to usepublic EasingCallback getEasingCallback()
getEasingCallback
in interface IsDefaultBaseAnimation
public void setEasing(EasingCallback easingCallback)
setEasing
in interface IsAnimation
easingCallback
- the callback instance to usepublic void setEasing(NativeCallback easingCallback)
setEasing
in interface IsAnimation
easingCallback
- the callback instance to usepublic final void onAdd(AddHandlerEvent event)
AddHandlerEventHandler
event
- event to be consumedpublic final void onRemove(RemoveHandlerEvent event)
RemoveHandlerEventHandler
event
- event to be consumedpublic static void register(IsChart chart, org.pepstock.charba.client.configuration.IsEventProvider provider)
chart
- chart instanceprovider
- event provider implmentation