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 IMapImageConstructor Summary
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object anObject)Tests for equality between two map images.java.net.URLgetAbsoluteSourcePath()java.awt.DimensiongetDimension()Gets the dimension.intgetHeight()Gets the height.java.lang.StringgetSource()Gets the source.java.awt.ColorgetTransparentColor()Gets the transparent color.intgetWidth()Gets the width.inthashCode()Computes a hash code for this map image.voidsetAbsoluteSourcePath(java.net.URL absolutePath)voidsetHeight(int height)voidsetSource(java.lang.String source)voidsetTransparentColor(java.awt.Color color)voidsetWidth(int width)java.lang.StringtoString()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, setValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getAbsoluteSourcePathin interfaceIMapImage
getDimension
public java.awt.Dimension getDimension()Description copied from interface:IMapImageGets the dimension.- Specified by:
getDimensionin interfaceIMapImage- Returns:
- the dimension
getWidth
public int getWidth()Description copied from interface:IMapImageGets the width.getHeight
public int getHeight()Description copied from interface:IMapImageGets the height.getSource
public java.lang.String getSource()Description copied from interface:IMapImageGets the source.getTransparentColor
public java.awt.Color getTransparentColor()Description copied from interface:IMapImageGets the transparent color.- Specified by:
getTransparentColorin interfaceIMapImage- Returns:
- the transparent color
setTransparentColor
public void setTransparentColor(java.awt.Color color)- Specified by:
setTransparentColorin interfaceIMapImage
setSource
public void setSource(java.lang.String source)setAbsoluteSourcePath
public void setAbsoluteSourcePath(java.net.URL absolutePath)- Specified by:
setAbsoluteSourcePathin 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:IMapImageTests 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:
hashCodein classjava.lang.Object- Returns:
- The hash code for this map image
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
