|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.betabeans.scroogexhtml.dom.FormattedText
public final class FormattedText
ScroogeXHTML splits the RTF text into small pieces which have the same
character properties, for example a sequence of underlined characters. Every
piece is stored in an instance of the FormattedText class. This class has
methods to set the character properties and to call the converter which
generates the output code for it.
If a text element listener has been defined using ScroogeXHTMLBase.addAfterTextConversionListener()
, the text element listener
will receive each piece of text in the textElement method before it is
converted. It is possible to modify the text and / or the text properties
there.
Paragraph
,
Document
,
Serialized FormConstructor Summary | |
---|---|
FormattedText(Paragraph aparagraph)
Constructor for the FormattedText object. |
Method Summary | |
---|---|
void |
add(char c)
Add a character to the text. |
void |
add(java.lang.String text)
Add a string to the text. |
java.lang.String |
docTextToString()
Call the converter for this text element. |
CharacterProperties |
getCP()
Gets the character properties. |
Paragraph |
getParagraph()
Gets the paragraph attribute. |
java.lang.String |
getText()
get the text of the text object. |
protected boolean |
hasText()
Checks if the text element is empty. |
boolean |
isEncoded()
Gets the encoded attribute. |
void |
setEncoded(boolean e)
Sets the encoded attribute. |
void |
setText(java.lang.String newValue)
Set the text of the text object. |
protected void |
setTextProperties(CharacterProperties acp)
set the text properties of the text object. |
java.lang.String |
toPlainText()
Return plain text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.betabeans.scroogexhtml.dom.DocumentNode |
---|
toString |
Constructor Detail |
---|
public FormattedText(Paragraph aparagraph)
aparagraph
- The owner paragraph.Method Detail |
---|
public void setEncoded(boolean e)
e
- The new encoded valuepublic void setText(java.lang.String newValue)
newValue
- the new textprotected void setTextProperties(CharacterProperties acp)
acp
- The new textProperties valuepublic CharacterProperties getCP()
public boolean isEncoded()
public java.lang.String getText()
public Paragraph getParagraph()
public void add(char c)
add
in interface DocumentNode
c
- The character to be added.public void add(java.lang.String text)
add
in interface DocumentNode
text
- The String to be added.public java.lang.String docTextToString()
public java.lang.String toPlainText()
protected boolean hasText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |