aspose.pdf
Class Sections

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

public class Sections
extends java.util.ArrayList

Represents a collection of Section objects.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Text text1 = new Text("This is text in section1."); text1.getMargin().Top = 30; sec1.getParagraphs().add(text1); Section sec2 = pdf1.getSections().add(); sec2.setIsLandscape(true); Text text2 = new Text("This is text in section2."); text2.getMargin().Top = 30; sec2.getParagraphs().add(text2); pdf1.save(....); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Text MarginTop="30"> <Segment> This is text in section1. </Segment> </Text> </Section> <Section IsLandscape="true"> <Text MarginTop="30"> <Segment> This is text in section2.. </Segment> </Text> </Section> </Pdf>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Sections()
          Initializes a new instance of the Section class.
 
Method Summary
 Section add()
          Initializes a new instance of the Section class and add it to the Sections collection
 void add(Section section)
          Adds a new Section object into the collection.
 void copyTo(Section[] secArray, int index)
          Copies the elements to a Section object array, starting at a specified array index.
 Section getSection(int index)
          Gets or sets a Section object from the collection according to Section index.
 Section getSection(java.lang.String sectionID)
          Gets or sets a Section object from the collection according to Section ID.
 int indexOf(Section section)
          Gets the index of a specified section in the collection.
 void insert(int index, Section section)
          Inserts a new Section object into the collection at specified position.
 void insert(Section sectionToInsertAfter, Section newSection)
          Inserts a new Section object into the collection after specified Section object.
 void remove(Section sectionToRemove)
          Removes a Section object from the collection.
 void setSection(int index, Section value)
          Sets a Section object from the collection according to Section index.
 void setSection(java.lang.String sectionID, Section value)
          Sets a Section object from the collection according to Section ID.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Sections

public Sections()
Initializes a new instance of the Section class.

Method Detail

add

public void add(Section section)
Adds a new Section object into the collection.

Parameters:
section - The Section object to be added.

add

public Section add()
Initializes a new instance of the Section class and add it to the Sections collection

Returns:
The new Section object.

insert

public void insert(int index,
                   Section section)
Inserts a new Section object into the collection at specified position.

Parameters:
index - The zero-based index at which Section object should be inserted.
section - The Section object to be inserted.

insert

public void insert(Section sectionToInsertAfter,
                   Section newSection)
Inserts a new Section object into the collection after specified Section object.

Parameters:
sectionToInsertAfter - The Section object to insert after.
newSection - The Section object to be inserted.

remove

public void remove(Section sectionToRemove)
Removes a Section object from the collection.

Parameters:
sectionToRemove - The Section object to be romoved.

copyTo

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

Parameters:
secArray - The Section object array.
index - The start index.

indexOf

public int indexOf(Section section)
Gets the index of a specified section in the collection.

Parameters:
section - The specified section.
Returns:
The index value.

getSection

public Section getSection(int index)
Gets or sets a Section object from the collection according to Section index.


setSection

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

Parameters:
index -
value -

getSection

public Section getSection(java.lang.String sectionID)
Gets or sets a Section object from the collection according to Section ID.


setSection

public void setSection(java.lang.String sectionID,
                       Section value)
Sets a Section object from the collection according to Section ID.

Parameters:
sectionID -
value -