public abstract class Layer extends java.lang.Object implements org.mini2Dx.gdx.utils.Disposable, GameDataSerializable
TiledMap layers| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PROPERTY_MAP_SIZE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProperty(java.lang.String propertyName)
Returns if the layer contains the specified property
|
void |
dispose() |
boolean |
equals(java.lang.Object o) |
static Layer |
fromInputStream(java.io.DataInputStream inputStream) |
int |
getIndex()
Returns the index in the
TiledMap of this layer |
LayerType |
getLayerType() |
java.lang.String |
getName()
Returns the name of this layer
|
org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,java.lang.String> |
getProperties()
Returns the properties
ObjectMap of this Layer |
java.lang.String |
getProperty(java.lang.String propertyName)
Returns the value of a specified property
|
int |
hashCode() |
boolean |
isVisible()
Returns if this
Layer is visible |
void |
readData(java.io.DataInputStream inputStream)
Deserializes this object from a
DataInputStream |
void |
setIndex(int index)
Sets the index in the
TiledMap of this layer |
void |
setName(java.lang.String name)
Sets the name of this layer
|
void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Sets the value of a specified property
|
void |
setVisible(boolean visible)
Sets if this
Layer is visible |
java.lang.String |
toString() |
void |
writeData(java.io.DataOutputStream outputStream)
Serializes this object to a
DataOutputStream |
public Layer(LayerType layerType)
public static Layer fromInputStream(java.io.DataInputStream inputStream) throws java.io.IOException
java.io.IOExceptionpublic void dispose()
dispose in interface org.mini2Dx.gdx.utils.Disposablepublic void writeData(java.io.DataOutputStream outputStream)
throws java.io.IOException
GameDataSerializableDataOutputStreamwriteData in interface GameDataSerializableoutputStream - The DataOutputStream to write tojava.io.IOException - Thrown if an error occurs during I/Opublic void readData(java.io.DataInputStream inputStream)
throws java.io.IOException
GameDataSerializableDataInputStreamreadData in interface GameDataSerializableinputStream - The DataInputStream to read fromjava.io.IOException - Thrown if an error occurs during I/Opublic java.lang.String getName()
public void setName(java.lang.String name)
name - The name to setpublic int getIndex()
TiledMap of this layerpublic void setIndex(int index)
TiledMap of this layerindex - The index of the layerpublic boolean containsProperty(java.lang.String propertyName)
propertyName - The property name to search forpublic java.lang.String getProperty(java.lang.String propertyName)
propertyName - The property name to search forpublic void setProperty(java.lang.String propertyName,
java.lang.String value)
propertyName - The property name to set the value forvalue - The value of the property to setpublic org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,java.lang.String> getProperties()
ObjectMap of this Layerpublic boolean isVisible()
Layer is visiblepublic void setVisible(boolean visible)
Layer is visiblevisible - True if visiblepublic LayerType getLayerType()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object