public class MapObject extends CustomPropertyProvider implements IMapObject
| Constructor and Description |
|---|
MapObject() |
MapObject(MapObject mapObjectToBeCopied)
Copy Constructor for copying instances of MapObjects.
|
MapObject(MapObject mapObjectToBeCopied,
boolean keepID)
Copy Constructor for copying instances of MapObjects.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IMapObject obj) |
java.awt.geom.Rectangle2D |
getBoundingBox()
Gets the hit box.
|
static java.awt.geom.Rectangle2D |
getBounds(IMapObject... objects) |
static java.awt.geom.Rectangle2D |
getBounds(java.lang.Iterable<IMapObject> objects) |
static java.awt.geom.Rectangle2D |
getBounds2D(IMapObject... objects) |
static java.awt.geom.Rectangle2D |
getBounds2D(java.lang.Iterable<IMapObject> objects) |
int |
getGridId()
Gets the grid id.
|
float |
getHeight() |
int |
getId()
Gets the id.
|
IMapObjectLayer |
getLayer() |
java.awt.geom.Point2D |
getLocation()
Gets the location.
|
java.lang.String |
getName()
Gets the name.
|
Polyline |
getPolyline() |
java.lang.String |
getType()
Gets the type.
|
float |
getWidth() |
float |
getX() |
float |
getY() |
void |
setGridId(int gid) |
void |
setHeight(float height) |
void |
setId(int id) |
protected void |
setLayer(MapObjectLayer layer) |
void |
setName(java.lang.String name) |
void |
setPolyline(Polyline polyline) |
void |
setType(java.lang.String type) |
void |
setWidth(float width) |
void |
setX(float x) |
void |
setY(float y) |
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValuepublic MapObject()
public MapObject(MapObject mapObjectToBeCopied)
mapObjectToBeCopied - the MapObject we want to copypublic MapObject(MapObject mapObjectToBeCopied, boolean keepID)
mapObjectToBeCopied - the MapObject we want to copykeepID - decide if the new instance will adopt the old MapObject's ID or get a new, unique one.public static java.awt.geom.Rectangle2D getBounds2D(IMapObject... objects)
public static java.awt.geom.Rectangle2D getBounds2D(java.lang.Iterable<IMapObject> objects)
public static java.awt.geom.Rectangle2D getBounds(IMapObject... objects)
public static java.awt.geom.Rectangle2D getBounds(java.lang.Iterable<IMapObject> objects)
public int compareTo(IMapObject obj)
compareTo in interface java.lang.Comparable<IMapObject>public int getGridId()
IMapObjectgetGridId in interface IMapObjectpublic java.awt.geom.Rectangle2D getBoundingBox()
IMapObjectgetBoundingBox in interface IMapObjectpublic int getId()
IMapObjectgetId in interface IMapObjectpublic java.awt.geom.Point2D getLocation()
IMapObjectgetLocation in interface IMapObjectpublic java.lang.String getName()
IMapObjectgetName in interface IMapObjectpublic java.lang.String getType()
getType in interface IMapObjectpublic Polyline getPolyline()
getPolyline in interface IMapObjectpublic void setGridId(int gid)
setGridId in interface IMapObjectpublic void setHeight(float height)
setHeight in interface IMapObjectpublic void setId(int id)
setId in interface IMapObjectpublic void setName(java.lang.String name)
setName in interface IMapObjectpublic void setType(java.lang.String type)
setType in interface IMapObjectpublic void setWidth(float width)
setWidth in interface IMapObjectpublic void setX(float x)
setX in interface IMapObjectpublic void setY(float y)
setY in interface IMapObjectpublic float getX()
getX in interface IMapObjectpublic float getY()
getY in interface IMapObjectpublic void setPolyline(Polyline polyline)
public float getWidth()
getWidth in interface IMapObjectpublic float getHeight()
getHeight in interface IMapObjectpublic IMapObjectLayer getLayer()
getLayer in interface IMapObjectprotected void setLayer(MapObjectLayer layer)