public class ConstantFileImageAnimation extends Object implements ImageAnimation
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstantFileImageAnimation.Builder
Builder object.
|
| Constructor and Description |
|---|
ConstantFileImageAnimation(ConstantFileImageAnimation.Builder builder)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static ConstantFileImageAnimation |
create(String framePath,
int frameDuration,
int numFrames)
Creates new instance.
|
RenderedImage |
getFrame(int index)
Returns the frame on the the specified index.
|
int |
getFrameDuration()
Returns duration of one frame in milliseconds.
|
int |
getFrameHeight()
Returns frame height.
|
int |
getFrameWidth()
Returns frame width.
|
int |
getNumFrames()
Returns total number of frames.
|
String |
toString() |
public ConstantFileImageAnimation(ConstantFileImageAnimation.Builder builder)
builder - builder objectpublic int getFrameWidth()
ImageAnimationgetFrameWidth in interface ImageAnimationpublic int getFrameHeight()
ImageAnimationgetFrameHeight in interface ImageAnimationpublic int getNumFrames()
ImageAnimationgetNumFrames in interface ImageAnimationpublic int getFrameDuration()
ImageAnimationgetFrameDuration in interface ImageAnimationpublic RenderedImage getFrame(int index)
ImageAnimationgetFrame in interface ImageAnimationindex - index of the frame, must be in interval [0, numFrames - 1]public static ConstantFileImageAnimation create(String framePath, int frameDuration, int numFrames)
framePath - path to the frame imageframeDuration - frame durationnumFrames - number of framesCopyright © 2016. All rights reserved.