public final class ParagraphCollection extends DomObject<TextFrame> implements IParagraphCollection
Represents a collection of a paragraphs.
Modifier and Type | Method and Description |
---|---|
void |
add(IParagraph value)
Adds a Paragraph to the end of collection.
|
int |
add(IParagraphCollection value)
Adds a content of ParagraphCollection to the end of collection.
|
void |
addFromHtml(java.lang.String text)
Adds text from specified html string to the collection.
|
void |
addFromHtml(java.lang.String text,
IExternalResourceResolver resolver,
java.lang.String uri)
Adds text from specified html string to the collection.
|
void |
clear()
Removes all elements from the collection.
|
boolean |
contains(IParagraph item)
Determines whether the
IGenericCollection contains a specific value. |
void |
copyTo(IParagraph[] array,
int arrayIndex)
|
java.lang.String |
exportToHtml(int firstParagraphIndex,
int paragraphsCount,
ITextToHtmlConversionOptions options)
Converts specifying paragraphs to the HTML and returns it as String object.
|
IParagraph |
get_Item(int index)
Gets the element at the specified index.
|
int |
getCount()
Gets the number of elements actually contained in the collection.
|
IPresentation |
getPresentation()
Returns the parent presentation of a paragraphs collection.
|
IBaseSlide |
getSlide()
Returns the parent slide of a paragraphs collection.
|
int |
indexOf(IParagraph item)
Determines the index of a specific item in the
List . |
void |
insert(int index,
IParagraph value)
Inserts a Paragraph into the collection at the specified index.
|
void |
insert(int index,
IParagraphCollection value)
Inserts a content of ParagraphCollection into the collection at the specified index.
|
boolean |
isReadOnly()
Gets a value indicating whether the
IGenericCollection is read-only. |
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> |
iterator()
Returns an enumerator that iterates through the collection.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> |
iteratorJava()
Returns a java iterator for the entire collection.
|
void |
notify(java.lang.Object sender) |
boolean |
remove(IParagraph item)
Removes the first occurrence of a specific object from the
IGenericCollection . |
void |
removeAt(int index)
Removes the element at the specified index of the collection.
|
getParent_Immediate
public final int getCount()
Gets the number of elements actually contained in the collection.
Read-only int
.
getCount
in interface IParagraphCollection
public final boolean isReadOnly()
Gets a value indicating whether the IGenericCollection
is read-only.
Read-only boolean
.
IGenericCollection
is read-only; otherwise, false.public final IParagraph get_Item(int index)
Gets the element at the specified index.
get_Item
in interface IParagraphCollection
public final void add(IParagraph value)
Adds a Paragraph to the end of collection.
add
in interface IParagraphCollection
value
- The Paragraph to be added to the end of the collection.public final int add(IParagraphCollection value)
Adds a content of ParagraphCollection to the end of collection.
add
in interface IParagraphCollection
value
- The ParagraphCollection to be added to the end of the collection.public final int indexOf(IParagraph item)
Determines the index of a specific item in the List
.
item
- The object to locate in the List
.public final void insert(int index, IParagraph value)
Inserts a Paragraph into the collection at the specified index.
insert
in interface IParagraphCollection
index
- The zero-based index at which Paragraph should be inserted.value
- The Paragraph to insert.public final void insert(int index, IParagraphCollection value)
Inserts a content of ParagraphCollection into the collection at the specified index.
insert
in interface IParagraphCollection
index
- The zero-based index at which paragraphs should be inserted.value
- The paragraphs to insert.public final void clear()
Removes all elements from the collection.
clear
in interface IParagraphCollection
public final boolean contains(IParagraph item)
Determines whether the IGenericCollection
contains a specific value.
item
- The object to locate in the IGenericCollection
.IGenericCollection
; otherwise, false.public final void copyTo(IParagraph[] array, int arrayIndex)
Copies the elements of the IGenericCollection
to an Array
, starting at a particular Array
index.
array
- The one-dimensional Array
that is the destination of the elements copied from IGenericCollection
. The Array
must have zero-based indexing.arrayIndex
- The zero-based index in array at which copying begins.com.aspose.ms.System.ArgumentNullException
- array is null.com.aspose.ms.System.ArgumentOutOfRangeException
- arrayIndex is less than 0.com.aspose.ms.System.ArgumentException
- The number of elements in the source IGenericCollection
is greater than the available space from arrayIndex to the end of the destination array.public final void removeAt(int index)
Removes the element at the specified index of the collection.
removeAt
in interface IParagraphCollection
index
- The zero-based index of the element to remove.public final boolean remove(IParagraph item)
Removes the first occurrence of a specific object from the IGenericCollection
.
remove
in interface IParagraphCollection
item
- The object to remove from the IGenericCollection
.IGenericCollection
; otherwise, false. This method also returns false if item is not found in the original IGenericCollection
.com.aspose.ms.System.NotSupportedException
- The IGenericCollection
is read-only.public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> iterator()
Returns an enumerator that iterates through the collection.
iterator
in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IParagraph>
iterator
in interface com.aspose.ms.System.Collections.IEnumerable<IParagraph>
iterator
in interface java.lang.Iterable<IParagraph>
IGenericEnumerator
that can be used to iterate through the collection.public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> iteratorJava()
Returns a java iterator for the entire collection.
Iterator
for the entire collection.public final IBaseSlide getSlide()
Returns the parent slide of a paragraphs collection.
Read-only BaseSlide
.
getSlide
in interface ISlideComponent
public final IPresentation getPresentation()
Returns the parent presentation of a paragraphs collection.
Read-only IPresentation
.
getPresentation
in interface IPresentationComponent
public final void notify(java.lang.Object sender)
public final void addFromHtml(java.lang.String text)
Adds text from specified html string to the collection.
addFromHtml
in interface IParagraphCollection
text
- HTML text.public final void addFromHtml(java.lang.String text, IExternalResourceResolver resolver, java.lang.String uri)
Adds text from specified html string to the collection.
addFromHtml
in interface IParagraphCollection
text
- HTML text.resolver
- Resolver callback object which resolves URIs and fetches referrenced objects.uri
- URI for adding HTML document. Used for resolving relative links.
public final java.lang.String exportToHtml(int firstParagraphIndex, int paragraphsCount, ITextToHtmlConversionOptions options)
Converts specifying paragraphs to the HTML and returns it as String object.
exportToHtml
in interface IParagraphCollection
firstParagraphIndex
- First paragraph index int
paragraphsCount
- Paragraph count int
options
- Convert options ITextToHtmlConversionOptions