public class XMLSentence extends AbstractStylableText implements SpanTextElement, ParagraphElement, FontType
TYPE_NONE
BOLD, ITALIC, REGULAR, STRIKETHROUGH, SUBSCRIPT, SUPERSCRIPT, UNDERLINE
Constructor and Description |
---|
XMLSentence(java.lang.String text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addTextAfter(java.lang.String suffix)
Add characters after the sentence text.
|
void |
addTextBefore(java.lang.String prefix)
Add characters before the sentence text.
|
void |
endsWithNewLine(boolean endsWithNewLine)
Sets if the sentence ends with a new line.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.lang.String |
getStyle()
Return the style class of the element.
|
java.lang.String |
getText()
Return the text.
|
boolean |
isEmpty()
Return true if the sentence is empty.
|
boolean |
isEndingWithNewLine()
Return true if the sentence ends with a new line.
|
void |
setStyle(java.lang.String style)
Set the style class of the element.
|
void |
setText(java.lang.String text)
Set the text.
|
java.lang.String |
toString() |
getBackgroundColor, getColor, getFontFace, getNamedSize, getNumericSize, getParentStyle, getSize, getType, hasDecoration, hasFontFace, hasSize, setBackgroundColor, setColor, setFontFace, setParentStyle, setSize, setSize, setType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBackgroundColor, getColor, getFontFace, getNamedSize, getNumericSize, getParentStyle, getSize, getType, hasDecoration, hasFontFace, hasSize, setParentStyle
getCustomStyles, getInlinedStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStyle
public XMLSentence(java.lang.String text)
text
- the textpublic java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
public java.lang.String toString()
toString
in class java.lang.Object
public void setStyle(java.lang.String style)
style
- the style classpublic java.lang.String getStyle()
getStyle
in interface StylableText
getStyle
in interface StyledElement
public void endsWithNewLine(boolean endsWithNewLine)
endsWithNewLine
in interface SpanTextElement
endsWithNewLine
- true if the sentence ends with a new linepublic boolean isEndingWithNewLine()
isEndingWithNewLine
in interface SpanTextElement
public void setText(java.lang.String text)
text
- the textpublic java.lang.String getText()
getText
in interface StylableText
public void addTextBefore(java.lang.String prefix)
prefix
- the prefix characterspublic void addTextAfter(java.lang.String suffix)
suffix
- the suffix characterspublic boolean isEmpty()
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence