Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Wiki  API  Corporate

com.aspose.powerpoint
Class Shapes

java.lang.Object
  extended by com.aspose.powerpoint.Shapes

public final class Shapes
extends java.lang.Object

Represents the collection of a shapes.


Method Summary
 Ellipse addEllipse(int x, int y, int width, int height)
          Adds the Ellipse at the end of the collection.
 Line addLine(java.awt.Point pt1, java.awt.Point pt2)
          Adds the Line at the end of the collection.
 PictureFrame addPictureFrame(int id, int x, int y, int width, int height)
          Adds the PictureFrame at the end of the collection.
 Rectangle addRectangle(int x, int y, int width, int height)
          Adds the Rectangle at the end of the collection.
 Table addTable(int x, int y, int width, int height, int columns, int rows)
          Adds a Table to the end of collection.
 Shape get(int index)
          Returns the element at the specified index.
 java.lang.Object getParent()
          Returns parent object for the Shapes collection.
 int indexOf(Shape value)
          Returns the zero-based index of the first occurrence of a value in the ArrayList.
 void remove(int index)
          Removes the element at the specified index of the collection.
 void remove(Shape shape)
          Removes the element at the specified index of the collection.
 int size()
          Returns the number of elements in the collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

size

public int size()
Returns the number of elements in the collection.

Returns:
The number of elements in the collection.

get

public Shape get(int index)
Returns the element at the specified index.

Parameters:
index - index of element to return.
Returns:
The element at the specified index.

addPictureFrame

public PictureFrame addPictureFrame(int id,
                                    int x,
                                    int y,
                                    int width,
                                    int height)
                             throws PptEditException
Adds the PictureFrame at the end of the collection.

Parameters:
id - Id of a Picture to be inserted to the new picture frame.
x - x coordinate of the new picture frame.
y - y coordinate of the new picture frame.
width - width of the new picture frame.
height - height of the new picture frame.
Returns:
The new PictureFrame object.
Throws:
PptEditException

addLine

public Line addLine(java.awt.Point pt1,
                    java.awt.Point pt2)
             throws PptEditException
Adds the Line at the end of the collection.

Parameters:
pt1 - start point of the line.
pt2 - end point of the line.
Returns:
The new Line object.
Throws:
PptEditException

addRectangle

public Rectangle addRectangle(int x,
                              int y,
                              int width,
                              int height)
                       throws PptEditException
Adds the Rectangle at the end of the collection.

Parameters:
x - x coordinate of the upper-left corner of the rectangle.
y - y coordinate of the upper-left corner of the rectangle.
width - width of the rectangle.
height - height of the rectangle.
Returns:
The new Rectangle object.
Throws:
PptEditException

addEllipse

public Ellipse addEllipse(int x,
                          int y,
                          int width,
                          int height)
                   throws PptEditException
Adds the Ellipse at the end of the collection.

Parameters:
x - x coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y - y coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width - width of the bounding rectangle that defines the ellipse.
height - height of the bounding rectangle that defines the ellipse.
Returns:
The new Ellipse object.
Throws:
PptEditException

addTable

public Table addTable(int x,
                      int y,
                      int width,
                      int height,
                      int columns,
                      int rows)
               throws PptEditException,
                      AsposeLicenseException
Adds a Table to the end of collection.

Parameters:
x - coordinate of the upper-left corner of the bounding rectangle that defines the table.
y - coordinate of the upper-left corner of the bounding rectangle that defines the table.
width - Width of the bounding rectangle that defines the table.
height - Height of the bounding rectangle that defines the table.
columns - Number of columns in the new table.
rows - Number of rows in the new table.
Returns:
Table object.
Throws:
PptEditException
AsposeLicenseException

indexOf

public int indexOf(Shape value)
Returns the zero-based index of the first occurrence of a value in the ArrayList.

Parameters:
value - the shape to locate in the collection.
Returns:
The zero-based index of the first occurrence of shape within the entire collection, if found; otherwise, -1.

remove

public void remove(int index)
Removes the element at the specified index of the collection.

Parameters:
index - the zero-based index of the element to remove.

remove

public void remove(Shape shape)
Removes the element at the specified index of the collection.

Parameters:
shape - the shape to remove from the collection.

getParent

public java.lang.Object getParent()
Returns parent object for the Shapes collection.

Returns:
The parent object. Can be a Slide or GroupShape.