rle.core.event
Class TextMessageCause

java.lang.Object
  extended by rle.core.event.TextMessageCause
All Implemented Interfaces:
Cause

public class TextMessageCause
extends java.lang.Object
implements Cause

A general Cause implementation whose description is a Variant Mgr Message.


Field Summary
protected  GameContext context
           
protected  java.util.List replacements
           
protected  java.lang.Object source
           
protected  java.lang.String templateText
           
 
Constructor Summary
TextMessageCause(java.lang.Object source, GameContext context, java.lang.String messagePathId)
           
TextMessageCause(java.lang.Object source, GameContext context, java.lang.String messagePathId, java.lang.Object... replacements)
           
 
Method Summary
 java.lang.String getCauseDescription()
          Get the text of this message in the current language, with any replacements substituted for tags.
 GameContext getContext()
           
 java.util.List getReplacements()
           
 java.lang.Object getSource()
          The underlying Object that the Cause description refers to.
 java.lang.String getTemplateText()
           
 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

source

protected java.lang.Object source
Constructor Detail

TextMessageCause

public TextMessageCause(java.lang.Object source,
                        GameContext context,
                        java.lang.String messagePathId)

TextMessageCause

public TextMessageCause(java.lang.Object source,
                        GameContext context,
                        java.lang.String messagePathId,
                        java.lang.Object... replacements)
Method Detail

getSource

public java.lang.Object getSource()
Description copied from interface: Cause
The underlying Object that the Cause description refers to.

Specified by:
getSource in interface Cause

getCauseDescription

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

Specified by:
getCauseDescription in interface Cause

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()