|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.networking.DOMMessage
net.sf.freecol.common.networking.NewRegionNameMessage
public class NewRegionNameMessage
The message sent when naming a new region.
| Field Summary | |
|---|---|
private java.lang.String |
newRegionName
The new name. |
private java.lang.String |
regionId
The ID of the region being discovered. |
private java.lang.String |
tileId
The tile where the region is discovered. |
| Fields inherited from class net.sf.freecol.common.networking.DOMMessage |
|---|
document, logger |
| Constructor Summary | |
|---|---|
NewRegionNameMessage(Game game,
org.w3c.dom.Element element)
Create a new NewRegionNameMessage from a
supplied element. |
|
NewRegionNameMessage(Region region,
Tile tile,
java.lang.String newRegionName)
Create a new NewRegionNameMessage with the
supplied name. |
|
| Method Summary | |
|---|---|
java.lang.String |
getNewRegionName()
Public accessor for the new region name. |
Region |
getRegion(Game game)
Public accessor for the region. |
Tile |
getTile(Game game)
Public accessor for the tile. |
static java.lang.String |
getXMLElementTagName()
The tag name of the root element representing this object. |
org.w3c.dom.Element |
handle(FreeColServer server,
Player player,
Connection connection)
Handle a "newRegionName"-message. |
org.w3c.dom.Element |
toXMLElement()
Convert this NewRegionNameMessage to XML. |
| Methods inherited from class net.sf.freecol.common.networking.DOMMessage |
|---|
clientError, collapseElements, createError, createError, createNewDocument, createNewRootElement, elementToString, getAttribute, getChildElement, getDocument, getFreeColProtocolVersion, getType, hasAttribute, insertAsRoot, isType, setAttribute, setAttribute, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String regionId
private java.lang.String tileId
private java.lang.String newRegionName
| Constructor Detail |
|---|
public NewRegionNameMessage(Region region,
Tile tile,
java.lang.String newRegionName)
NewRegionNameMessage with the
supplied name.
region - The Region being discovered.tile - The Tile where the region is discovered.newRegionName - The default new region name.
public NewRegionNameMessage(Game game,
org.w3c.dom.Element element)
NewRegionNameMessage from a
supplied element.
game - The Game this message belongs to.element - The Element to use to create the message.| Method Detail |
|---|
public Region getRegion(Game game)
game - The Game to look for a region in.
public Tile getTile(Game game)
game - The Game to look for a tile in.
public java.lang.String getNewRegionName()
public org.w3c.dom.Element handle(FreeColServer server,
Player player,
Connection connection)
server - The FreeColServer handling the message.player - The Player the message applies to.connection - The Connection message was received on.
public org.w3c.dom.Element toXMLElement()
toXMLElement in class DOMMessagepublic static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||