blackboard.base
Class FormattedText

java.lang.Object
  extended by blackboard.base.FormattedText

public class FormattedText
extends java.lang.Object

The FormattedText class provides a means for storing a piece of text along with a companion formatting specification. FormattedText objects encapsulate Smart Text, Plain Text, and HTML Text as used in the user interface.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class FormattedText.Type
          Enumeration class to specify possible text formats.
 
Constructor Summary
FormattedText()
          Default constructor; creates an empty string with FormattedText.Type.SMART.
FormattedText(java.lang.String strText, FormattedText.Type eType)
          Constructor, presets the string value and type.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Overrides the equals() method in Object to provide a simple way to compare two FormattedText objects.
 java.lang.String getText()
          Returns the text associated with this FormattedText.
 FormattedText.Type getType()
          Returns the format type for this FormattedText.
 java.lang.String toString()
          Returns the contents of this BbFile object as a single line separated list of name value pairs of this object's properties.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormattedText

public FormattedText()
Default constructor; creates an empty string with FormattedText.Type.SMART.


FormattedText

public FormattedText(java.lang.String strText,
                     FormattedText.Type eType)
Constructor, presets the string value and type.

Method Detail

getType

public FormattedText.Type getType()
Returns the format type for this FormattedText.

Returns:
a type value as defined in FormattedText.Type
See Also:
FormattedText.Type

getText

public java.lang.String getText()
Returns the text associated with this FormattedText.

Returns:
the text value of this FormattedText as a String

equals

public boolean equals(java.lang.Object obj)
Overrides the equals() method in Object to provide a simple way to compare two FormattedText objects.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to be compared.
Returns:
true if the two Objects are the same, false otherwise.

toString

public java.lang.String toString()
Returns the contents of this BbFile object as a single line separated list of name value pairs of this object's properties. This method can be used for debug purposes.

Overrides:
toString in class java.lang.Object
Returns:
a String that represents the contents of this object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.