aspose.pdf
Class Paragraphs

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by aspose.pdf.Paragraphs
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class Paragraphs
extends java.util.ArrayList

Represents a collection of Paragraph objects.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); pdf1.setSecurity(new Security()); pdf1.getSecurity().setIsCopyingAllowed(false); pdf1.getPageSetup().setPageHeight(PageSize.A2Height); Section sec = pdf1.getSections().add(); Text text1 = new Text(); text1.getMargin().Top = 30; sec.getParagraphs().add(text1); Segment segment1 = new Segment(text1); text1.getSegments().add(segment1); segment1.setContent("this is text content"); pdf1.save(....); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf" IsCopyingAllowed="false"> <Section PageHeight="1684"> <Text MarginTop="30"> <Segment>this is text content</Segment> </Text> </Section> </Pdf>

See Also:
Serialized Form

Constructor Summary
Paragraphs()
           
 
Method Summary
 void add(Paragraph paragraph)
          Adds a new Paragraph object into the collection.
 void addHeading(Paragraph paragraph)
          Adds a heading Paragraph to the collection.
 void addPara(Paragraph paragraph)
          Adds a new Paragraph object into the collection
 void combineBorder()
          Combine border of the given Paragraph.
 int combinePos(int index)
          Set combine of the given Paragraph of the collection.
 void copyTo(Paragraph[] paraArray, int index)
          Copies the elements to a Paragraph object array, starting at a specified array index.
 java.lang.Object getObjectByID(java.lang.String ID)
          Get the object by input ID.
 Paragraph getParagraph(int index)
          Gets a Paragraph object from the collection according to Paragraph index.
 Paragraph getParagraph(java.lang.String paragraphID)
          Gets Paragraph object from the collection according to Paragraph ID.
 int indexOf(Paragraph paragraph)
          Gets the index of a specified Paragraph object in the collection.
 void insert(Paragraph paragraphToInsertAfter, Paragraph newParagraph)
          Inserts a new Paragraph object into the collection after specified Cell object.
 void insertHeading(int index, Paragraph newParagraph)
          Inserts a heading Paragraph into the given position of the collection.
 void insertPara(int index, Paragraph paragraph)
          Inserts a new Paragraph object into the collection at specified position.
 void insertPara(Paragraph paragraphToInsertAfter, Paragraph newParagraph)
          Inserts a new Paragraph object into the collection after specified Cell object.
 void moveAfter(Paragraph paragraphToMoveAfter, Paragraphs newParagraphs)
          Moves a Paragraph object to end of the collection.
 void moveAt(Paragraph paragraphToMoveAt, Paragraphs newParagraphs)
          Moves a Paragraph object to the collection.
 Paragraph nextParagraph(Paragraph paragraph)
          Gets the next Paragraph object of the given one.
 void remove(Paragraph paragraphToRemove)
          Removes a Paragraph object from the collection.
 void setParagraph(int index, Paragraph value)
          Sets a Paragraph object from the collection according to Paragraph index.
 void setParagraph(java.lang.String paragraphID, Paragraph value)
          Sets Paragraph object from the collection according to Paragraph ID.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Paragraphs

public Paragraphs()
Method Detail

add

public void add(Paragraph paragraph)
Adds a new Paragraph object into the collection.

Parameters:
paragraph - The Paragraph object to be added.

addPara

public void addPara(Paragraph paragraph)
Adds a new Paragraph object into the collection

Parameters:
paragraph - The Paragraph object to be added.

getParagraph

public Paragraph getParagraph(int index)
Gets a Paragraph object from the collection according to Paragraph index.

Parameters:
index -

setParagraph

public void setParagraph(int index,
                         Paragraph value)
Sets a Paragraph object from the collection according to Paragraph index.

Parameters:
index -
value -

getParagraph

public Paragraph getParagraph(java.lang.String paragraphID)
Gets Paragraph object from the collection according to Paragraph ID.


setParagraph

public void setParagraph(java.lang.String paragraphID,
                         Paragraph value)
Sets Paragraph object from the collection according to Paragraph ID.

Parameters:
paragraphID -
value -

nextParagraph

public Paragraph nextParagraph(Paragraph paragraph)
Gets the next Paragraph object of the given one.

Parameters:
paragraph -

indexOf

public int indexOf(Paragraph paragraph)
Gets the index of a specified Paragraph object in the collection.

Parameters:
paragraph -

insertPara

public void insertPara(int index,
                       Paragraph paragraph)
Inserts a new Paragraph object into the collection at specified position.

Parameters:
index -
paragraph -

insertPara

public void insertPara(Paragraph paragraphToInsertAfter,
                       Paragraph newParagraph)
Inserts a new Paragraph object into the collection after specified Cell object.

Parameters:
paragraphToInsertAfter -
newParagraph -

insert

public void insert(Paragraph paragraphToInsertAfter,
                   Paragraph newParagraph)
Inserts a new Paragraph object into the collection after specified Cell object.

Parameters:
paragraphToInsertAfter -
newParagraph -

remove

public void remove(Paragraph paragraphToRemove)
Removes a Paragraph object from the collection.

Parameters:
paragraphToRemove -

moveAt

public void moveAt(Paragraph paragraphToMoveAt,
                   Paragraphs newParagraphs)
Moves a Paragraph object to the collection.

Parameters:
paragraphToMoveAt -
newParagraphs -

moveAfter

public void moveAfter(Paragraph paragraphToMoveAfter,
                      Paragraphs newParagraphs)
Moves a Paragraph object to end of the collection.

Parameters:
paragraphToMoveAfter -
newParagraphs -

copyTo

public void copyTo(Paragraph[] paraArray,
                   int index)
Copies the elements to a Paragraph object array, starting at a specified array index.


addHeading

public void addHeading(Paragraph paragraph)
Adds a heading Paragraph to the collection.

Parameters:
paragraph -

insertHeading

public void insertHeading(int index,
                          Paragraph newParagraph)
Inserts a heading Paragraph into the given position of the collection.

Parameters:
index -
newParagraph -

combinePos

public int combinePos(int index)
Set combine of the given Paragraph of the collection.

Parameters:
index -

combineBorder

public void combineBorder()
Combine border of the given Paragraph.


getObjectByID

public java.lang.Object getObjectByID(java.lang.String ID)
Get the object by input ID.

Parameters:
ID -