|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.AbstractMedia
com.threerings.media.animation.Animation
public abstract class Animation
The animation class is an abstract class that should be extended to provide animation
functionality. It is generally used in conjunction with an AnimationManager.
| Nested Class Summary | |
|---|---|
protected static class |
Animation.AnimCompletedOp
Used to dispatch AnimationObserver.animationCompleted(com.threerings.media.animation.Animation, long). |
protected static class |
Animation.AnimStartedOp
Used to dispatch AnimationObserver.animationStarted(com.threerings.media.animation.Animation, long). |
| Field Summary | |
|---|---|
protected boolean |
_finished
Whether the animation is finished. |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Constructor Summary | |
|---|---|
Animation(Rectangle bounds)
Constructs an animation. |
|
| Method Summary | |
|---|---|
void |
addAnimationObserver(AnimationObserver obs)
Adds an animation observer to this animation's list of observers. |
protected void |
didFinish(long tickStamp)
Called when the animation is finished and the animation manager has removed it from service. |
boolean |
isFinished()
Returns true if the animation has finished all of its business, false if not. |
void |
removeAnimationObserver(AnimationObserver obs)
Removes an animation observer from this animation's list of observers. |
void |
reset()
If this animation has run to completion, it can be reset to prepare it for another go. |
void |
setLocation(int x,
int y)
Set the location. |
protected void |
willFinish(long tickStamp)
Called when the animation is finished and the animation manager is about to remove it from service. |
protected void |
willStart(long tickStamp)
Prior to the first call to AbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, fastForward, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, paint, queueNotification, removeObserver, renderCompareTo, setRenderOrder, shutdown, tick, toString, toString, viewLocationDidChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean _finished
| Constructor Detail |
|---|
public Animation(Rectangle bounds)
bounds - the animation rendering bounds.| Method Detail |
|---|
public boolean isFinished()
public void reset()
public void setLocation(int x,
int y)
AbstractMedia
setLocation in class AbstractMediaprotected void willStart(long tickStamp)
AbstractMediaAbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. It is called during the normal tick cycle, immediately prior
to the first call to AbstractMedia.tick(long).
Note: It is imperative that super.willStart() is called by any
entity that overrides this method because the AbstractMediaManager depends on the
setting of the AbstractMedia._firstTick value to know whether or not to call this method.
willStart in class AbstractMediaprotected void willFinish(long tickStamp)
protected void didFinish(long tickStamp)
public void addAnimationObserver(AnimationObserver obs)
public void removeAnimationObserver(AnimationObserver obs)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||