net.sf.freecol.common.resources
Class SZAResource

java.lang.Object
  extended by net.sf.freecol.common.resources.Resource
      extended by net.sf.freecol.common.resources.SZAResource

public class SZAResource
extends Resource

A Resource wrapping a SimpleZippedAnimation.

See Also:
Resource, SimpleZippedAnimation

Field Summary
private  java.lang.Object loadingLock
           
private static java.util.logging.Logger logger
           
private  java.util.Map<java.lang.Double,SimpleZippedAnimation> scaledSzAnimations
           
private  SimpleZippedAnimation szAnimation
           
 
Constructor Summary
SZAResource(java.net.URI resourceLocator)
          Do not use directly.
 
Method Summary
 SimpleZippedAnimation getSimpleZippedAnimation()
          Gets the SimpleZippedAnimation represented by this resource.
 SimpleZippedAnimation getSimpleZippedAnimation(double scale)
          Returns the SimpleZippedAnimation using the specified scale.
 void preload()
          Preloading the animation.
 
Methods inherited from class net.sf.freecol.common.resources.Resource
getResourceLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

SZAResource

SZAResource(java.net.URI resourceLocator)
Do not use directly.

Parameters:
resourceLocator - The URI used when loading this resource.
See Also:
ResourceFactory.createResource(URI)
Method Detail

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.