public final class TmxMap extends CustomPropertyProvider implements IMap, java.lang.Comparable<TmxMap>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_EXTENSION |
Constructor and Description |
---|
TmxMap() |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(ILayer layer)
Adds an
ILayer to the Layer list. |
void |
addLayer(int index,
ILayer layer)
Adds an
ILayer to the Layer list at the given index. |
int |
compareTo(TmxMap o) |
boolean |
equals(java.lang.Object anObject) |
void |
finish(java.net.URL location) |
java.awt.Color |
getBackgroundColor() |
java.awt.geom.Rectangle2D |
getBounds() |
protected int |
getChunkOffsetX() |
protected int |
getChunkOffsetY() |
java.util.List<Tileset> |
getExternalTilesets() |
java.util.List<IGroupLayer> |
getGroupLayers()
Gets the
IGroupLayer s contained in a Layer list. |
int |
getHeight() |
int |
getHexSideLength()
Gets the straight edges' length for hexagonal maps.
|
java.util.List<IImageLayer> |
getImageLayers()
Gets the
IImageLayer s contained in a Layer list. |
java.util.List<IMapObjectLayer> |
getMapObjectLayers()
Gets all MapObjectLayers in the Layer list.
|
java.lang.String |
getName() |
int |
getNextLayerId() |
int |
getNextObjectId()
Gets the next object id.
|
IMapOrientation |
getOrientation()
Gets the orientation.
|
java.net.URL |
getPath() |
java.util.List<ILayer> |
getRenderLayers()
Gets all render layers in the Layer list.
|
RenderOrder |
getRenderOrder()
Gets the renderorder.
|
java.awt.Dimension |
getSizeInPixels()
Gets the size in pixels.
|
java.awt.Dimension |
getSizeInTiles()
Gets the sizein tiles.
|
StaggerAxis |
getStaggerAxis()
Gets the staggering axis
|
StaggerIndex |
getStaggerIndex()
Gets the tile size.
|
java.lang.String |
getTiledVersion() |
int |
getTileHeight()
Gets the vertical tile size.
|
java.util.List<ITileLayer> |
getTileLayers()
Gets the
ITileLayer s contained in a Layer list. |
ITilesetEntry |
getTilesetEntry(int gid) |
java.util.List<ITileset> |
getTilesets()
Gets the tilesets.
|
java.awt.Dimension |
getTileSize()
Gets the tile size.
|
int |
getTileWidth()
Gets the horizontal tile size.
|
double |
getVersion()
Gets the version.
|
int |
getWidth() |
int |
hashCode() |
boolean |
isInfinite() |
void |
removeLayer(ILayer layer)
Removes an
ILayer from the Layer list. |
void |
removeLayer(int index)
Removes a layer from the Layer list.
|
void |
setHeight(int height) |
void |
setHexSideLength(int hexSideLength) |
void |
setName(java.lang.String name)
Sets the name.
|
void |
setOrientation(IMapOrientation orientation) |
void |
setPath(java.net.URL path) |
void |
setRenderOrder(RenderOrder renderorder) |
void |
setStaggerAxis(StaggerAxis staggerAxis) |
void |
setStaggerIndex(StaggerIndex staggerIndex) |
void |
setTiledVersion(java.lang.String tiledversion) |
void |
setTileHeight(int tileheight) |
void |
setTileWidth(int tilewidth) |
void |
setVersion(double version) |
void |
setWidth(int width) |
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, 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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getMapObject, getMapObjectLayer, getMapObjectLayer, getMapObjectLayer, getMapObjects, getMapObjects, getMapObjects, removeMapObject
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, 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
public static final java.lang.String FILE_EXTENSION
public java.util.List<IImageLayer> getImageLayers()
ILayerList
IImageLayer
s contained in a Layer list.getImageLayers
in interface ILayerList
List
of all IImageLayer
spublic int getNextObjectId()
getNextObjectId
in interface IMap
public int getNextLayerId()
getNextLayerId
in interface IMap
public IMapOrientation getOrientation()
IMap
getOrientation
in interface IMap
public RenderOrder getRenderOrder()
IMap
getRenderOrder
in interface IMap
public java.util.List<IMapObjectLayer> getMapObjectLayers()
ILayerList
getMapObjectLayers
in interface ILayerList
public java.awt.Dimension getSizeInPixels()
IMap
getSizeInPixels
in interface IMap
public java.awt.Dimension getSizeInTiles()
IMap
getSizeInTiles
in interface IMap
public java.util.List<ITileLayer> getTileLayers()
ILayerList
ITileLayer
s contained in a Layer list.getTileLayers
in interface ILayerList
List
of all ITileLayer
spublic java.util.List<ITileset> getTilesets()
IMap
getTilesets
in interface IMap
public ITilesetEntry getTilesetEntry(int gid)
getTilesetEntry
in interface IMap
public java.awt.Dimension getTileSize()
IMap
getTileSize
in interface IMap
public int getTileWidth()
IMap
getTileWidth
in interface IMap
public int getTileHeight()
IMap
getTileHeight
in interface IMap
public double getVersion()
IMap
getVersion
in interface IMap
public java.lang.String getTiledVersion()
getTiledVersion
in interface IMap
public java.util.List<IGroupLayer> getGroupLayers()
ILayerList
IGroupLayer
s contained in a Layer list.getGroupLayers
in interface ILayerList
List
of all IGroupLayer
spublic void setName(java.lang.String name)
IMap
public int getHexSideLength()
IMap
getHexSideLength
in interface IMap
public StaggerAxis getStaggerAxis()
IMap
getStaggerAxis
in interface IMap
public StaggerIndex getStaggerIndex()
IMap
getStaggerIndex
in interface IMap
public void setPath(java.net.URL path)
public void finish(java.net.URL location) throws TmxException
TmxException
public void addLayer(ILayer layer)
ILayerList
ILayer
to the Layer list.addLayer
in interface ILayerList
layer
- the layer to be addedpublic void addLayer(int index, ILayer layer)
ILayerList
ILayer
to the Layer list at the given index.addLayer
in interface ILayerList
index
- the indexlayer
- the layer to be addedpublic void removeLayer(ILayer layer)
ILayerList
ILayer
from the Layer list.removeLayer
in interface ILayerList
layer
- the layer to be removedpublic void removeLayer(int index)
ILayerList
removeLayer
in interface ILayerList
index
- the index of the layer to be removedpublic void setHeight(int height)
public void setOrientation(IMapOrientation orientation)
public void setRenderOrder(RenderOrder renderorder)
public void setTiledVersion(java.lang.String tiledversion)
public void setTileHeight(int tileheight)
public void setTileWidth(int tilewidth)
public void setHexSideLength(int hexSideLength)
public void setStaggerAxis(StaggerAxis staggerAxis)
public void setStaggerIndex(StaggerIndex staggerIndex)
public void setVersion(double version)
public void setWidth(int width)
public int compareTo(TmxMap o)
compareTo
in interface java.lang.Comparable<TmxMap>
public boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.List<ILayer> getRenderLayers()
ILayerList
getRenderLayers
in interface ILayerList
public java.util.List<Tileset> getExternalTilesets()
public java.awt.Color getBackgroundColor()
getBackgroundColor
in interface IMap
public boolean isInfinite()
isInfinite
in interface IMap
protected int getChunkOffsetX()
protected int getChunkOffsetY()