|
||||||||||
| 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.Paragraph
public class Paragraph
This class presents paragraph in ODF document. It provides methods to manipulate text content, and other child component under the paragraph.
| Method Summary | |
|---|---|
Textbox |
addTextbox()
Add a text box |
Textbox |
addTextbox(FrameRectangle position)
Add a text box with a specific size at a specific position |
void |
appendTextContent(String content)
Append the text content at the end of this paragraph. |
void |
appendTextContentNotCollapsed(String content)
Append the text content at the end of this paragraph. |
OdfElement |
getFrameContainerElement()
Get the ODF element which can have |
static Paragraph |
getInstanceof(TextPElement pElement)
Get a paragraph instance by an instance of TextPElement. |
TextPElement |
getOdfElement()
Return the instance of "text:p" element |
Document |
getOwnerDocument()
Get the owner document of this paragraph |
DefaultStyleHandler |
getStyleHandler()
Get the style handler of this paragraph. |
String |
getStyleName()
Get the style name of this paragraph |
Textbox |
getTextboxByName(String name)
Return a text box whose name is a given value. |
List<Textbox> |
getTextboxByUsage(PresentationDocument.PresentationClass usage)
This method is only useful in presentation slide. |
Iterator<Textbox> |
getTextboxIterator()
Return an Iterator of the text objects in this container. |
String |
getTextContent()
Return the text content of this paragraph. |
static Paragraph |
newParagraph(ParagraphContainer container)
Create an instance of paragraph |
boolean |
removeTextbox(Textbox box)
Remove the text box |
void |
removeTextContent()
Remove the text content of this paragraph. |
void |
setStyleName(String styleName)
Set the style name of this paragraph |
void |
setTextContent(String content)
Set the text content of this paragraph. |
void |
setTextContentNotCollapsed(String content)
Set the text content of this paragraph. |
| 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 Paragraph getInstanceof(TextPElement pElement)
TextPElement.
pElement - - the instance of TextPElement
public static Paragraph newParagraph(ParagraphContainer container)
The paragrah will be added at the end of this container.
container - - the paragraph container that contains this paragraph.public void setTextContent(String content)
All the existing text content of this paragraph would be removed, and then new text content would be set.
The white space characters in the content would be collapsed by default.
For example, tab character would be replaced with
content - - the text contentsetTextContentNotCollapsed(String content)
public void removeTextContent()
The other child elements except text content will not be removed.
public String getTextContent()
The other child elements except text content will not be returned.
public void setTextContentNotCollapsed(String content)
All the existing text content of this paragraph would be removed, and then new text content would be set.
The white space characters in the content would not be collapsed.
content - - the text contentsetTextContent(String content)public void appendTextContent(String content)
The white space characters in the content would be collapsed by default.
For example, tab character would be replaced with
content - - the text contentappendTextContentNotCollapsed(String content)
public void appendTextContentNotCollapsed(String content)
The white space characters in the content would not be collapsed.
content - - the text contentappendTextContent(String content)public void setStyleName(String styleName)
styleName - - the style namepublic String getStyleName()
public Document getOwnerDocument()
getOwnerDocument in class Componentpublic DefaultStyleHandler getStyleHandler()
The style handler is an instance of DefaultStyleHandler
DefaultStyleHandlerpublic TextPElement getOdfElement()
getOdfElement in class Componentpublic Textbox addTextbox()
TextboxContainer
addTextbox in interface TextboxContainerpublic Iterator<Textbox> getTextboxIterator()
TextboxContainer
getTextboxIterator in interface TextboxContainerpublic boolean removeTextbox(Textbox box)
TextboxContainer
removeTextbox in interface TextboxContainerbox - - the instance of text box
public OdfElement getFrameContainerElement()
FrameContainer
getFrameContainerElement in interface FrameContainerpublic Textbox addTextbox(FrameRectangle position)
TextboxContainer
addTextbox in interface TextboxContainerposition - - the rectangle (position and size) of this text box
public Textbox getTextboxByName(String name)
TextboxContainer
getTextboxByName in interface TextboxContainername - - the name of the text box
public List<Textbox> getTextboxByUsage(PresentationDocument.PresentationClass usage)
TextboxContainerThis method will return a list of text boxs by the usage in presentation slides.
getTextboxByUsage in interface TextboxContainerusage - - the usage description
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||