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
AResource
wrapping 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>
cache
private static java.lang.Float
DEFAULT_SCALE
private static java.util.logging.Logger
logger
-
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 SimpleZippedAnimation
getSimpleZippedAnimation()
Gets theSimpleZippedAnimation
represented by this resource.SimpleZippedAnimation
getSimpleZippedAnimation(float scale)
Get theSimpleZippedAnimation
using the specified scale.void
preload()
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 theSimpleZippedAnimation
represented by this resource.- Returns:
- The
SimpleZippedAnimation
in it's original size.
-
getSimpleZippedAnimation
public SimpleZippedAnimation getSimpleZippedAnimation(float scale)
Get theSimpleZippedAnimation
using the specified scale.- Parameters:
scale
- The scale of the requested animation.- Returns:
- The
SimpleZippedAnimation
.
-
-