IEffect
AlphaEffect
, CrossFadeEffect
, GalleryGroupResizeEffect
, GrowEffect
, MoveControlEffect
, MoveScrollBarEffect
, ResizeEffect
, SetBoundsEffect
, SetColorEffect
, ShakeEffect
public abstract class AbstractEffect extends java.lang.Object implements IEffect
Constructor | Description |
---|---|
AbstractEffect(long lengthMilli,
IMovement movement) |
Create a new effect.
|
AbstractEffect(long lengthMilli,
IMovement movement,
java.lang.Runnable onStop,
java.lang.Runnable onCancel) |
Create a new effect, with listeners for stop and cancel events.
|
Modifier and Type | Method | Description |
---|---|---|
abstract void |
applyEffect(long currentTime) |
Apply this effect.
|
void |
cancel() |
Set the effect as done and run the cancel runnable.
|
void |
doEffect() |
|
void |
doEffect(long time) |
Apply effect to the target according to the given time.
|
long |
getLength() |
Get effect length
|
boolean |
isDone() |
|
void |
processEnd(long time) |
Check if the effect has ended.
|
public AbstractEffect(long lengthMilli, IMovement movement)
lengthMilli
- movement
- public AbstractEffect(long lengthMilli, IMovement movement, java.lang.Runnable onStop, java.lang.Runnable onCancel)
lengthMilli
- movement
- onStop
- onCancel
- public abstract void applyEffect(long currentTime)
currentTime
- public void cancel()
IEffect
public void doEffect()
public void doEffect(long time)
IEffect
public long getLength()
IEffect
public boolean isDone()
public void processEnd(long time)