public abstract class AbstractParagraphContainer extends Object implements ParagraphContainer
| Constructor and Description |
|---|
AbstractParagraphContainer() |
| Modifier and Type | Method and Description |
|---|---|
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
|
public abstract OdfElement getParagraphContainerElement()
ParagraphContainergetParagraphContainerElement in interface ParagraphContainerpublic Paragraph addParagraph(String textContent)
addParagraph in interface ParagraphContainertextContent - the text contentpublic boolean removeParagraph(Paragraph para)
removeParagraph in interface ParagraphContainerpara - the instance of paragraphpublic Iterator<Paragraph> getParagraphIterator()
getParagraphIterator in interface ParagraphContainerpublic 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 ParagraphContainerindex - 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 ParagraphContainerreverseIndex - the index started from 0 in reverse order.isEmptyParagraphSkipped - whether the empty paragraph is skipped or not.Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.