|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObject
net.sf.freecol.common.model.TileItem
public abstract class TileItem
Represents a TileItem item on a Tile.
| Field Summary | |
|---|---|
static int |
RESOURCE_ZINDEX
|
static int |
RUMOUR_ZINDEX
|
protected Tile |
tile
|
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
TileItem(Game game,
org.w3c.dom.Element e)
Initiates a new TileItem from an Element. |
|
TileItem(Game game,
java.lang.String id)
Initiates a new TileItem
with the given ID. |
|
TileItem(Game game,
Tile tile)
Creates a new TileItem. |
|
TileItem(Game game,
javax.xml.stream.XMLStreamReader in)
Initiates a new TileItem from an Element. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes this TileItem. |
Location |
getLocation()
Gets the location of this TileItem. |
int |
getSpaceTaken()
TileItems do not take any space, and cannot be taken carried. |
Tile |
getTile()
Returns the Tile where this TileItem is located,
or null if it's location is Europe. |
abstract int |
getZIndex()
Get the ZIndex value. |
void |
setLocation(Location newLocation)
Sets the location for this TileItem. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
addModelMessage, addModelMessage, addModelMessage, addToRemoveElement, equals, equals, getFreeColGameObject, getFreeColGameObject, getGame, getGameOptions, getIntegerID, getXMLElementTagName, hashCode, hasID, isDisposed, isUninitialized, readFromXML, readFromXMLPartialByClass, setFakeID, setGame, setId, toSavedXML, toString, toXML, toXMLImpl, toXMLImpl, toXMLPartialByClass, updateFreeColGameObject, updateID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int RESOURCE_ZINDEX
public static final int RUMOUR_ZINDEX
protected Tile tile
| Constructor Detail |
|---|
public TileItem(Game game,
Tile tile)
TileItem.
game - The Game in which this object belong.tile - The location of the Settlement.
public TileItem(Game game,
javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
TileItem from an Element.
game - The Game in which this object belong.in - The input stream containing the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
public TileItem(Game game,
org.w3c.dom.Element e)
TileItem from an Element.
game - The Game in which this object belong.e - An XML-element that will be used to initialize
this object.
public TileItem(Game game,
java.lang.String id)
TileItem
with the given ID. The object should later be
initialized by calling either
FreeColGameObject.readFromXML(XMLStreamReader) or
FreeColObject.readFromXMLElement(Element).
game - The Game in which this object belong.id - The unique identifier for this object.| Method Detail |
|---|
public void setLocation(Location newLocation)
TileItem.
setLocation in interface LocatablenewLocation - The new Location for the TileItem.public Location getLocation()
TileItem.
getLocation in interface LocatableTileItem.public Tile getTile()
Tile where this TileItem is located,
or null if it's location is Europe.
getTile in interface Locatablepublic int getSpaceTaken()
TileItems do not take any space, and cannot be taken carried.
getSpaceTaken in interface Locatablepublic abstract int getZIndex()
ZIndex value.
int valuepublic void dispose()
dispose in class FreeColGameObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||