Make AbstractMedia implement Comparable instead of using a comparator. Added

naturalOrder() which allows media to use a more consistent "same render order"
order resolution value than Object.hashCode().


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@248 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2007-05-15 17:45:18 +00:00
parent f7dfe51a9c
commit acea29604d
4 changed files with 41 additions and 33 deletions
@@ -21,7 +21,7 @@
package com.threerings.media.animation;
import com.samskivert.util.SortableArrayList;
import com.samskivert.util.ComparableArrayList;
import com.threerings.media.AbstractMedia;
import com.threerings.media.AbstractMediaManager;
@@ -71,10 +71,10 @@ public class AnimationManager extends AbstractMediaManager
}
@Override // from AbstractMediaManager
protected SortableArrayList<? extends AbstractMedia> createMediaList ()
protected ComparableArrayList<? extends AbstractMedia> createMediaList ()
{
return (_anims = new SortableArrayList<Animation>());
return (_anims = new ComparableArrayList<Animation>());
}
protected SortableArrayList<Animation> _anims;
protected ComparableArrayList<Animation> _anims;
}