com.aspose.slides
Class ShapeCollection

java.lang.Object
  extended by com.aspose.slides.Shapes
      extended by com.aspose.slides.ShapeCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.ICollection<Shape>, com.aspose.ms.System.Collections.IEnumerable<Shape>, java.lang.Iterable<Shape>

public final class ShapeCollection
extends Shapes
implements com.aspose.ms.System.Collections.ICollection<Shape>

Represents a collection of a shapes.


Method Summary
 Shape add(java.io.InputStream stream)
           
 AudioFrame addAudioFrameEmbedded(int x, int y, int width, int height, java.io.InputStream audio_stream)
           
 AudioFrame addAudioFrameLinked(int x, int y, int width, int height, java.lang.String fname)
           Adds an AudioFrame with linked audio file to the end of collection.
 Connector addConnector(int connectorType, java.awt.Point pt1, java.awt.Point pt2)
           
 Ellipse addEllipse(int x, int y, int width, int height)
           Adds an Ellipse to the end of collection.
 Line addLine(java.awt.Point pt1, java.awt.Point pt2)
           
 OleObjectFrame addOleObjectFrame(int x, int y, int width, int height, java.lang.String class_name, byte[] obj_data)
           Adds an OleObjectFrame to the end of collection.
 OleObjectFrame addOleObjectFrame(int x, int y, int width, int height, java.lang.String programId, java.util.UUID classId, java.lang.String relativePath, java.lang.String longPath, java.lang.String shortPath)
           
 PictureFrame addPictureFrame(int id, int x, int y, int width, int height)
           Adds a PictureFrame to the end of collection.
 Polyline addPolyline(int x, int y, int width, int height, java.awt.geom.GeneralPath gp)
           Adds a Polyline to the end of a collection.
 Rectangle addRectangle(int x, int y, int width, int height)
           Adds a Rectangle to the end of collection.
 Table addTable(int x, int y, int width, int height, int columns, int rows)
           Adds a Table to the end of collection.
 Table addTable(int x, int y, int width, int height, int columns, int rows, double bordersWidth, java.awt.Color bordersColor)
           
 VideoFrame addVideoFrame(int x, int y, int width, int height, java.lang.String fname)
           Adds a VideoFrame to the end of collection.
 void copyTo(com.aspose.ms.System.Array array, int index)
           Copies all elements from the collection to the specified array.
 Shape get_Item(int index)
           Gets the element at the specified index.
 int getCount()
           Gets the number of elements actually contained in the collection.
 java.lang.Object getParent()
           Returns parent object for a Shapes collection.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 int indexOf(Shape shape)
           Returns the zero-based index of the first occurrence of a shape in the collection.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.IEnumerator<Shape> iterator()
           Returns an enumerator for the entire collection.
 boolean remove(Shape shape)
           Removes the first occurrence of a specific shape from the collection.
 void removeAt(int index)
           Removes the element at the specified index of the collection.
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copyTo

public void copyTo(com.aspose.ms.System.Array array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface com.aspose.ms.System.Collections.ICollection<Shape>
Parameters:
array - Target array.
index - Starting index in the target array.

isSynchronized

public boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe).

Specified by:
isSynchronized in interface com.aspose.ms.System.Collections.ICollection<Shape>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Readonly object.

Specified by:
getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<Shape>

size

public int size()
Specified by:
size in interface com.aspose.ms.System.Collections.ICollection<Shape>

getCount

public int getCount()
Description copied from class: Shapes

Gets the number of elements actually contained in the collection.

Overrides:
getCount in class Shapes

get_Item

public Shape get_Item(int index)
Description copied from class: Shapes

Gets the element at the specified index.

Overrides:
get_Item in class Shapes

add

public Shape add(java.io.InputStream stream)
Overrides:
add in class Shapes

addPictureFrame

public PictureFrame addPictureFrame(int id,
                                    int x,
                                    int y,
                                    int width,
                                    int height)
Description copied from class: Shapes

Adds a PictureFrame to the end of collection.

Overrides:
addPictureFrame in class Shapes
Parameters:
id - ID of a Picture to be placed to a new picture frame.
x - X coordinate of a new picture frame.
y - Y coordinate of a new picture frame.
width - Width of a new picture frame.
height - Height of a new picture frame.
Returns:
PictureFrame object.

addOleObjectFrame

public OleObjectFrame addOleObjectFrame(int x,
                                        int y,
                                        int width,
                                        int height,
                                        java.lang.String class_name,
                                        byte[] obj_data)
Description copied from class: Shapes

Adds an OleObjectFrame to the end of collection.

Overrides:
addOleObjectFrame in class Shapes
Parameters:
x - X coordinate of a new ole frame.
y - Y coordinate of a new ole frame.
width - Width of a new ole frame.
height - Height of a new ole frame.
class_name - Name of an OLE class.
obj_data - OLE object's data.
Returns:
OleObjectFrame object.

addOleObjectFrame

public OleObjectFrame addOleObjectFrame(int x,
                                        int y,
                                        int width,
                                        int height,
                                        java.lang.String programId,
                                        java.util.UUID classId,
                                        java.lang.String relativePath,
                                        java.lang.String longPath,
                                        java.lang.String shortPath)
Overrides:
addOleObjectFrame in class Shapes

addVideoFrame

public VideoFrame addVideoFrame(int x,
                                int y,
                                int width,
                                int height,
                                java.lang.String fname)
Description copied from class: Shapes

Adds a VideoFrame to the end of collection.

Overrides:
addVideoFrame in class Shapes
Parameters:
x - X coordinate of a new video frame.
y - Y coordinate of a new video frame.
width - Width of a new video frame.
height - Height of a new video frame.
fname - Video file name.
Returns:
VideoFrame object.

addAudioFrameLinked

public AudioFrame addAudioFrameLinked(int x,
                                      int y,
                                      int width,
                                      int height,
                                      java.lang.String fname)
Description copied from class: Shapes

Adds an AudioFrame with linked audio file to the end of collection.

Overrides:
addAudioFrameLinked in class Shapes
Parameters:
x - X coordinate of a new audio frame.
y - Y coordinate of a new audio frame.
width - Width of a new audio frame.
height - Height of a new audio frame.
fname - Audio file name.
Returns:
AudioFrame object.

addAudioFrameEmbedded

public AudioFrame addAudioFrameEmbedded(int x,
                                        int y,
                                        int width,
                                        int height,
                                        java.io.InputStream audio_stream)
Overrides:
addAudioFrameEmbedded in class Shapes

addLine

public Line addLine(java.awt.Point pt1,
                    java.awt.Point pt2)
Overrides:
addLine in class Shapes

addConnector

public Connector addConnector(int connectorType,
                              java.awt.Point pt1,
                              java.awt.Point pt2)
Overrides:
addConnector in class Shapes

addPolyline

public Polyline addPolyline(int x,
                            int y,
                            int width,
                            int height,
                            java.awt.geom.GeneralPath gp)
Description copied from class: Shapes

Adds a Polyline to the end of a collection.

Overrides:
addPolyline in class Shapes
Parameters:
x - X coordinate of the upper-left corner of the bounding rectangle that defines the polyline.
y - Y coordinate of the upper-left corner of the bounding rectangle that defines the polyline.
width - Width of the bounding rectangle that defines the polyline.
height - Height of the bounding rectangle that defines the polyline.
gp - GraphicsPath that defines the polyline.
Returns:
Polyline object.

addRectangle

public Rectangle addRectangle(int x,
                              int y,
                              int width,
                              int height)
Description copied from class: Shapes

Adds a Rectangle to the end of collection.

Overrides:
addRectangle in class Shapes
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:
Rectangle object.

addEllipse

public Ellipse addEllipse(int x,
                          int y,
                          int width,
                          int height)
Description copied from class: Shapes

Adds an Ellipse to the end of collection.

Overrides:
addEllipse in class Shapes
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:
Ellipse object.

addTable

public Table addTable(int x,
                      int y,
                      int width,
                      int height,
                      int columns,
                      int rows)
Description copied from class: Shapes

Adds a Table to the end of collection.

Overrides:
addTable in class Shapes
Parameters:
x - X coordinate of the upper-left corner of the bounding rectangle that defines the table.
y - 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.

addTable

public Table addTable(int x,
                      int y,
                      int width,
                      int height,
                      int columns,
                      int rows,
                      double bordersWidth,
                      java.awt.Color bordersColor)
Overrides:
addTable in class Shapes

indexOf

public int indexOf(Shape shape)
Description copied from class: Shapes

Returns the zero-based index of the first occurrence of a shape in the collection.

Overrides:
indexOf in class Shapes
Parameters:
shape - 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.

removeAt

public void removeAt(int index)
Description copied from class: Shapes

Removes the element at the specified index of the collection.

Overrides:
removeAt in class Shapes
Parameters:
index - The zero-based index of the element to remove.

remove

public boolean remove(Shape shape)
Description copied from class: Shapes

Removes the first occurrence of a specific shape from the collection.

Overrides:
remove in class Shapes
Parameters:
shape - The shape to remove from the collection.

iterator

public com.aspose.ms.System.Collections.IEnumerator<Shape> iterator()
Description copied from class: Shapes

Returns an enumerator for the entire collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable<Shape>
Specified by:
iterator in interface java.lang.Iterable<Shape>
Overrides:
iterator in class Shapes
Returns:
An IEnumerator for the entire collection.

getParent

public java.lang.Object getParent()
Description copied from class: Shapes

Returns parent object for a Shapes collection. Read-only Object. Can be a Slide or GroupShape.

Overrides:
getParent in class Shapes