Class Layer
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
- All Implemented Interfaces:
ICustomPropertyProvider
,ILayer
- Direct Known Subclasses:
GroupLayer
,ImageLayer
,MapObjectLayer
,TileLayer
public abstract class Layer
extends CustomPropertyProvider
implements ILayer
Constructor Summary
Method Summary
Modifier and Type Method Description protected void
afterUnmarshal(javax.xml.bind.Unmarshaller u, java.lang.Object parent)
int
getHeight()
Gets the height.int
getId()
IMap
getMap()
java.lang.String
getName()
Gets the name.java.awt.Point
getOffset()
Gets both the X and the Y offset of the layer.int
getOffsetX()
Gets the horizontal offset of the layer.int
getOffsetY()
Gets the vertical offset of the layer.float
getOpacity()
Gets the opacity.RenderType
getRenderType()
java.awt.Dimension
getSizeInTiles()
Gets the size in tiles.int
getWidth()
Gets the width.boolean
isVisible()
Checks if is visible.void
setHeight(int height)
protected void
setMap(TmxMap map)
void
setName(java.lang.String name)
void
setOpacity(float opacity)
void
setRenderType(RenderType renderType)
void
setVisible(boolean visible)
void
setWidth(int width)
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, toString, 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
Constructor Details
Method Details
getHeight
public int getHeight()Gets the height.getId
public int getId()getName
public java.lang.String getName()Description copied from interface:ILayer
Gets the name.getOpacity
public float getOpacity()Description copied from interface:ILayer
Gets the opacity.- Specified by:
getOpacity
in interfaceILayer
- Returns:
- the opacity
getOffset
public java.awt.Point getOffset()Description copied from interface:ILayer
Gets both the X and the Y offset of the layer.getOffsetX
public int getOffsetX()Description copied from interface:ILayer
Gets the horizontal offset of the layer.- Specified by:
getOffsetX
in interfaceILayer
- Returns:
- the x offset
getOffsetY
public int getOffsetY()Description copied from interface:ILayer
Gets the vertical offset of the layer.- Specified by:
getOffsetY
in interfaceILayer
- Returns:
- the y offset
getRenderType
- Specified by:
getRenderType
in interfaceILayer
getSizeInTiles
public java.awt.Dimension getSizeInTiles()Description copied from interface:ILayer
Gets the size in tiles.- Specified by:
getSizeInTiles
in interfaceILayer
- Returns:
- the size in tiles
getWidth
public int getWidth()Gets the width.getMap
isVisible
public boolean isVisible()Description copied from interface:ILayer
Checks if is visible.setName
public void setName(java.lang.String name)setWidth
public void setWidth(int width)setHeight
public void setHeight(int height)setOpacity
public void setOpacity(float opacity)- Specified by:
setOpacity
in interfaceILayer
setRenderType
- Specified by:
setRenderType
in interfaceILayer
setVisible
public void setVisible(boolean visible)- Specified by:
setVisible
in interfaceILayer
setMap
afterUnmarshal
protected void afterUnmarshal(javax.xml.bind.Unmarshaller u, java.lang.Object parent)