aspose.pdf
Class Shapes

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

public class Shapes
extends java.util.ArrayList

Represents a collection of Shape objects.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Graph graph1 = new Graph(100,400); sec1.getParagraphs().add(graph1); float[] posArr = new float[] {0,0,200,80,300,40,350,90}; Curve curve1 = new Curve(graph1,posArr); graph1.getShapes().add(curve1); pdf1.save(....); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Graph Height="100" Width="400"> <Curve Position="0 0 200 80 300 40 350 90"> </Curve> </Graph> </Section> </Pdf>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Shapes()
          Initializes a new instance of the Shapes class.
 
Method Summary
 void add(Shape shape)
          The culture info.
 void copyTo(Shape[] shapeArray, int index)
          Copies the elements to a Shape object array, starting at a specified array index.
 Shape get(java.lang.String id)
          Gets a Shape object from the collection according to Shape ID.
 Shape getShape(int index)
          Gets a Shape object from the collection according to Shape index.
 int indexOf(Shape shape)
          Gets the index of a specified Shape object in the collection.
 void remove(Shape shapeToRemove)
          Removes a Shape object from the collection.
 void set(int index, Shape shape)
          Sets a Shape object from the collection according to Shape index.
 void set(java.lang.String id, Shape value)
          Sets a Shape object to the collection with the specified index.
 
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

Shapes

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

Method Detail

add

public void add(Shape shape)
The culture info.

Parameters:
shape - The Shape object to be added.

remove

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

Parameters:
shapeToRemove - The Shape object to be removed.

copyTo

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

Parameters:
shapeArray - The Gets or sets a Shape object array.
index - The start index

indexOf

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

Parameters:
shape - The specified Shape object.
Returns:
The index value.

getShape

public Shape getShape(int index)
Gets a Shape object from the collection according to Shape index.


set

public void set(int index,
                Shape shape)
Sets a Shape object from the collection according to Shape index.

Parameters:
index - the index of the object to be set
shape - the value of the object to be set

get

public Shape get(java.lang.String id)
Gets a Shape object from the collection according to Shape ID.

Parameters:
id - the ID of the Shape object

set

public void set(java.lang.String id,
                Shape value)
Sets a Shape object to the collection with the specified index.

Parameters:
id - the index to be set
value - the value of the Shape object