public class FadableImageSprite extends OrientableImageSprite
DEFAULT_FRAME_RATE, MOVEMENT_CUED, NO_ANIMATION, TIME_BASED, TIME_SEQUENTIALHUD_LAYERCARDINAL_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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
setOrientationhitTest, layout, setAnimationMode, setFrameRate, setFrames, setMirageaddSpriteObserver, cancelMove, contains, fastForward, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, inside, intersects, isMoving, move, paintPath, pathBeginning, removeSpriteObserver, setLocation, viewLocationDidChangecontains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toStringpublic FadableImageSprite()
public FadableImageSprite(Mirage image)
image - the image to renderpublic FadableImageSprite(MultiFrameImage frames)
frames - the frames to renderpublic 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)
AbstractMediatick 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)
SpritepathCompleted in interface PathablepathCompleted in class Spritepublic void paint(Graphics2D gfx)
AbstractMediapaint in class OrientableImageSpritepublic void setAlpha(float alpha)
public float getAlpha()
Copyright © 2015. All rights reserved.