|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.mImage
ewe.graphics.AniImage
ewe.graphics.AnimatedIcon
| Nested Class Summary |
| Nested classes inherited from class ewe.graphics.AniImage |
AniImage.ImageRefresher |
| Field Summary | |
protected Hashtable |
images
|
protected Vector |
loops
|
protected Task |
loopTask
This is the thread that is running the animation. |
boolean |
startOnDraw
|
| Fields inherited from class ewe.graphics.AniImage |
displayControl, limits, mosaic, refresher, relativeToOrigin |
| Fields inherited from class ewe.fx.mImage |
AlwaysOnTop, backgroundColor, bitmask, CompletelyIn, drawable, drawMode, HasBorder, HasChanged, HasMoved, hotArea, hotPolygon, image, imageMayChange, InUse, IsAnimated, IsEmpty, IsInvisible, IsLocked, IsMoveable, IsNotHot, IsNotStill, IsPrepared, IsPreparing, KeepOnScreen, lastDrawn, location, mask, MouseMustBeOver, properties, RelativeToOrigin, sourceImage, sourceMask, transparentColor |
| Fields inherited from interface ewe.fx.IImage |
DISABLED, OUTLINED |
| Constructor Summary | |
AnimatedIcon()
Create a blank AnimatedIcon. |
|
AnimatedIcon(ImageInfo[] images)
|
|
AnimatedIcon(Stream imageFile)
|
|
AnimatedIcon(String loopString)
|
|
AnimatedIcon(String loopString,
Dimension size)
|
|
AnimatedIcon(String loopString,
String prependString,
Dimension size)
|
|
| Method Summary | |
void |
addImage(String name,
IImage image)
This adds an image to the internal Hashtable using with the specified name. |
void |
addLoopSegment(String imageName,
int pauseTimeInMillis)
|
void |
closing()
This simply calls the stop() method. |
void |
doDraw(Graphics g,
int options)
Bottom level draw. |
void |
doLoop(Handle h)
This actually does the looping of the images. |
protected IImage |
fetchForName(String name)
|
void |
free()
Override this to free used resources. |
static IImage |
getAnimatedImageFromGIF(Stream imageFile)
This checks an encoded GIF byte Stream to see if the image contains is an animated GIF or a single Image GIF. |
IImage |
getImage(String name)
Get a named image from the list of images. |
void |
run()
Override this to do custom animation. |
void |
setLoop(String loopString)
If you call this directly to specify the loop string, then you will have had to already add images to the internal Hashtable using addImage(). |
void |
shown()
This simply calls the start() method. |
void |
start()
By default this calls startLoop(). |
Handle |
startLoop()
This starts a new mThread that calls doLoop() method. |
void |
stop()
Requests that the animation stop but does not free resources. |
| Methods inherited from class ewe.graphics.AniImage |
animateMoveTo, canGo, change, change, change, changed, getMovedBounds, getNew, hasARefresher, isCompletelyWithin, isDraggedOver, isIn, isTouching, isWithin, move, refresh, refreshNow, resize, setLocation, translate, updated |
| Methods inherited from class ewe.fx.mImage |
changeRefresher, compareTo, copyFrom, decodeBytes, draw, draw, drawBorder, drawn, encodeBytes, fixColors, freeIfNotOriginal, freeSource, getBackground, getBrokenImage, getCopy, getDefaultImage, getDim, getFullCopy, getHeight, getHotArea, getLocation, getPixels, getRefresher, getSize, getUnknownImage, getUnusedColor, getWidth, imageSet, makeOpaqueHotArea, onHotArea, refresh, scale, setHotAreaInImage, setImage, setImage, setImage, setImage, setImage, setImage, setImage, setMImage, setRefresher, toAlphaImage, toCursor, toString, usesAlpha |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Field Detail |
public boolean startOnDraw
protected Vector loops
protected Task loopTask
protected Hashtable images
| Constructor Detail |
public AnimatedIcon()
public AnimatedIcon(Stream imageFile)
throws IllegalArgumentException
public AnimatedIcon(ImageInfo[] images)
public AnimatedIcon(String loopString)
public AnimatedIcon(String loopString,
Dimension size)
public AnimatedIcon(String loopString,
String prependString,
Dimension size)
| Method Detail |
public static IImage getAnimatedImageFromGIF(Stream imageFile)
throws IllegalArgumentException
imageFile - The encoded GIF stored in a Stream of bytes. If you have a byte
array containing the data you can use ewe.io.MemoryFile to convert it into a ewe.io.Stream
by using new MemoryFile(byte[] data, int start, int length, String mode).
IllegalArgumentException - if there is an error decoding the GIF.public void setLoop(String loopString)
loopString - The string in the format: "Image1|PauseTime1|Image2|PauseTime2|..."
public void addLoopSegment(String imageName,
int pauseTimeInMillis)
protected IImage fetchForName(String name)
public void shown()
shown in class AniImagepublic void closing()
closing in class AniImagepublic void stop()
public void doLoop(Handle h)
This loop will exit if the passed Handle has its stop() method called or if the ImageRefresher is set to null or has been garbage collected.
public void start()
public Handle startLoop()
public void free()
free in interface IImagefree in class mImagepublic void run()
run in interface Runnable
public void addImage(String name,
IImage image)
image - The image.name - The name used as the key for the image - it does not need to be the file/resource
name of the image.public IImage getImage(String name)
name - The key name for the image as specified in addImage().
public void doDraw(Graphics g,
int options)
mImage
doDraw in class mImage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||