com.aspose.slides
Class ParagraphCollection

java.lang.Object
  extended by com.aspose.slides.ParagraphCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IParagraph>, com.aspose.ms.System.Collections.IEnumerable<IParagraph>, IParagraphCollection, IPresentationComponent, ISlideComponent, java.lang.Iterable<IParagraph>

public final class ParagraphCollection
extends java.lang.Object
implements IParagraphCollection

Represents a collection of a paragraphs.


Method Summary
 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, IHtmlExternalResolver 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 T:System.Collections.Generic.ICollection`1 contains a specific value.
 void copyTo(IParagraph[] array, int arrayIndex)
           Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index.
 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.
 com.aspose.slides.IDOMObject getParent_Immediate()
           Returns Parent_Immediate object.
 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 T:System.Collections.Generic.IList`1.
 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 T:System.Collections.Generic.ICollection`1 is read-only.
 com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> iterator()
           Returns an enumerator that iterates through the collection.
 void notify(java.lang.Object sender)
           
 boolean remove(IParagraph item)
           Removes the first occurrence of a specific object from the T:System.Collections.Generic.ICollection`1.
 void removeAt(int index)
           Removes the element at the specified index of the collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCount

public int getCount()

Gets the number of elements actually contained in the collection. Read-only int.

Specified by:
getCount in interface IParagraphCollection

isReadOnly

public boolean isReadOnly()

Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only. Read-only boolean.

Returns:
true if the T:System.Collections.Generic.ICollection`1 is read-only; otherwise, false.

get_Item

public IParagraph get_Item(int index)

Gets the element at the specified index.

Specified by:
get_Item in interface IParagraphCollection

add

public void add(IParagraph value)

Adds a Paragraph to the end of collection.

Specified by:
add in interface IParagraphCollection
Parameters:
value - The Paragraph to be added to the end of the collection.

add

public int add(IParagraphCollection value)

Adds a content of ParagraphCollection to the end of collection.

Specified by:
add in interface IParagraphCollection
Parameters:
value - The ParagraphCollection to be added to the end of the collection.
Returns:
The index at which the Paragraph has been added or -1 if there are nothing to add.

indexOf

public int indexOf(IParagraph item)

Determines the index of a specific item in the T:System.Collections.Generic.IList`1.

Parameters:
item - The object to locate in the T:System.Collections.Generic.IList`1.
Returns:
The index of item if found in the list; otherwise, -1.

insert

public void insert(int index,
                   IParagraph value)

Inserts a Paragraph into the collection at the specified index.

Specified by:
insert in interface IParagraphCollection
Parameters:
index - The zero-based index at which Paragraph should be inserted.
value - The Paragraph to insert.

insert

public void insert(int index,
                   IParagraphCollection value)

Inserts a content of ParagraphCollection into the collection at the specified index.

Specified by:
insert in interface IParagraphCollection
Parameters:
index - The zero-based index at which paragraphs should be inserted.
value - The paragraphs to insert.

clear

public void clear()

Removes all elements from the collection.

Specified by:
clear in interface IParagraphCollection

contains

public boolean contains(IParagraph item)

Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.

Parameters:
item - The object to locate in the T:System.Collections.Generic.ICollection`1.
Returns:
true if item is found in the T:System.Collections.Generic.ICollection`1; otherwise, false.

copyTo

public void copyTo(IParagraph[] array,
                   int arrayIndex)

Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index.

Parameters:
array - The one-dimensional T:System.Array that is the destination of the elements copied from T:System.Collections.Generic.ICollection`1. The T:System.Array must have zero-based indexing.
arrayIndex - The zero-based index in array at which copying begins.
Throws:
T:System.ArgumentNullException - array is null.
T:System.ArgumentOutOfRangeException - arrayIndex is less than 0.
T:System.ArgumentException - The number of elements in the source T:System.Collections.Generic.ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.

removeAt

public void removeAt(int index)

Removes the element at the specified index of the collection.

Specified by:
removeAt in interface IParagraphCollection
Parameters:
index - The zero-based index of the element to remove.

remove

public boolean remove(IParagraph item)

Removes the first occurrence of a specific object from the T:System.Collections.Generic.ICollection`1.

Specified by:
remove in interface IParagraphCollection
Parameters:
item - The object to remove from the T:System.Collections.Generic.ICollection`1.
Returns:
true if item was successfully removed from the T:System.Collections.Generic.ICollection`1; otherwise, false. This method also returns false if item is not found in the original T:System.Collections.Generic.ICollection`1.
Throws:
T:System.NotSupportedException - The T:System.Collections.Generic.ICollection`1 is read-only.

iterator

public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IParagraph> iterator()

Returns an enumerator that iterates through the collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IParagraph>
Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable<IParagraph>
Specified by:
iterator in interface java.lang.Iterable<IParagraph>
Returns:
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

getParent_Immediate

public com.aspose.slides.IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.


getSlide

public IBaseSlide getSlide()

Returns the parent slide of a paragraphs collection. Read-only BaseSlide.

Specified by:
getSlide in interface ISlideComponent

getPresentation

public IPresentation getPresentation()

Returns the parent presentation of a paragraphs collection. Read-only IPresentation.

Specified by:
getPresentation in interface IPresentationComponent

notify

public void notify(java.lang.Object sender)

addFromHtml

public void addFromHtml(java.lang.String text)

Adds text from specified html string to the collection.

Specified by:
addFromHtml in interface IParagraphCollection
Parameters:
text - HTML text.

addFromHtml

public void addFromHtml(java.lang.String text,
                        IHtmlExternalResolver resolver,
                        java.lang.String uri)

Adds text from specified html string to the collection.

Specified by:
addFromHtml in interface IParagraphCollection
Parameters:
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.


Specifying resolver can potentially introduce a vulnurability. Use with caution.


exportToHtml

public java.lang.String exportToHtml(int firstParagraphIndex,
                                     int paragraphsCount,
                                     ITextToHtmlConversionOptions options)

Converts specifying paragraphs to the HTML and returns it as String object.

Specified by:
exportToHtml in interface IParagraphCollection
Parameters:
firstParagraphIndex -
paragraphsCount -
options -
Returns:
Generated HTML.


Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.