rpg.core
Class ChatMarkup

java.lang.Object
  extended by rpg.core.ChatMarkup
All Implemented Interfaces:
java.io.Serializable

public class ChatMarkup
extends java.lang.Object
implements java.io.Serializable

ChatMarkup acts as a specifier for the formatting of a Chat message (or a piece of it). It holds a font name, point size, color, and three boolean flags: bold, underline, and italic.

See Also:
Serialized Form

Constructor Summary
ChatMarkup()
          Creates a default ChatMarkup container using 12-point SansSerif, in black, without any special characteristics.
ChatMarkup(GameIcon tmpl)
          Creates a ChatMarkup container using some GameIcon's voice characteristics as its starting point.
 
Method Summary
 boolean getFlagBold()
          Returns true if this markup indicates text should be in bold.
 boolean getFlagItalic()
          Returns true if this markup indicates text should be italicized.
 boolean getFlagUnderline()
          Returns true if this markup indicates text should be underlined.
 java.lang.String getFont()
          Returns the name of the font family to use for this markup.
 java.awt.Color getFontColor()
          Returns the font color to use for this markup.
 int getFontSize()
          Returns the point size of the font to use for this markup.
 void setFlagBold(boolean value)
          Sets whether this markup indicates text should be in bold.
 void setFlagItalic(boolean value)
          Sets whether this markup indicates text should be italicized.
 void setFlagUnderline(boolean value)
          Sets whether this markup indicates text should be underlined.
 void setFont(java.lang.String value)
          Sets the name of the font family to use for this markup.
 void setFontColor(java.awt.Color value)
          Sets the font color to use for this markup.
 void setFontSize(int value)
          Sets the point size of the font to use for this markup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatMarkup

public ChatMarkup()
Creates a default ChatMarkup container using 12-point SansSerif, in black, without any special characteristics.


ChatMarkup

public ChatMarkup(GameIcon tmpl)
Creates a ChatMarkup container using some GameIcon's voice characteristics as its starting point.

Method Detail

getFont

public java.lang.String getFont()
Returns the name of the font family to use for this markup.


setFont

public void setFont(java.lang.String value)
Sets the name of the font family to use for this markup. No validation is performed to verify thiat this is a valid font.


getFontSize

public int getFontSize()
Returns the point size of the font to use for this markup.


setFontSize

public void setFontSize(int value)
Sets the point size of the font to use for this markup. Any positive integer is accepted.


getFontColor

public java.awt.Color getFontColor()
Returns the font color to use for this markup.


setFontColor

public void setFontColor(java.awt.Color value)
Sets the font color to use for this markup.


getFlagBold

public boolean getFlagBold()
Returns true if this markup indicates text should be in bold.


setFlagBold

public void setFlagBold(boolean value)
Sets whether this markup indicates text should be in bold.


getFlagUnderline

public boolean getFlagUnderline()
Returns true if this markup indicates text should be underlined.


setFlagUnderline

public void setFlagUnderline(boolean value)
Sets whether this markup indicates text should be underlined.


getFlagItalic

public boolean getFlagItalic()
Returns true if this markup indicates text should be italicized.


setFlagItalic

public void setFlagItalic(boolean value)
Sets whether this markup indicates text should be italicized.