Package 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
AResourcewrapping aSimpleZippedAnimation.- See Also:
Resource,SimpleZippedAnimation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.freecol.common.resources.Resource
Resource.Cleanable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<java.lang.Float,SimpleZippedAnimation>cacheprivate static java.lang.FloatDEFAULT_SCALEprivate static java.util.logging.Loggerlogger
-
Constructor Summary
Constructors Constructor Description SZAResource(java.lang.String primaryKey, java.net.URI resourceLocator)Do not use directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleZippedAnimationgetSimpleZippedAnimation()Gets theSimpleZippedAnimationrepresented by this resource.SimpleZippedAnimationgetSimpleZippedAnimation(float scale)Get theSimpleZippedAnimationusing the specified scale.voidpreload()Preloading the animation.-
Methods inherited from class net.sf.freecol.common.resources.Resource
getPrimaryKey, getResourceLocator
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
DEFAULT_SCALE
private static final java.lang.Float DEFAULT_SCALE
-
cache
private final java.util.HashMap<java.lang.Float,SimpleZippedAnimation> cache
-
-
Method Detail
-
getSimpleZippedAnimation
public SimpleZippedAnimation getSimpleZippedAnimation()
Gets theSimpleZippedAnimationrepresented by this resource.- Returns:
- The
SimpleZippedAnimationin it's original size.
-
getSimpleZippedAnimation
public SimpleZippedAnimation getSimpleZippedAnimation(float scale)
Get theSimpleZippedAnimationusing the specified scale.- Parameters:
scale- The scale of the requested animation.- Returns:
- The
SimpleZippedAnimation.
-
-