rle.core.event
Class TextMessage

java.lang.Object
  extended by rle.core.event.Message
      extended by rle.core.event.TextMessage

public class TextMessage
extends Message

Represents an attribute-free text message.


Field Summary
protected  boolean acknowledgementRequired
           
protected  GameContext context
           
protected  java.util.List replacements
           
protected  java.lang.String templateText
           
 
Constructor Summary
TextMessage(GameContext context, java.lang.String messagePathId)
           
TextMessage(GameContext context, java.lang.String messagePathId, java.lang.Object... replacements)
           
TextMessage(java.lang.String templateText, java.lang.Object... replacements)
           
 
Method Summary
 GameContext getContext()
           
 java.util.List getReplacements()
           
 java.lang.String getTemplateText()
           
 java.lang.String getText()
          Get the text of this message in the current language, with any replacements substituted for tags.
 boolean isAcknowledgementRequired()
          Requires the acknowledgement of the user, ie requires the user to hit a key before continuing.
 void setAcknowledgementRequired(boolean b)
           
 void setContext(GameContext context)
           
 void setReplacements(java.util.List replacements)
           
 void setTemplateText(java.lang.String templateText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected GameContext context

templateText

protected java.lang.String templateText

replacements

protected java.util.List replacements

acknowledgementRequired

protected boolean acknowledgementRequired
Constructor Detail

TextMessage

public TextMessage(GameContext context,
                   java.lang.String messagePathId)

TextMessage

public TextMessage(GameContext context,
                   java.lang.String messagePathId,
                   java.lang.Object... replacements)

TextMessage

public TextMessage(java.lang.String templateText,
                   java.lang.Object... replacements)
Method Detail

getText

public java.lang.String getText()
Get the text of this message in the current language, with any replacements substituted for tags.

Specified by:
getText in class Message

getContext

public GameContext getContext()

setContext

public void setContext(GameContext context)

setTemplateText

public void setTemplateText(java.lang.String templateText)

getTemplateText

public java.lang.String getTemplateText()

setReplacements

public void setReplacements(java.util.List replacements)

getReplacements

public java.util.List getReplacements()

isAcknowledgementRequired

public boolean isAcknowledgementRequired()
Description copied from class: Message
Requires the acknowledgement of the user, ie requires the user to hit a key before continuing.

Specified by:
isAcknowledgementRequired in class Message

setAcknowledgementRequired

public void setAcknowledgementRequired(boolean b)