net.sf.freecol.common.resources
Class SZAResource
java.lang.Object
net.sf.freecol.common.resources.Resource
net.sf.freecol.common.resources.SZAResource
public class SZAResource
- extends Resource
A Resource wrapping a SimpleZippedAnimation.
- See Also:
Resource,
SimpleZippedAnimation
|
Constructor Summary |
SZAResource(java.net.URI resourceLocator)
Do not use directly. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
scaledSzAnimations
private java.util.Map<java.lang.Double,SimpleZippedAnimation> scaledSzAnimations
szAnimation
private SimpleZippedAnimation szAnimation
loadingLock
private volatile java.lang.Object loadingLock
SZAResource
SZAResource(java.net.URI resourceLocator)
- Do not use directly.
- Parameters:
resourceLocator - The URI used when loading this
resource.- See Also:
ResourceFactory.createResource(URI)
preload
public void preload()
- Preloading the animation.
- Specified by:
preload in class Resource
getSimpleZippedAnimation
public SimpleZippedAnimation getSimpleZippedAnimation()
- Gets the
SimpleZippedAnimation represented by this resource.
- Returns:
- The
SimpleZippedAnimation in it's original size.
getSimpleZippedAnimation
public SimpleZippedAnimation getSimpleZippedAnimation(double scale)
- Returns the
SimpleZippedAnimation using the specified scale.
- Parameters:
scale - The size of the requested animation (with 1 being normal
size, 2 twice the size, 0.5 half the size etc). Rescaling
will be performed unless using 1.
- Returns:
- The
SimpleZippedAnimation.