|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odftoolkit.simple.text.AbstractParagraphContainer
public abstract class AbstractParagraphContainer
AbstractParagraphContainer is an abstract class to present paragraph container. It contains the default implementation to add/get/remove paragraph. Each subclass needs to implement getParagraphContainerElement().
Constructor Summary | |
---|---|
AbstractParagraphContainer()
|
Method Summary | |
---|---|
Paragraph |
addParagraph(String textContent)
Add paragraph at the end of the container with specified text content. |
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. |
abstract OdfElement |
getParagraphContainerElement()
Get the ODF element which can have |
Iterator<Paragraph> |
getParagraphIterator()
Return an Iterator of the paragraph in this container. |
boolean |
removeParagraph(Paragraph para)
Remove paragraph from the container |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractParagraphContainer()
Method Detail |
---|
public abstract OdfElement getParagraphContainerElement()
ParagraphContainer
getParagraphContainerElement
in interface ParagraphContainer
public Paragraph addParagraph(String textContent)
addParagraph
in interface ParagraphContainer
textContent
- the text content
public boolean removeParagraph(Paragraph para)
removeParagraph
in interface ParagraphContainer
para
- the instance of paragraph
public Iterator<Paragraph> getParagraphIterator()
getParagraphIterator
in interface ParagraphContainer
public Paragraph getParagraphByIndex(int index, boolean isEmptyParagraphSkipped)
An index of zero represents the first paragraph.
If empty paragraph is skipped, the empty paragraph won't be counted.
getParagraphByIndex
in interface ParagraphContainer
index
- the index started from 0.isEmptyParagraphSkipped
- whether the empty paragraph is skipped or not.
public Paragraph getParagraphByReverseIndex(int reverseIndex, boolean isEmptyParagraphSkipped)
An index of zero represents the last paragraph.
If empty paragraph is skipped, the empty paragraph won't be counted.
getParagraphByReverseIndex
in interface ParagraphContainer
reverseIndex
- the index started from 0 in reverse order.isEmptyParagraphSkipped
- whether the empty paragraph is skipped or not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |