Package com.independentsoft.office.odf
Class Text
java.lang.Object
com.independentsoft.office.odf.Text
- All Implemented Interfaces:
IContentElement,IParagraphContent
Represents text in headings and paragraphs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Returns all content elements.Returns the parent content element.getValue()Gets the content.voidsetParent(IContentElement parent)Sets the parent content element.voidSets the content.toString()Converts the value of the current Text object to its equivalent string representation.
-
Constructor Details
-
Text
public Text()Initializes a new instance of the Text class. -
Text
Initializes a new instance of the Text class.- Parameters:
text- the text
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIParagraphContent- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current Text object to its equivalent string representation. Runs of spaces are encoded with the text:s element as required by the OpenDocument specification, because consumers collapse literal space sequences. Use the Tab and LineBreak classes for explicit tab stops and line breaks. -
getValue
Gets the content.- Returns:
- the value
-
setValue
Sets the content.- Parameters:
text- the new value
-