|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.io.sza.SimpleZippedAnimation
public final class SimpleZippedAnimation
An animation made from images stored in a zip-file.
| Nested Class Summary | |
|---|---|
private static class |
SimpleZippedAnimation.ImageAnimationEventImpl
|
| Field Summary | |
|---|---|
private static java.lang.String |
ANIMATION_DESCRIPTOR_FILE
|
private java.util.List<AnimationEvent> |
events
|
private int |
height
|
private int |
width
|
| Constructor Summary | |
|---|---|
|
SimpleZippedAnimation(java.io.InputStream zipStream)
Creates a new animation from a stream. |
private |
SimpleZippedAnimation(java.util.List<AnimationEvent> events,
int width,
int height)
|
|
SimpleZippedAnimation(java.net.URL url)
Creates a new animation from a stream generated by the provided URL. |
private |
SimpleZippedAnimation(java.util.zip.ZipInputStream zipStream)
|
| Method Summary | |
|---|---|
SimpleZippedAnimation |
createScaledVersion(double scale)
Creates a scaled animation based on this object. |
int |
getHeight()
Gets the height of the animation. |
int |
getWidth()
Gets the width of the animation. |
java.util.Iterator<AnimationEvent> |
iterator()
Returns all of the animation events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String ANIMATION_DESCRIPTOR_FILE
private final java.util.List<AnimationEvent> events
private final int width
private final int height
| Constructor Detail |
|---|
public SimpleZippedAnimation(java.net.URL url)
throws java.io.IOException
url - The URL to read a zip-file from.
java.io.IOException - if the file cannot be opened, or
is invalid.
public SimpleZippedAnimation(java.io.InputStream zipStream)
throws java.io.IOException
zipStream - An InputStream to a zip-file.
java.io.IOException - if the file cannot be opened, or
is invalid.
private SimpleZippedAnimation(java.util.List<AnimationEvent> events,
int width,
int height)
private SimpleZippedAnimation(java.util.zip.ZipInputStream zipStream)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public int getWidth()
public int getHeight()
public java.util.Iterator<AnimationEvent> iterator()
iterator in interface java.lang.Iterable<AnimationEvent>Iterator with all the images
and other resources (support for sound may be
added later).public SimpleZippedAnimation createScaledVersion(double scale)
scale - The scaling factor (with 1 being normal size,
2 twice the size, 0.5 half the size etc).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||