cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class ShowText

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ShowText

public class ShowText
extends CommandMessage

Representation of the GameBots2004 command SHTXT. Shows for specified amount of time or removes a text from players HUD.


Field Summary
protected  java.lang.String Player
          Name of the player on who's HUD should be the text shown.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.Boolean Show
          False if the message should be removed, true if it should be shown.
protected  java.lang.String Text
          The text that should be shown.
protected  java.awt.Color TextColor
          The color of text.
protected  java.lang.Double Time
          Number of seconds for which should be the text shown.
 
Constructor Summary
ShowText()
          Creates new instance of command ShowText.
ShowText(ShowText original)
          Cloning constructor.
ShowText(java.lang.String Player, java.lang.String Text, java.awt.Color TextColor, java.lang.Double Time, java.lang.Boolean Show)
          Creates new instance of command ShowText.
 
Method Summary
 java.lang.String getPlayer()
          Name of the player on who's HUD should be the text shown.
 java.lang.String getText()
          The text that should be shown.
 java.awt.Color getTextColor()
          The color of text.
 java.lang.Double getTime()
          Number of seconds for which should be the text shown.
 java.lang.Boolean isShow()
          False if the message should be removed, true if it should be shown.
 ShowText setPlayer(java.lang.String Player)
          Name of the player on who's HUD should be the text shown.
 ShowText setShow(java.lang.Boolean Show)
          False if the message should be removed, true if it should be shown.
 ShowText setText(java.lang.String Text)
          The text that should be shown.
 ShowText setTextColor(java.awt.Color TextColor)
          The color of text.
 ShowText setTime(java.lang.Double Time)
          Number of seconds for which should be the text shown.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Player

protected java.lang.String Player
Name of the player on who's HUD should be the text shown.


Text

protected java.lang.String Text
The text that should be shown.


TextColor

protected java.awt.Color TextColor
The color of text.


Time

protected java.lang.Double Time
Number of seconds for which should be the text shown. The default is until manual removal.


Show

protected java.lang.Boolean Show
False if the message should be removed, true if it should be shown.

Constructor Detail

ShowText

public ShowText(java.lang.String Player,
                java.lang.String Text,
                java.awt.Color TextColor,
                java.lang.Double Time,
                java.lang.Boolean Show)
Creates new instance of command ShowText. Shows for specified amount of time or removes a text from players HUD. Corresponding GameBots message for this command is SHTXT.

Parameters:
Player - Name of the player on who's HUD should be the text shown.
Text - The text that should be shown.
TextColor - The color of text.
Time - Number of seconds for which should be the text shown. The default is until manual removal.
Show - False if the message should be removed, true if it should be shown.

ShowText

public ShowText()
Creates new instance of command ShowText. Shows for specified amount of time or removes a text from players HUD. Corresponding GameBots message for this command is SHTXT.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


ShowText

public ShowText(ShowText original)
Cloning constructor.

Parameters:
original -
Method Detail

getPlayer

public java.lang.String getPlayer()
Name of the player on who's HUD should be the text shown.


setPlayer

public ShowText setPlayer(java.lang.String Player)
Name of the player on who's HUD should be the text shown.


getText

public java.lang.String getText()
The text that should be shown.


setText

public ShowText setText(java.lang.String Text)
The text that should be shown.


getTextColor

public java.awt.Color getTextColor()
The color of text.


setTextColor

public ShowText setTextColor(java.awt.Color TextColor)
The color of text.


getTime

public java.lang.Double getTime()
Number of seconds for which should be the text shown. The default is until manual removal.


setTime

public ShowText setTime(java.lang.Double Time)
Number of seconds for which should be the text shown. The default is until manual removal.


isShow

public java.lang.Boolean isShow()
False if the message should be removed, true if it should be shown.


setShow

public ShowText setShow(java.lang.Boolean Show)
False if the message should be removed, true if it should be shown.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()