Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class Segments

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.Segments
All Implemented Interfaces:
java.lang.Cloneable

public class Segments
extends PdfElementBase

Represents a collection of Segment objects.


Constructor Summary
Segments(ElementFactory elementFactory, Text parentText)
          Initializes a new instance of the Segments class.
 
Method Summary
 Segment add()
          Initializes a new instance of the Segment class and add it to the Segments collection.
 void add(Segment segment)
          Adds a new Segment object into the collection.
 Segment add(java.lang.String segmentString)
          Initializes a new instance of the Segment class and add it to the Segments collection.
 void clear()
          Clear segments of Text.
 java.lang.Object clone()
          Segments does not support clone method.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 int indexOf(Segment segment)
          Gets the index of a specified segment in the collection.
 void Insert(int index, Segment segment)
          Inserts a new Segment object into the collection at specified position.
 boolean isEmpty()
          Returns true if the collection contains no segment.
 java.util.Iterator iterator()
          Returns an iterator over the segment objects in segments in proper sequence.
 void remove(int index)
          Removes a Segment object from the collection at the specified position.
 void remove(Segment segment)
          Removes a Segment object from the collection.
 int size()
          Gets the size of segment objects collection.
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Segments

public Segments(ElementFactory elementFactory,
                Text parentText)
Initializes a new instance of the Segments class.

Parameters:
elementFactory - xsl-fo DOM element factory.
parentText - The paraent Text of Segments.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Segments does not support clone method.

Overrides:
clone in class PdfElementBase
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

add

public void add(Segment segment)
Adds a new Segment object into the collection.

Parameters:
segment - the segment that will be added.

add

public Segment add()
Initializes a new instance of the Segment class and add it to the Segments collection.

Returns:
Returns a Segment.

add

public Segment add(java.lang.String segmentString)
Initializes a new instance of the Segment class and add it to the Segments collection.

Parameters:
segmentString - The content string of segment.
Returns:
Returns a segment.

clear

public void clear()
Clear segments of Text.


indexOf

public int indexOf(Segment segment)
Gets the index of a specified segment in the collection.

Returns:
The index of the specified segment

Insert

public void Insert(int index,
                   Segment segment)
Inserts a new Segment object into the collection at specified position.

Parameters:
index - The position that the segment will be inserted at.
segment - the segment that willed inserted.

remove

public void remove(Segment segment)
Removes a Segment object from the collection.

Parameters:
segment - The segment that willed removed.

remove

public void remove(int index)
Removes a Segment object from the collection at the specified position.

Parameters:
index - The index of the segment that willed removed.

size

public int size()
Gets the size of segment objects collection.


iterator

public java.util.Iterator iterator()
Returns an iterator over the segment objects in segments in proper sequence.


isEmpty

public boolean isEmpty()
Returns true if the collection contains no segment.


getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class PdfElementBase
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()