|
||||||||||
| 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.draw.Frame
org.odftoolkit.simple.draw.Textbox
public class Textbox
This class provides method to set the content, properties and style of text box.
| Field Summary |
|---|
| Fields inherited from class org.odftoolkit.simple.draw.Frame |
|---|
mElement, mFrameContainer, mOwnerDocument, mStyleHandler |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.odftoolkit.simple.draw.Frame |
|---|
getDesciption, getDrawFrameElement, getHyperlink, getInstanceof, getName, getRectangle, getStyleHandler, getTitle, newFrame, setBackgroundColor, setDescription, setHyperlink, setImage, setName, setRectangle, setTitle |
| Methods inherited from class org.odftoolkit.simple.Component |
|---|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Textbox getInstanceof(DrawTextBoxElement element)
DrawTextBoxElement
.
element - - the instance of DrawTextBoxElement
public 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()
ListContainer
addList in interface ListContainerpublic List addList(ListDecorator decorator)
ListContainer
addList in interface ListContainerdecorator - the specified ListDecorator
public void clearList()
ListContainer
clearList in interface ListContainerpublic OdfElement getListContainerElement()
ListContainer
getListContainerElement in interface ListContainerpublic Iterator<List> getListIterator()
ListContainer
getListIterator in interface ListContainerIteratorpublic boolean removeList(List list)
ListContainer
removeList in interface ListContainerpublic Paragraph addParagraph(String textContent)
ParagraphContainer
addParagraph in interface ParagraphContainertextContent - - the text content
public OdfElement getParagraphContainerElement()
ParagraphContainer
getParagraphContainerElement in interface ParagraphContainerpublic boolean removeParagraph(Paragraph para)
ParagraphContainer
removeParagraph in interface ParagraphContainerpara - - the instance of paragraph
public 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 not
public 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 not
public Iterator<Paragraph> getParagraphIterator()
ParagraphContainer
getParagraphIterator in interface ParagraphContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||