public class XMLSentence extends org.docgene.model.AbstractStylableText implements org.docgene.model.SpanTextElement, ParagraphElement, FontType
TYPE_NONEBOLD, 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, setTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBackgroundColor, getColor, getFontFace, getNamedSize, getNumericSize, getParentStyle, getSize, getType, hasDecoration, hasFontFace, hasSize, setParentStylegetCustomStyles, getInlinedStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStylepublic XMLSentence(java.lang.String text)
text - the textpublic java.lang.String getDeclaration()
getDeclaration in interface StyledElementpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setStyle(java.lang.String style)
style - the style classpublic java.lang.String getStyle()
getStyle in interface org.docgene.model.StylableTextgetStyle in interface StyledElementpublic void endsWithNewLine(boolean endsWithNewLine)
endsWithNewLine in interface org.docgene.model.SpanTextElementendsWithNewLine - true if the sentence ends with a new linepublic boolean isEndingWithNewLine()
isEndingWithNewLine in interface org.docgene.model.SpanTextElementpublic void setText(java.lang.String text)
text - the textpublic java.lang.String getText()
getText in interface org.docgene.model.StylableTextpublic 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