public class XMLSpan extends java.lang.Object implements org.docgene.model.StylableText, org.docgene.model.SpanTextElement, FontType
TYPE_NONEBOLD, ITALIC, REGULAR, STRIKETHROUGH, SUBSCRIPT, SUPERSCRIPT, UNDERLINE| Constructor and Description |
|---|
XMLSpan(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 |
getBackgroundColor()
Return the html background color of the text.
|
java.lang.String |
getColor()
Return the html color of the text.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.lang.String |
getFontFace()
Return the font face of the text.
|
java.lang.String |
getNamedSize()
Return the HTML named size of the text.
|
int |
getNumericSize()
Return the numeric size of the text.
|
XMLTextStyle |
getParentStyle()
Return null.
|
java.lang.String |
getSize()
Return the size of the text.
|
java.lang.String |
getStyle()
Return the style class of the element.
|
java.lang.String |
getText()
Return the text.
|
int |
getType()
Return the font type of the text.
|
boolean |
hasDecoration()
Return true if the text has a decoration.
|
boolean |
hasFontFace()
Return true if the text has a font face.
|
boolean |
hasSize()
Return true if the text has a size.
|
boolean |
isEmpty()
Return true if the sentence is empty.
|
boolean |
isEndingWithNewLine()
Return true if the sentence ends with a new line.
|
void |
setBackgroundColor(java.lang.String background)
Set the html background color of the text.
|
void |
setColor(java.lang.String color)
Set the html color of the text.
|
void |
setFontFace(java.lang.String fontFace)
Set the font face of the text.
|
void |
setParentStyle(XMLTextStyle parentStyle)
Do nothing.
|
void |
setSize(int size)
Set the size of the text.
|
void |
setSize(java.lang.String namedSize)
Set the HTML named size of the text.
|
void |
setStyle(java.lang.String style)
Set the style class of the element.
|
void |
setText(java.lang.String text)
Set the text.
|
void |
setType(int type)
Set the font type of the text.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCustomStyles, getInlinedStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStylepublic XMLSpan(java.lang.String text)
text - the textpublic XMLTextStyle getParentStyle()
getParentStyle in interface org.docgene.model.StylableTextpublic 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 setType(int type)
type - the font typeFontTypepublic int getType()
getType in interface org.docgene.model.StylableTextFontTypepublic void setSize(java.lang.String namedSize)
namedSize - the HTML named sizepublic void setSize(int size)
size - the size of the textpublic java.lang.String getNamedSize()
getNamedSize in interface org.docgene.model.StylableTextpublic boolean hasSize()
hasSize in interface org.docgene.model.StylableTextpublic java.lang.String getSize()
getSize in interface org.docgene.model.StylableTextpublic int getNumericSize()
getNumericSize in interface org.docgene.model.StylableTextpublic void setFontFace(java.lang.String fontFace)
fontFace - the font face of the textpublic java.lang.String getFontFace()
getFontFace in interface org.docgene.model.StylableTextpublic boolean hasFontFace()
hasFontFace in interface org.docgene.model.StylableTextpublic boolean hasDecoration()
hasDecoration in interface org.docgene.model.StylableTextpublic void setColor(java.lang.String color)
color - the html color of the textpublic java.lang.String getColor()
getColor in interface org.docgene.model.StylableTextpublic void setBackgroundColor(java.lang.String background)
background - the html background color of the textpublic java.lang.String getBackgroundColor()
getBackgroundColor in interface org.docgene.model.StylableTextpublic 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()
public void setParentStyle(XMLTextStyle parentStyle)
setParentStyle in interface org.docgene.model.StylableTextparentStyle - the parent styleCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence