public class BundledComponentRepository extends Object implements DirectionCodes, ComponentRepository
ResourceManager| Modifier and Type | Class and Description |
|---|---|
static class |
BundledComponentRepository.TileSetFrameImage
Used to provide multiframe images using data obtained from a tileset.
|
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST| Constructor and Description |
|---|
BundledComponentRepository(ResourceManager rmgr,
ImageManager imgr,
String name)
Constructs a repository which will obtain its resource set from the supplied resource
manager.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<ActionSequence> |
enumerateActionSequences()
Iterates over the
ActionSequence instances representing every available action
sequence. |
Iterator<ComponentClass> |
enumerateComponentClasses()
Iterates over the
ComponentClass instances representing all available character
component classes. |
Iterator<Integer> |
enumerateComponentIds(ComponentClass compClass)
Iterates over the component ids of all components in the specified class.
|
CharacterComponent |
getComponent(int componentId)
Returns the
CharacterComponent object for the given component identifier. |
CharacterComponent |
getComponent(String className,
String compName)
Returns the
CharacterComponent object with the given component class and name. |
ComponentClass |
getComponentClass(String className)
Returns the
ComponentClass with the specified name or null if none exists with that
name. |
void |
setWipeOnFailure(boolean wipeOnFailure)
Configures the bundled component repository to wipe any bundles that report certain kinds of
failure.
|
public BundledComponentRepository(ResourceManager rmgr, ImageManager imgr, String name) throws IOException
rmgr - the resource manager from which to obtain our resource set.imgr - the image manager that we'll use to decode and cache images.name - the name of the resource set from which we will be loading our component data.IOException - thrown if an I/O error occurs while reading our metadata from the
resource bundles.public void setWipeOnFailure(boolean wipeOnFailure)
public CharacterComponent getComponent(int componentId) throws NoSuchComponentException
ComponentRepositoryCharacterComponent object for the given component identifier.getComponent in interface ComponentRepositoryNoSuchComponentExceptionpublic CharacterComponent getComponent(String className, String compName) throws NoSuchComponentException
ComponentRepositoryCharacterComponent object with the given component class and name.getComponent in interface ComponentRepositoryNoSuchComponentExceptionpublic ComponentClass getComponentClass(String className)
ComponentRepositoryComponentClass with the specified name or null if none exists with that
name.getComponentClass in interface ComponentRepositorypublic Iterator<ComponentClass> enumerateComponentClasses()
ComponentRepositoryComponentClass instances representing all available character
component classes.enumerateComponentClasses in interface ComponentRepositorypublic Iterator<ActionSequence> enumerateActionSequences()
ComponentRepositoryActionSequence instances representing every available action
sequence.enumerateActionSequences in interface ComponentRepositorypublic Iterator<Integer> enumerateComponentIds(ComponentClass compClass)
ComponentRepositoryenumerateComponentIds in interface ComponentRepositoryCopyright © 2015. All rights reserved.