Class MapObjectLayer
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
de.gurkenlabs.litiengine.environment.tilemap.xml.MapObjectLayer
- All Implemented Interfaces:
ICustomPropertyProvider
,ILayer
,IMapObjectLayer
public class MapObjectLayer
extends Layer
implements IMapObjectLayer
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_MAPOBJECTLAYER_NAME
Constructor Summary
Constructors Constructor Description MapObjectLayer()
Instantiates a newMapObjectLayer
instance.MapObjectLayer(MapObjectLayer original)
Instantiates a newMapObjectLayer
instance by copying from the specified original.Method Summary
Modifier and Type Method Description void
addMapObject(IMapObject mapObject)
protected void
afterUnmarshal(javax.xml.bind.Unmarshaller u, java.lang.Object parent)
java.awt.Color
getColor()
java.lang.String
getColorHexString()
java.util.List<IMapObject>
getMapObjects()
Gets the shapes.java.util.Collection<IMapObject>
getMapObjects(int... mapIDs)
java.util.Collection<IMapObject>
getMapObjects(java.lang.String... types)
java.awt.Dimension
getSizeInTiles()
Gets the size in tiles.void
removeMapObject(IMapObject mapObject)
void
setColor(java.lang.String color)
java.lang.String
toString()
Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
getHeight, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getWidth, isVisible, setHeight, setMap, setName, setOpacity, setRenderType, setVisible, setWidth
Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ILayer
getHeight, getId, getMap, getName, getOffset, getOffsetX, getOffsetY, getOpacity, getRenderType, getWidth, isVisible, setHeight, setName, setOpacity, setRenderType, setVisible, setWidth
Field Details
DEFAULT_MAPOBJECTLAYER_NAME
public static final java.lang.String DEFAULT_MAPOBJECTLAYER_NAME- See Also:
- Constant Field Values
Constructor Details
MapObjectLayer
public MapObjectLayer()Instantiates a newMapObjectLayer
instance.MapObjectLayer
Instantiates a newMapObjectLayer
instance by copying from the specified original.- Parameters:
original
- the layer we want to copy
Method Details
getMapObjects
Description copied from interface:IMapObjectLayer
Gets the shapes.- Specified by:
getMapObjects
in interfaceIMapObjectLayer
- Returns:
- the shapes
removeMapObject
- Specified by:
removeMapObject
in interfaceIMapObjectLayer
getSizeInTiles
public java.awt.Dimension getSizeInTiles()Description copied from interface:ILayer
Gets the size in tiles.- Specified by:
getSizeInTiles
in interfaceILayer
- Overrides:
getSizeInTiles
in classLayer
- Returns:
- the size in tiles
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
addMapObject
- Specified by:
addMapObject
in interfaceIMapObjectLayer
getColor
public java.awt.Color getColor()- Specified by:
getColor
in interfaceIMapObjectLayer
getColorHexString
public java.lang.String getColorHexString()- Specified by:
getColorHexString
in interfaceIMapObjectLayer
setColor
public void setColor(java.lang.String color)- Specified by:
setColor
in interfaceIMapObjectLayer
getMapObjects
- Specified by:
getMapObjects
in interfaceIMapObjectLayer
getMapObjects
- Specified by:
getMapObjects
in interfaceIMapObjectLayer
afterUnmarshal
protected void afterUnmarshal(javax.xml.bind.Unmarshaller u, java.lang.Object parent)- Overrides:
afterUnmarshal
in classLayer