public class Fx extends Object implements AfterAnimateEvent.HasAfterAnimateHandlers, BeforeAnimateEvent.HasBeforeAnimateHandlers, CancelAnimationEvent.HasCancelAnimationHandlers
MultiEffect
.Modifier and Type | Field and Description |
---|---|
protected Animator |
animation |
protected int |
duration |
protected Effect |
effect |
protected SimpleEventBus |
eventBus |
protected boolean |
isRunning |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addAfterAnimateHandler(AfterAnimateEvent.AfterAnimateHandler handler)
Adds a
AfterAnimateEvent.AfterAnimateHandler handler for AfterAnimateEvent
events. |
HandlerRegistration |
addBeforeAnimateHandler(BeforeAnimateEvent.BeforeAnimateHandler handler)
Adds a
BeforeAnimateEvent.BeforeAnimateHandler handler for BeforeAnimateEvent
events. |
HandlerRegistration |
addCancelAnimationHandler(CancelAnimationEvent.CancelAnimationHandler handler)
Adds a
CancelAnimationEvent.CancelAnimationHandler handler for
CancelAnimationEvent events. |
void |
cancel()
Cancels the effect.
|
protected boolean |
fireCancellableEvent(<any> event) |
Effect |
getEffect()
Returns the effect.
|
protected void |
onCancel() |
protected void |
onComplete() |
protected void |
onStart() |
protected void |
onUpdate(double progress) |
boolean |
run(Effect effect)
Runs the effect for the given duration.
|
boolean |
run(int duration,
Effect effect)
Runs the effect for the given duration.
|
protected boolean isRunning
protected SimpleEventBus eventBus
protected Effect effect
protected Animator animation
protected int duration
public HandlerRegistration addAfterAnimateHandler(AfterAnimateEvent.AfterAnimateHandler handler)
AfterAnimateEvent.HasAfterAnimateHandlers
AfterAnimateEvent.AfterAnimateHandler
handler for AfterAnimateEvent
events.addAfterAnimateHandler
in interface AfterAnimateEvent.HasAfterAnimateHandlers
handler
- the handlerpublic HandlerRegistration addBeforeAnimateHandler(BeforeAnimateEvent.BeforeAnimateHandler handler)
BeforeAnimateEvent.HasBeforeAnimateHandlers
BeforeAnimateEvent.BeforeAnimateHandler
handler for BeforeAnimateEvent
events.addBeforeAnimateHandler
in interface BeforeAnimateEvent.HasBeforeAnimateHandlers
handler
- the handlerpublic HandlerRegistration addCancelAnimationHandler(CancelAnimationEvent.CancelAnimationHandler handler)
CancelAnimationEvent.HasCancelAnimationHandlers
CancelAnimationEvent.CancelAnimationHandler
handler for
CancelAnimationEvent
events.addCancelAnimationHandler
in interface CancelAnimationEvent.HasCancelAnimationHandlers
handler
- the handlerpublic void cancel()
public Effect getEffect()
public boolean run(Effect effect)
effect
- the effect runpublic boolean run(int duration, Effect effect)
duration
- the effect duration in millisecondseffect
- the effect runprotected boolean fireCancellableEvent(<any> event)
protected void onCancel()
protected void onComplete()
protected void onStart()
protected void onUpdate(double progress)
Copyright © 2020. All rights reserved.