|
|||||||||
| 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
com.threerings.media.animation.BobbleAnimation
public class BobbleAnimation
An animation that bobbles an image around within a specific horizontal and vertical pixel range for a given period of time.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.animation.Animation |
|---|
Animation.AnimCompletedOp, Animation.AnimStartedOp |
| Field Summary | |
|---|---|
protected long |
_duration
Animation ending timing information. |
protected long |
_end
Animation ending timing information. |
protected Mirage |
_image
The image to animate. |
protected int |
_rx
The horizontal and vertical bobbling range. |
protected int |
_ry
The horizontal and vertical bobbling range. |
protected int |
_sx
The starting position. |
protected int |
_sy
The starting position. |
protected int |
_x
The current position of the image. |
protected int |
_y
The current position of the image. |
| Fields inherited from class com.threerings.media.animation.Animation |
|---|
_finished |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Constructor Summary | |
|---|---|
BobbleAnimation(Mirage image,
int sx,
int sy,
int rx,
int ry,
int duration)
Constructs a bobble animation. |
|
| Method Summary | |
|---|---|
void |
fastForward(long timeDelta)
Called when the appropriate media manager has been paused for some length of time and is then unpaused. |
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given graphics context. |
void |
tick(long tickStamp)
Called periodically by this media's manager to give it a chance to do its thing. |
protected void |
toString(StringBuilder buf)
This should be overridden by derived classes (which should be sure to call super.toString()) to append the derived class
specific information to the string buffer. |
| Methods inherited from class com.threerings.media.animation.Animation |
|---|
addAnimationObserver, didFinish, isFinished, removeAnimationObserver, reset, setLocation, willFinish, willStart |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, shutdown, toString, viewLocationDidChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int _x
protected int _y
protected int _rx
protected int _ry
protected int _sx
protected int _sy
protected Mirage _image
protected long _duration
protected long _end
| Constructor Detail |
|---|
public BobbleAnimation(Mirage image,
int sx,
int sy,
int rx,
int ry,
int duration)
image - the image to animate.sx - the starting x-position.sy - the starting y-position.rx - the horizontal bobble range.ry - the vertical bobble range.duration - the time to animate in milliseconds.| Method Detail |
|---|
public void tick(long tickStamp)
AbstractMedia
tick in class AbstractMediatickStamp - a time stamp associated with this tick. Note: this is not obtained
from a call to System.currentTimeMillis() and cannot be compared to timestamps
obtained there from.public void fastForward(long timeDelta)
AbstractMedia
fastForward in class AbstractMediapublic void paint(Graphics2D gfx)
AbstractMedia
paint in class AbstractMediaprotected void toString(StringBuilder buf)
AbstractMediasuper.toString()) to append the derived class
specific information to the string buffer.
toString in class AbstractMedia
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||