com.spire.xls
Class RichTextObject

java.lang.Object
  extended by com.spire.xls.RichTextObject
All Implemented Interfaces:
IOptimizedUpdate, IRichTextString
Direct Known Subclasses:
RichText

public class RichTextObject
extends java.lang.Object
implements IRichTextString


Field Summary
 IRichTextString m_richText
          Parent range.
 
Constructor Summary
RichTextObject(IRichTextString richText)
           
 
Method Summary
 void append(java.lang.String text, IFont font)
          Appends rich text string with specified text and font.
 void beginUpdate()
          This method should be called before several updates to the object will take place.
 void clear()
          Clears all.
 void clearFormatting()
          Clears formatting.
 void endUpdate()
          This method should be called after several updates to the object took place.
 IFont getFont(int position)
          Returns font for character at specified position.
 java.lang.Object getParent()
           
 java.lang.String getRtfText()
          Gets rtf text.
 java.lang.String getText()
          Gets text;
 boolean isFormatted()
          Indicates whether rich text string contains formatting read-only.
 void setFont(int startPos, int endPos, IFont font)
          Sets font for specified range of characters.
 void setText(java.lang.String text)
          Sets text;
 

Field Detail

m_richText

public IRichTextString m_richText
Parent range.

Constructor Detail

RichTextObject

public RichTextObject(IRichTextString richText)
Method Detail

getFont

public IFont getFont(int position)
Returns font for character at specified position.

Specified by:
getFont in interface IRichTextString
Parameters:
position - Position of the symbol.
Returns:
Font for character at specified position if it is equal for all cells in the parent range, otherwise NULL is returned.

setFont

public void setFont(int startPos,
                    int endPos,
                    IFont font)
Sets font for specified range of characters.

Specified by:
setFont in interface IRichTextString
Parameters:
startPos - First character to set font.
endPos - Last character to set.
font - Font to set.

clearFormatting

public void clearFormatting()
Clears formatting.

Specified by:
clearFormatting in interface IRichTextString

clear

public void clear()
Clears all.

Specified by:
clear in interface IRichTextString

getText

public java.lang.String getText()
Gets text;

Specified by:
getText in interface IRichTextString

setText

public void setText(java.lang.String text)
Sets text;

Specified by:
setText in interface IRichTextString

getRtfText

public java.lang.String getRtfText()
Gets rtf text. Read-only.

Specified by:
getRtfText in interface IRichTextString

isFormatted

public boolean isFormatted()
Indicates whether rich text string contains formatting read-only.

Specified by:
isFormatted in interface IRichTextString

getParent

public java.lang.Object getParent()

beginUpdate

public void beginUpdate()
This method should be called before several updates to the object will take place.

Specified by:
beginUpdate in interface IOptimizedUpdate

endUpdate

public void endUpdate()
This method should be called after several updates to the object took place.

Specified by:
endUpdate in interface IOptimizedUpdate

append

public void append(java.lang.String text,
                   IFont font)
Description copied from interface: IRichTextString
Appends rich text string with specified text and font.

Specified by:
append in interface IRichTextString
Parameters:
text - Text to append.
font - Font to use.