public class Tile extends CustomPropertyProvider implements ITile
Modifier and Type | Field and Description |
---|---|
static Tile |
EMPTY |
protected static int |
FLIPPED_DIAGONALLY_FLAG |
protected static int |
FLIPPED_HORIZONTALLY_FLAG |
protected static int |
FLIPPED_VERTICALLY_FLAG |
static int |
NONE |
Constructor and Description |
---|
Tile()
Instantiates a new
Tile instance. |
Tile(int gidBitmask)
Instantiates a new
Tile instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object anObject)
Tests for equality between two tiles.
|
int |
getGridId()
Gets the grid id.
|
java.awt.image.BufferedImage |
getImage() |
java.util.Map<java.lang.String,ICustomProperty> |
getProperties()
Returns a
Map view of the custom properties for this ICustomPropertyProvider . |
java.awt.Point |
getTileCoordinate()
Gets the tile coordinate.
|
ITilesetEntry |
getTilesetEntry() |
boolean |
hasCustomProperty(java.lang.String name)
Checks if a custom property with the given name is present.
|
int |
hashCode()
Computes a hash code for this tile.
|
boolean |
isFlipped() |
boolean |
isFlippedDiagonally() |
boolean |
isFlippedHorizontally() |
boolean |
isFlippedVertically() |
void |
setProperties(java.util.Map<java.lang.String,ICustomProperty> props)
Sets all of the custom properties on this object to the provided values.
|
void |
setTileCoordinate(java.awt.Point tileCoordinate)
Sets the tile coordinate.
|
java.lang.String |
toString() |
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, removeProperty, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, removeProperty, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
public static final int NONE
public static final Tile EMPTY
protected static final int FLIPPED_HORIZONTALLY_FLAG
protected static final int FLIPPED_VERTICALLY_FLAG
protected static final int FLIPPED_DIAGONALLY_FLAG
public Tile()
Tile
instance.public Tile(int gidBitmask)
Tile
instance.gidBitmask
- The grid ID bitmask used to identify flags of this instance.FLIPPED_HORIZONTALLY_FLAG
,
FLIPPED_DIAGONALLY_FLAG
,
FLIPPED_VERTICALLY_FLAG
public boolean hasCustomProperty(java.lang.String name)
ICustomPropertyProvider
hasCustomProperty
in interface ICustomPropertyProvider
hasCustomProperty
in class CustomPropertyProvider
name
- the name of the custom propertypublic java.util.Map<java.lang.String,ICustomProperty> getProperties()
ICustomPropertyProvider
Map
view of the custom properties for this ICustomPropertyProvider
.getProperties
in interface ICustomPropertyProvider
getProperties
in class CustomPropertyProvider
Map
view of the custom properties for this ICustomPropertyProvider
public void setProperties(java.util.Map<java.lang.String,ICustomProperty> props)
ICustomPropertyProvider
setProperties
in interface ICustomPropertyProvider
setProperties
in class CustomPropertyProvider
props
- the new list of propertiespublic boolean isFlippedDiagonally()
isFlippedDiagonally
in interface ITile
public boolean isFlippedHorizontally()
isFlippedHorizontally
in interface ITile
public boolean isFlippedVertically()
isFlippedVertically
in interface ITile
public int getGridId()
ITile
public java.awt.Point getTileCoordinate()
ITile
getTileCoordinate
in interface ITile
public void setTileCoordinate(java.awt.Point tileCoordinate)
tileCoordinate
- the new tile coordinatepublic boolean equals(java.lang.Object anObject)
ITile
public int hashCode()
ITile
public java.lang.String toString()
toString
in class java.lang.Object
public ITilesetEntry getTilesetEntry()
getTilesetEntry
in interface ITile