|
|||||||||
| 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.sprite.Sprite
com.threerings.media.sprite.ImageSprite
com.threerings.media.sprite.OrientableImageSprite
com.threerings.media.sprite.FadableImageSprite
public class FadableImageSprite
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.sprite.Sprite |
|---|
Sprite.CancelledOp, Sprite.CompletedOp |
| Field Summary | |
|---|---|
protected AlphaComposite |
_alphaComposite
The alpha composite. |
protected long |
_fadeDelay
If fading in without moving, the fade-in delay. |
protected long |
_fadeInDuration
If fading in, the fade-in duration (otherwise -1). |
protected long |
_fadeOutDuration
If fading out, the fade-out duration (otherwise -1). |
protected long |
_fadeStamp
The time at which fading started. |
protected long |
_pathDuration
If fading out, the path duration. |
| Fields inherited from class com.threerings.media.sprite.ImageSprite |
|---|
_animMode, _firstStamp, _frameDelay, _frameIdx, _frames, DEFAULT_FRAME_RATE, MOVEMENT_CUED, NO_ANIMATION, TIME_BASED, TIME_SEQUENTIAL |
| Fields inherited from class com.threerings.media.sprite.Sprite |
|---|
_orient, _ox, _oxoff, _oy, _oyoff, _path, _pathStamp |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Fields inherited from interface com.threerings.util.DirectionCodes |
|---|
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST |
| Constructor Summary | |
|---|---|
FadableImageSprite()
Creates a new fadable image sprite. |
|
FadableImageSprite(Mirage image)
Creates a new fadable image sprite. |
|
FadableImageSprite(MultiFrameImage frames)
Creates a new fadable image sprite. |
|
| Method Summary | |
|---|---|
protected void |
completeFadeIn()
Completes the process of fading in. |
protected void |
completeFadeOut()
Completes the process of fading out. |
void |
fadeIn(long delay,
long duration)
Fades this sprite in over the specified duration after waiting for the specified delay. |
void |
fadeOut(long delay,
long duration)
Fades this sprite out over the specified duration after waiting for the specified delay. |
float |
getAlpha()
Returns the alpha value of this sprite. |
void |
moveAndFadeIn(Path path,
long pathDuration,
float fadePortion)
Puts this sprite on the specified path and fades it in over the specified duration. |
void |
moveAndFadeInAndOut(Path path,
long pathDuration,
float fadePortion)
Puts this sprite on the specified path, fading it in over the specified duration at the beginning and fading it out at the end. |
void |
moveAndFadeOut(Path path,
long pathDuration,
float fadePortion)
Puts this sprite on the specified path and fades it out over the specified duration. |
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given graphics context. |
void |
pathCompleted(long timestamp)
Called by the active path when it has completed. |
void |
setAlpha(float alpha)
Sets the alpha value of this sprite. |
void |
tick(long tickStamp)
Called periodically by this media's manager to give it a chance to do its thing. |
| Methods inherited from class com.threerings.media.sprite.OrientableImageSprite |
|---|
accomodateFrame, setOrientation |
| Methods inherited from class com.threerings.media.sprite.ImageSprite |
|---|
hitTest, init, layout, setAnimationMode, setFrameIndex, setFrameRate, setFrames, setMirage, toString |
| Methods inherited from class com.threerings.media.sprite.Sprite |
|---|
addSpriteObserver, cancelMove, contains, fastForward, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, inside, intersects, isMoving, move, paintPath, pathBeginning, removeSpriteObserver, setLocation, shutdown, tickPath, updateRenderOrigin, viewLocationDidChange |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, toString, willStart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.threerings.media.util.Pathable |
|---|
getBounds |
| Field Detail |
|---|
protected AlphaComposite _alphaComposite
protected long _fadeInDuration
protected long _fadeDelay
protected long _fadeStamp
protected long _fadeOutDuration
protected long _pathDuration
| Constructor Detail |
|---|
public FadableImageSprite()
public FadableImageSprite(Mirage image)
image - the image to renderpublic FadableImageSprite(MultiFrameImage frames)
frames - the frames to render| Method Detail |
|---|
public void fadeIn(long delay,
long duration)
public void fadeOut(long delay,
long duration)
public void moveAndFadeIn(Path path,
long pathDuration,
float fadePortion)
path - the path to move alongfadePortion - the portion of time to spend fading in, from 0.0f (no time) to 1.0f (the
entire time)
public void moveAndFadeOut(Path path,
long pathDuration,
float fadePortion)
path - the path to move alongpathDuration - the duration of the pathfadePortion - the portion of time to spend fading out, from 0.0f (no time) to 1.0f
(the entire time)
public void moveAndFadeInAndOut(Path path,
long pathDuration,
float fadePortion)
path - the path to move alongpathDuration - the duration of the pathfadePortion - the portion of time to spend fading in/out, from 0.0f (no time) to 1.0f
(the entire time)public void tick(long tickStamp)
AbstractMedia
tick in class ImageSpritetickStamp - 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 pathCompleted(long timestamp)
Sprite
pathCompleted in interface PathablepathCompleted in class Spriteprotected void completeFadeIn()
protected void completeFadeOut()
public void paint(Graphics2D gfx)
AbstractMedia
paint in class OrientableImageSpritepublic void setAlpha(float alpha)
public float getAlpha()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||