com.aspose.pdf.elements
Class Shapes

java.lang.Object
  extended by com.aspose.pdf.elements.PdfElementBase
      extended by com.aspose.pdf.elements.Shapes
All Implemented Interfaces:
java.lang.Cloneable

public class Shapes
extends PdfElementBase

Represents a collection of Shape objects.


Constructor Summary
Shapes(Section section)
          Initializes a new instance of the Shapes class.
 
Method Summary
 Shape add()
          Initializes a new instance of the shape class and add it to the shapes collection.
 void add(Shape shape)
          Adds a new shape object into the collection.
 void clear()
          Clear shapes of Text.
 java.lang.Object clone()
          Segments does not support clone method.
 Shape getAt(int index)
          Gets the shape object at specified position.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 int indexOf(Shape shape)
          Gets the index of a specified shape int the collection.
 void Insert(int index, Shape shape)
          Inserts a new shape object into the collection at specified position.
 boolean isEmpty()
          Returns true if the collection contains no shape.
 java.util.Iterator iterator()
          Returns an iterator over the shape objects in shapes in proper sequence.
 void remove(int index)
          Removes a shape object from the collection at the specified position.
 void remove(Shape shape)
          Removes a shape object from the collection.
 int size()
          Gets the size of shape 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

Shapes

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

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:
Object.clone()

add

public void add(Shape shape)
Adds a new shape object into the collection.

Parameters:
shape - the shape that will be added.

add

public Shape add()
Initializes a new instance of the shape class and add it to the shapes collection.

Returns:
Returns a shape.

clear

public void clear()
Clear shapes of Text.


indexOf

public int indexOf(Shape shape)
Gets the index of a specified shape int the collection.

Returns:
The index of the specified shape

Insert

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

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

getAt

public Shape getAt(int index)
Gets the shape object at specified position.

Parameters:
index - The index of the shape that will be returned.
Returns:
Returns the shape at index.

remove

public void remove(Shape shape)
Removes a shape object from the collection.

Parameters:
shape - The shape that willed removed.

remove

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

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

size

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


iterator

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


isEmpty

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


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()