|
||||||||||
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
|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
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()
TileItem s 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 |
---|
addToRemoveElement, equals, equals, getFreeColGameObject, getFreeColGameObject, getGame, getGameOptions, getIntegerID, getXMLElementTagName, hashCode, hasID, isDisposed, isUninitialized, readFromXML, setGame, setId, toSavedXML, toString, toXML, updateFreeColGameObject, updateID |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RESOURCE_ZINDEX
public static final int RUMOUR_ZINDEX
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 Locatable
newLocation
- The new Location
for the TileItem
.public Location getLocation()
TileItem
.
getLocation
in interface Locatable
TileItem
.public Tile getTile()
Tile
where this TileItem
is located,
or null
if it's location is Europe
.
getTile
in interface Locatable
public int getSpaceTaken()
TileItem
s do not take any space, and cannot be taken carried.
getSpaceTaken
in interface Locatable
public 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 |