|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.odftoolkit.simple.Component
org.odftoolkit.simple.text.Span
public class Span
This class represents the application of a style to the character data of a portion of text.
It provides convenient methods to create a span and manipulate attributes of a span.
| Method Summary | |
|---|---|
void |
appendTextContent(String content)
Append the text content at the end of this paragraph. |
static Span |
getInstanceof(TextSpanElement sElement)
Get a span instance by an instance of TextSpanElement. |
TextSpanElement |
getOdfElement()
Return the instance of "text:span" element |
Document |
getOwnerDocument()
Get the owner document of this span |
DefaultStyleHandler |
getStyleHandler()
Get the style handler of this span. |
String |
getTextContent()
Return the text content of this span. |
static Span |
newSpan(TextSelection textSelection)
Create a span instance with a text selection |
void |
removeTextContent()
Remove the text content of this span. |
void |
setTextContent(String content)
Set the text content of this span. |
| Methods inherited from class org.odftoolkit.simple.Component |
|---|
getComponentByElement, registerComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Span getInstanceof(TextSpanElement sElement)
TextSpanElement.
sElement - - the instance of TextSpanElement
public static Span newSpan(TextSelection textSelection)
text -
TextSelectionpublic DefaultStyleHandler getStyleHandler()
The style handler is an instance of DefaultStyleHandler
DefaultStyleHandlerpublic Document getOwnerDocument()
getOwnerDocument in class Componentpublic TextSpanElement getOdfElement()
getOdfElement in class Componentpublic void removeTextContent()
public void setTextContent(String content)
All the existing text content of this paragraph would be removed, and then new text content would be set.
content - - the text contentpublic String getTextContent()
The other child elements except text content will not be returned.
public void appendTextContent(String content)
content - - the text content
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||