Class MapImage
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.MapImage
- All Implemented Interfaces:
ICustomPropertyProvider
,IMapImage
public class MapImage
extends CustomPropertyProvider
implements IMapImage
Constructor Summary
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object anObject)
Tests for equality between two map images.java.net.URL
getAbsoluteSourcePath()
java.awt.Dimension
getDimension()
Gets the dimension.int
getHeight()
Gets the height.java.lang.String
getSource()
Gets the source.java.awt.Color
getTransparentColor()
Gets the transparent color.int
getWidth()
Gets the width.int
hashCode()
Computes a hash code for this map image.void
setAbsoluteSourcePath(java.net.URL absolutePath)
void
setHeight(int height)
void
setSource(java.lang.String source)
void
setTransparentColor(java.awt.Color color)
void
setWidth(int width)
java.lang.String
toString()
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, finalize, getClass, notify, notifyAll, 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
getAbsoluteSourcePath
public java.net.URL getAbsoluteSourcePath()- Specified by:
getAbsoluteSourcePath
in interfaceIMapImage
getDimension
public java.awt.Dimension getDimension()Description copied from interface:IMapImage
Gets the dimension.- Specified by:
getDimension
in interfaceIMapImage
- Returns:
- the dimension
getWidth
public int getWidth()Description copied from interface:IMapImage
Gets the width.getHeight
public int getHeight()Description copied from interface:IMapImage
Gets the height.getSource
public java.lang.String getSource()Description copied from interface:IMapImage
Gets the source.getTransparentColor
public java.awt.Color getTransparentColor()Description copied from interface:IMapImage
Gets the transparent color.- Specified by:
getTransparentColor
in interfaceIMapImage
- Returns:
- the transparent color
setTransparentColor
public void setTransparentColor(java.awt.Color color)- Specified by:
setTransparentColor
in interfaceIMapImage
setSource
public void setSource(java.lang.String source)setAbsoluteSourcePath
public void setAbsoluteSourcePath(java.net.URL absolutePath)- Specified by:
setAbsoluteSourcePath
in interfaceIMapImage
setWidth
public void setWidth(int width)setHeight
public void setHeight(int height)equals
public boolean equals(java.lang.Object anObject)Description copied from interface:IMapImage
Tests for equality between two map images. Two map images are equal if they have the same absolute source path and the same transparent color.hashCode
public int hashCode()Computes a hash code for this map image. The hash code for a map image is equal to the hash code of its absolute source path xor the hash code of its transparent color.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code for this map image
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object