net.sf.freecol.server.model
Class ServerRegion
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObject
net.sf.freecol.common.model.Region
net.sf.freecol.server.model.ServerRegion
- All Implemented Interfaces:
- Nameable, Named
public class ServerRegion
- extends Region
Method Summary |
void |
addTile(Tile tile)
Add the given Tile to this Region. |
java.awt.Rectangle |
getBounds()
Get the Bounds value. |
Map.Position |
getCenter()
Return the center of the Region's bounding box. |
int |
getSize()
Get the Size value. |
void |
setBounds(java.awt.Rectangle newBounds)
Set the Bounds value. |
void |
setSize(int newSize)
Set the Size value. |
Methods inherited from class net.sf.freecol.common.model.Region |
discover, getChildren, getDiscoverableRegion, getDiscoveredBy, getDiscoveredIn, getDisplayName, getName, getNameKey, getParent, getScoreValue, getType, getTypeName, getXMLElementTagName, isClaimable, isDiscoverable, isLeaf, isPacific, isPrediscovered, isRoot, setChildren, setClaimable, setDiscoverable, setDiscoveredBy, setDiscoveredIn, setName, setNameKey, setParent, setPrediscovered, setScoreValue, setType, toString |
Methods inherited from class net.sf.freecol.common.model.FreeColGameObject |
addToRemoveElement, dispose, equals, equals, getFreeColGameObject, getFreeColGameObject, getGame, getGameOptions, getIntegerID, hashCode, hasID, isDisposed, isUninitialized, readFromXML, setGame, setId, toSavedXML, toXML, updateFreeColGameObject, updateID |
Methods inherited from class net.sf.freecol.common.model.FreeColObject |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ServerRegion
public ServerRegion(Game game,
java.lang.String nameKey,
Region.RegionType type)
ServerRegion
public ServerRegion(Game game,
java.lang.String nameKey,
Region.RegionType type,
Region parent)
getSize
public final int getSize()
- Get the
Size
value.
- Returns:
- an
int
value
setSize
public final void setSize(int newSize)
- Set the
Size
value.
- Parameters:
newSize
- The new Size value.
getBounds
public final java.awt.Rectangle getBounds()
- Get the
Bounds
value.
- Returns:
- a
Rectangle
value
setBounds
public final void setBounds(java.awt.Rectangle newBounds)
- Set the
Bounds
value.
- Parameters:
newBounds
- The new Bounds value.
addTile
public void addTile(Tile tile)
- Add the given Tile to this Region.
- Parameters:
tile
- a Tile
value
getCenter
public Map.Position getCenter()
- Return the center of the Region's bounding box.
- Returns:
- a
Position
value