|
||||||||||
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.
Constructor Summary | |
---|---|
SimpleZippedAnimation(java.io.InputStream zipStream)
Creates a new animation from a stream. |
|
SimpleZippedAnimation(java.net.URL url)
Creates a new animation from a stream generated by the provided URL. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.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 |