public final class TmxMap extends CustomPropertyProvider implements IMap
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE_EXTENSION |
| Constructor and Description |
|---|
TmxMap() |
TmxMap(IMapOrientation orientation) |
| 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. |
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
IGroupLayers contained in a Layer list. |
int |
getHeight()
Gets the map height in tiles.
|
int |
getHexSideLength()
Gets the straight edges' length for hexagonal maps.
|
java.util.List<IImageLayer> |
getImageLayers()
Gets the
IImageLayers 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
ITileLayers 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()
Gets the map width in tiles.
|
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) |
java.lang.String |
toString() |
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, setValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMapObject, getMapObjectLayer, getMapObjectLayer, getMapObjectLayer, getMapObjects, getMapObjects, getMapObjects, removeMapObjectgetBoolValue, 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, setValuepublic static final java.lang.String FILE_EXTENSION
public TmxMap()
public TmxMap(IMapOrientation orientation)
public java.util.List<IImageLayer> getImageLayers()
ILayerListIImageLayers contained in a Layer list.getImageLayers in interface ILayerListList of all IImageLayerspublic int getNextObjectId()
getNextObjectId in interface IMappublic int getNextLayerId()
getNextLayerId in interface IMappublic IMapOrientation getOrientation()
IMapgetOrientation in interface IMappublic RenderOrder getRenderOrder()
IMapgetRenderOrder in interface IMappublic java.util.List<IMapObjectLayer> getMapObjectLayers()
ILayerListgetMapObjectLayers in interface ILayerListpublic java.awt.Dimension getSizeInPixels()
IMapgetSizeInPixels in interface IMappublic java.awt.Dimension getSizeInTiles()
IMapgetSizeInTiles in interface IMappublic java.util.List<ITileLayer> getTileLayers()
ILayerListITileLayers contained in a Layer list.getTileLayers in interface ILayerListList of all ITileLayerspublic java.util.List<ITileset> getTilesets()
IMapgetTilesets in interface IMappublic ITilesetEntry getTilesetEntry(int gid)
getTilesetEntry in interface IMappublic java.awt.Dimension getTileSize()
IMapgetTileSize in interface IMappublic int getTileWidth()
IMapgetTileWidth in interface IMappublic int getTileHeight()
IMapgetTileHeight in interface IMappublic double getVersion()
IMapgetVersion in interface IMappublic java.lang.String getTiledVersion()
getTiledVersion in interface IMappublic java.util.List<IGroupLayer> getGroupLayers()
ILayerListIGroupLayers contained in a Layer list.getGroupLayers in interface ILayerListList of all IGroupLayerspublic void setName(java.lang.String name)
IMappublic int getWidth()
IMappublic int getHeight()
IMappublic int getHexSideLength()
IMapgetHexSideLength in interface IMappublic StaggerAxis getStaggerAxis()
IMapgetStaggerAxis in interface IMappublic StaggerIndex getStaggerIndex()
IMapgetStaggerIndex in interface IMappublic void setPath(java.net.URL path)
public void finish(java.net.URL location)
throws TmxException
TmxExceptionpublic void addLayer(ILayer layer)
ILayerListILayer to the Layer list.addLayer in interface ILayerListlayer - the layer to be addedpublic void addLayer(int index,
ILayer layer)
ILayerListILayer to the Layer list at the given index.addLayer in interface ILayerListindex - the indexlayer - the layer to be addedpublic void removeLayer(ILayer layer)
ILayerListILayer from the Layer list.removeLayer in interface ILayerListlayer - the layer to be removedpublic void removeLayer(int index)
ILayerListremoveLayer in interface ILayerListindex - 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 java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object anObject)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.List<ILayer> getRenderLayers()
ILayerListgetRenderLayers in interface ILayerListpublic java.util.List<Tileset> getExternalTilesets()
public java.awt.Color getBackgroundColor()
getBackgroundColor in interface IMappublic boolean isInfinite()
isInfinite in interface IMapprotected int getChunkOffsetX()
protected int getChunkOffsetY()