com.objectxp.msg.ems
Class EMSText

java.lang.Object
  extended by com.objectxp.msg.ems.EMSElement
      extended by com.objectxp.msg.ems.EMSText
All Implemented Interfaces:
java.io.Serializable

public class EMSText
extends EMSElement

This class represents a EMS Text fragment.

Since:
jSMS 1.7
See Also:
EMSMessage.add(EMSElement), Serialized Form

Constructor Summary
EMSText(java.lang.String text)
          Construct a new EMS Text element.
EMSText(java.lang.String text, EMSTextFormat style)
          Construct a new EMS Text element.
 
Method Summary
 EMSTextFormat getFormat()
          Returns the style assigned to this text element or null if no style is assigned.
 java.lang.String getText()
          Returns the text of this element.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EMSText

public EMSText(java.lang.String text)
Construct a new EMS Text element.

Parameters:
text - the text
Throws:
java.lang.IllegalArgumentException - if the text is null.

EMSText

public EMSText(java.lang.String text,
               EMSTextFormat style)
Construct a new EMS Text element.

Parameters:
text - The text
style - the text style to use for this element.
Throws:
java.lang.IllegalArgumentException - if the text is null.
Method Detail

getFormat

public EMSTextFormat getFormat()
Returns the style assigned to this text element or null if no style is assigned.


getText

public java.lang.String getText()
Returns the text of this element.

Returns:
the text.

toString

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


object XP, Inc. © 2000-2008. All rights reserved object XP