|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.huguesjohnson.tiamat.Area
public class Area
Area - collection of layers and characters to represent an area
Field Summary | |
---|---|
protected java.lang.String |
absoluteDir
|
Constructor Summary | |
---|---|
Area()
Creates a new instance of Area. |
|
Area(Layer[] layers,
java.lang.String[] characterPaths,
Formatter formatter)
Creates a new instance of Area. |
Method Summary | |
---|---|
void |
addCharacter(java.lang.String characterPath,
Formatter formatter)
Adds a Character to this Area. |
void |
addLayer(Layer layer)
Adds a Layer to this Area. |
Character |
getCharacter(int index)
Get the character at the specified index. |
java.lang.String[] |
getCharacterPaths()
Returns the paths to the serialized character files. |
Character[] |
getCharacters()
Returns the Characters in this Area. |
Layer |
getLayer(int index)
|
Layer[] |
getLayers()
Returns the Layers for this Area. |
void |
onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
The onDeserialize event should be fired after an object is de-serialized. |
void |
setAbsoluteDir(java.lang.String absoluteDir)
Sets the absolute working directory for files. |
void |
setCharacters(java.lang.String[] characterPaths,
Formatter formatter)
Sets the Characters in this Area. |
void |
setLayers(Layer[] layers)
Sets the Layers for this Area. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.lang.String absoluteDir
Constructor Detail |
---|
public Area()
public Area(Layer[] layers, java.lang.String[] characterPaths, Formatter formatter)
layers
- The Layers for this Area.characterPaths
- The relative paths to the serialized character files.formatter
- The formatter to use to deserialize the characters.Method Detail |
---|
public void setLayers(Layer[] layers)
layers
- The new Layers for this Area.public Layer[] getLayers()
public void addLayer(Layer layer)
layer
- The Layer to add.public Character[] getCharacters()
public java.lang.String[] getCharacterPaths()
public void setCharacters(java.lang.String[] characterPaths, Formatter formatter)
characterPaths
- The relative paths to the serialized character files.formatter
- The formatter to use to deserialize the characters.public void addCharacter(java.lang.String characterPath, Formatter formatter)
characterPath
- The relative path to the serialized character files.formatter
- The formatter to use to deserialize the characters.public void setAbsoluteDir(java.lang.String absoluteDir)
absoluteDir
- The full path to the working directory.public Character getCharacter(int index)
index
- The index of the Character to get.
public Layer getLayer(int index)
public void onDeserialize(Formatter formatter, java.lang.String absoluteDir)
onDeserialize
in interface Storable
formatter
- the formatter to use to load any storable membersabsoluteDir
- the working directory since all paths stored in the object should be relative
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |