public class Textbox extends Frame implements ListContainer, ParagraphContainer
mElement, mFrameContainer, mOwnerDocument, mStyleHandler| Modifier and Type | Method and Description |
|---|---|
List |
addList()
Add a new List to this container.
|
List |
addList(ListDecorator decorator)
Add a List with specified ListDecorator to this container.
|
Paragraph |
addParagraph(String textContent)
Add paragraph at the end of the container with specified text content.
|
void |
clearContent()
Remove all the content of this text box.
|
void |
clearList()
Remove all Lists from this container.
|
static Textbox |
getInstanceof(DrawTextBoxElement element)
Get a text box instance by an instance of
DrawTextBoxElement . |
OdfElement |
getListContainerElement()
Get the ODF element which can have
|
Iterator<List> |
getListIterator()
Return an Iterator of the Lists in this ListContainer.
|
DrawTextBoxElement |
getOdfElement()
Get the instance of
DrawTextBoxElement which represents this frame. |
Paragraph |
getParagraphByIndex(int index,
boolean isEmptyParagraphSkipped)
Return a paragraph with a given index.
|
Paragraph |
getParagraphByReverseIndex(int reverseIndex,
boolean isEmptyParagraphSkipped)
Return a paragraph with a given index.
|
OdfElement |
getParagraphContainerElement()
Get the ODF element which can have
|
Iterator<Paragraph> |
getParagraphIterator()
Return an Iterator of the paragraph in this container.
|
String |
getTextContent()
Get the text content of this text box.
|
static Textbox |
newTextbox(TextboxContainer container)
Create an instance of frame
|
boolean |
removeList(List list)
Remove the existing List from this container.
|
boolean |
removeParagraph(Paragraph para)
Remove paragraph from the container
|
void |
setTextContent(String content)
Set the text content of this text box.
|
getDesciption, getDrawFrameElement, getHyperlink, getInstanceof, getName, getRectangle, getStyleHandler, getTitle, newFrame, setBackgroundColor, setDescription, setHyperlink, setImage, setName, setRectangle, setTitlegetComponentByElement, getOwnerDocument, registerComponent, unregisterComponentpublic static Textbox getInstanceof(DrawTextBoxElement element)
DrawTextBoxElement .element - - the instance of DrawTextBoxElementpublic static Textbox newTextbox(TextboxContainer container)
The frame will be added at the end of this container.
container - - the frame container that contains this frame.public void setTextContent(String content)
This method will clear the content at first, and then create a paragraph with the given content.
content - - the text contentclearContent(),
addParagraph(String textContent)public void clearContent()
public String getTextContent()
TextExtractor.getText(OdfElement)public DrawTextBoxElement getOdfElement()
DrawTextBoxElement which represents this frame.getOdfElement in class FrameDrawTextBoxElementpublic List addList()
ListContaineraddList in interface ListContainerpublic List addList(ListDecorator decorator)
ListContaineraddList in interface ListContainerdecorator - the specified ListDecoratorpublic void clearList()
ListContainerclearList in interface ListContainerpublic OdfElement getListContainerElement()
ListContainergetListContainerElement in interface ListContainerpublic Iterator<List> getListIterator()
ListContainergetListIterator in interface ListContainerIteratorpublic boolean removeList(List list)
ListContainerremoveList in interface ListContainerpublic Paragraph addParagraph(String textContent)
ParagraphContaineraddParagraph in interface ParagraphContainertextContent - - the text contentpublic OdfElement getParagraphContainerElement()
ParagraphContainergetParagraphContainerElement in interface ParagraphContainerpublic boolean removeParagraph(Paragraph para)
ParagraphContainerremoveParagraph in interface ParagraphContainerpara - - the instance of paragraphpublic Paragraph getParagraphByIndex(int index, boolean isEmptyParagraphSkipped)
ParagraphContainerAn index of zero represents the first paragraph.
If empty paragraph is skipped, the empty paragraph won't be counted.
getParagraphByIndex in interface ParagraphContainerindex - - the index started from 0.isEmptyParagraphSkipped - - whether the empty paragraph is skipped or notpublic Paragraph getParagraphByReverseIndex(int reverseIndex, boolean isEmptyParagraphSkipped)
ParagraphContainerAn index of zero represents the last paragraph.
If empty paragraph is skipped, the empty paragraph won't be counted.
getParagraphByReverseIndex in interface ParagraphContainerreverseIndex - - the index started from 0 in reverse order.isEmptyParagraphSkipped - - whether the empty paragraph is skipped or notpublic Iterator<Paragraph> getParagraphIterator()
ParagraphContainergetParagraphIterator in interface ParagraphContainerCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.