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

Package class diagram package 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  String Player
          Name of the player on who's HUD should be the text shown.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Boolean Show
          False if the message should be removed, true if it should be shown.
protected  String Text
          The text that should be shown.
protected  Color TextColor
          The color of text.
protected  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(String Player, String Text, Color TextColor, Double Time, Boolean Show)
          Creates new instance of command ShowText.
 
Method Summary
 String getPlayer()
          Name of the player on who's HUD should be the text shown.
 String getText()
          The text that should be shown.
 Color getTextColor()
          The color of text.
 Double getTime()
          Number of seconds for which should be the text shown.
 Boolean isShow()
          False if the message should be removed, true if it should be shown.
 ShowText setPlayer(String Player)
          Name of the player on who's HUD should be the text shown.
 ShowText setShow(Boolean Show)
          False if the message should be removed, true if it should be shown.
 ShowText setText(String Text)
          The text that should be shown.
 ShowText setTextColor(Color TextColor)
          The color of text.
 ShowText setTime(Double Time)
          Number of seconds for which should be the text shown.
 String toHtmlString()
           
 String toMessage()
           
 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 String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Player

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


Text

protected String Text
The text that should be shown.


TextColor

protected Color TextColor
The color of text.


Time

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


Show

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

Constructor Detail

ShowText

public ShowText(String Player,
                String Text,
                Color TextColor,
                Double Time,
                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 String getPlayer()
Name of the player on who's HUD should be the text shown.


setPlayer

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


getText

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


setText

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


getTextColor

public Color getTextColor()
The color of text.


setTextColor

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


getTime

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


setTime

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


isShow

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


setShow

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


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.