com.threerings.media.animation
Class AnimationManager

java.lang.Object
  extended by com.threerings.media.AbstractMediaManager
      extended by com.threerings.media.animation.AnimationManager
All Implemented Interfaces:
MediaConstants, Iterable<Animation>

public class AnimationManager
extends AbstractMediaManager
implements Iterable<Animation>

Manages a collection of animations, ticking them when the animation manager itself is ticked and generating events when animations finish and suchlike.


Field Summary
protected  SortableArrayList<Animation> _anims
           
 
Fields inherited from class com.threerings.media.AbstractMediaManager
_host, _media, _notify, _remgr, _tickpos, _tickStamp, RENDER_ORDER
 
Fields inherited from interface com.threerings.media.MediaConstants
ALL, BACK, FRONT
 
Constructor Summary
AnimationManager()
           
 
Method Summary
protected  SortableArrayList<? extends AbstractMedia> createMediaList()
          Type safety jockeying.
 Iterator<Animation> iterator()
           
 void registerAnimation(Animation anim)
          Registers the given Animation with the animation manager for ticking and painting.
protected  void tickAllMedia(long tickStamp)
          Calls AbstractMedia.tick(long) on all media to give them a chance to move about, change their look, generate dirty regions, and so forth.
 void unregisterAnimation(Animation anim)
          Un-registers the given Animation from the animation manager.
 
Methods inherited from class com.threerings.media.AbstractMediaManager
clearMedia, createGraphics, dispatchNotifications, fastForward, getRegionManager, init, insertMedia, isManaged, paint, queueNotification, removeMedia, renderOrderDidChange, tick, tickMedia, viewLocationDidChange, willPaint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_anims

protected SortableArrayList<Animation> _anims
Constructor Detail

AnimationManager

public AnimationManager()
Method Detail

registerAnimation

public void registerAnimation(Animation anim)
Registers the given Animation with the animation manager for ticking and painting.


unregisterAnimation

public void unregisterAnimation(Animation anim)
Un-registers the given Animation from the animation manager. The bounds of the animation will automatically be invalidated so that they are properly rerendered in the absence of the animation.


iterator

public Iterator<Animation> iterator()
Specified by:
iterator in interface Iterable<Animation>

tickAllMedia

protected void tickAllMedia(long tickStamp)
Description copied from class: AbstractMediaManager
Calls AbstractMedia.tick(long) on all media to give them a chance to move about, change their look, generate dirty regions, and so forth.

Overrides:
tickAllMedia in class AbstractMediaManager

createMediaList

protected SortableArrayList<? extends AbstractMedia> createMediaList()
Description copied from class: AbstractMediaManager
Type safety jockeying.

Specified by:
createMediaList in class AbstractMediaManager