Interface IEffect
- All Known Implementing Classes:
AbstractEffect
,AlphaEffect
,CrossFadeEffect
,GalleryGroupResizeEffect
,GrowEffect
,MoveControlEffect
,MoveScrollBarEffect
,ParallelEffect
,ResizeEffect
,SequenceEffect
,SetBoundsEffect
,SetColorEffect
,ShakeEffect
public interface IEffect
All animation effects must implement this interface.
Note : an effect should not do initialization in constructor, but at the first call to doEffect(). For instance, a move effect should not get the initial position of an object in the constructor, because the object may have moved between creation and effect start.
-
Method Details
-
cancel
void cancel()Set the effect as done and run the cancel runnable. -
doEffect
void doEffect(long time)Apply effect to the target according to the given time.- Parameters:
time
- - Current time in ms. This value may be larger than the effect length.
-
getLength
long getLength()Get effect length- Returns:
- length (ms)
-
isDone
boolean isDone()- Returns:
- true if the effect as already reached its end.
-