public class Tile extends CustomPropertyProvider implements ITile, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static Tile |
EMPTY |
protected static long |
FLIPPED_DIAGONALLY_FLAG |
protected static long |
FLIPPED_DIAGONALLY_FLAG_CSV |
protected static long |
FLIPPED_HORIZONTALLY_FLAG |
protected static long |
FLIPPED_HORIZONTALLY_FLAG_CSV |
protected static long |
FLIPPED_VERTICALLY_FLAG |
protected static long |
FLIPPED_VERTICALLY_FLAG_CSV |
static int |
NONE |
| Constructor and Description |
|---|
Tile() |
Tile(int gid) |
Tile(long gidBitmask,
boolean csv) |
| Modifier and Type | Method and Description |
|---|---|
ITileAnimation |
getAnimation() |
int |
getGridId()
Gets the grid id.
|
int |
getId() |
java.util.List<Property> |
getProperties()
Enumerates the custom properties for this object.
|
java.lang.String |
getStringValue(java.lang.String name,
java.lang.String defaultValue)
Gets the string value of the custom property with the provided name.
|
ITerrain[] |
getTerrain() |
protected int[] |
getTerrainIds() |
java.awt.Point |
getTileCoordinate()
Gets the tile coordinate.
|
boolean |
hasCustomProperty(java.lang.String name)
Checks if a custom property with the given name is present.
|
boolean |
isFlipped() |
boolean |
isFlippedDiagonally() |
boolean |
isFlippedHorizontally() |
boolean |
isFlippedVertically() |
protected void |
setCustomPropertySource(ITile source) |
void |
setProperties(java.util.List<Property> props)
Sets all of the custom properties on this object to the provided values.
|
protected void |
setTerrains(ITerrain[] terrains) |
void |
setTileCoordinate(java.awt.Point tileCoordinate)
Sets the tile coordinate.
|
void |
setValue(java.lang.String name,
java.lang.String value)
Sets the value for the custom property with the given name to the given string.
|
java.lang.String |
toString() |
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getShortValue, getShortValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getShortValue, getShortValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValuepublic static final int NONE
public static final Tile EMPTY
protected static final long FLIPPED_HORIZONTALLY_FLAG
protected static final long FLIPPED_VERTICALLY_FLAG
protected static final long FLIPPED_DIAGONALLY_FLAG
protected static final long FLIPPED_HORIZONTALLY_FLAG_CSV
protected static final long FLIPPED_VERTICALLY_FLAG_CSV
protected static final long FLIPPED_DIAGONALLY_FLAG_CSV
public Tile()
public Tile(int gid)
public Tile(long gidBitmask,
boolean csv)
public boolean hasCustomProperty(java.lang.String name)
ICustomPropertyProviderhasCustomProperty in interface ICustomPropertyProviderhasCustomProperty in class CustomPropertyProvidername - the name of the custom propertypublic java.util.List<Property> getProperties()
ICustomPropertyProvidergetProperties in interface ICustomPropertyProvidergetProperties in class CustomPropertyProviderICustomPropertyProviderpublic void setProperties(java.util.List<Property> props)
ICustomPropertyProvidersetProperties in interface ICustomPropertyProvidersetProperties in class CustomPropertyProviderprops - the new list of propertiespublic java.lang.String getStringValue(java.lang.String name,
java.lang.String defaultValue)
ICustomPropertyProvidergetStringValue in interface ICustomPropertyProvidergetStringValue in class CustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public void setValue(java.lang.String name,
java.lang.String value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidersetValue in class CustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic boolean isFlippedDiagonally()
isFlippedDiagonally in interface ITilepublic boolean isFlippedHorizontally()
isFlippedHorizontally in interface ITilepublic boolean isFlippedVertically()
isFlippedVertically in interface ITilepublic int getGridId()
ITilepublic java.awt.Point getTileCoordinate()
ITilegetTileCoordinate in interface ITilepublic void setTileCoordinate(java.awt.Point tileCoordinate)
tileCoordinate - the new tile coordinatepublic ITerrain[] getTerrain()
getTerrain in interface ITilepublic ITileAnimation getAnimation()
getAnimation in interface ITilepublic java.lang.String toString()
toString in class java.lang.Objectprotected int[] getTerrainIds()
protected void setTerrains(ITerrain[] terrains)
protected void setCustomPropertySource(ITile source)