com.aspose.slides
Class ShapeExCollection

java.lang.Object
  extended by com.aspose.slides.ShapesEx
      extended by com.aspose.slides.ShapeExCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.ICollection<ShapeEx>, com.aspose.ms.System.Collections.IEnumerable<ShapeEx>, java.lang.Iterable<ShapeEx>

public final class ShapeExCollection
extends ShapesEx
implements com.aspose.ms.System.Collections.ICollection<ShapeEx>

Represents a collection of a shapes.


Method Summary
 AudioFrameEx addAudioFrameCD(float x, float y, float width, float height)
           Adds an AudioFrameEx with CD to the end of collection.
 AudioFrameEx addAudioFrameEmbedded(float x, float y, float width, float height, java.io.InputStream audio_stream)
           
 AudioFrameEx addAudioFrameLinked(float x, float y, float width, float height, java.lang.String fname)
           Adds a new audio frame with linked audio file to the end of a collection.
 int addAutoShape(int shapeType, float x, float y, float width, float height)
           Creates a new AutoShapeEx and adds it to the end of the collection.
 ChartEx addChart(int type, float x, float y, float width, float height)
           Creates a new ChartEx and adds it to the end of the collection.
 int addConnector(int shapeType, float x, float y, float width, float height)
           Creates a new ConnectorEx and adds it to the end of the collection.
 OleObjectFrameEx addOleObjectFrame(float x, float y, float width, float height, java.lang.String className, byte[] objectData)
           Adds a new OLE object to the end of a collection.
 OleObjectFrameEx addOleObjectFrame(float x, float y, float width, float height, java.lang.String className, java.lang.String path)
           Adds a new OLE object to the end of a collection.
 int addPictureFrame(int shapeType, float x, float y, float width, float height, ImageEx image)
           Creates a new PictureFrameEx and adds it to the end of the collection.
 SmartArtEx addSmartArt(float x, float y, float width, float height, int layoutType)
           Add SmartArt object Example: [C#] PresentationEx pres = new PresentationEx(); SlideEx slide = pres.Slides[0]; SmartArtEx smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList); [Visual Basic] Private pres As New PresentationEx() Private slide As SlideEx = pres.Slides(0) Private smart As SmartArtEx = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList)
 int addTable(float x, float y, double[] columnWidths, double[] rowHeights)
           Creates a new TableEx and adds it to the end of the collection.
 VideoFrameEx addVideoFrame(float x, float y, float width, float height, java.lang.String fname)
           Adds a new video frame to the end of a collection.
 void copyTo(com.aspose.ms.System.Array array, int index)
           Copies all elements from the collection to the specified array.
 ShapeEx 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(ShapeEx shape)
           Returns the zero-based index of the first occurrence of a shape in the collection.
 void insertAudioFrameCD(int index, float x, float y, float width, float height)
           Insert an AudioFrameEx with CD.
 void insertAudioFrameEmbedded(int index, float x, float y, float width, float height, java.io.InputStream audio_stream)
           
 void insertAudioFrameLinked(int index, float x, float y, float width, float height, java.lang.String fname)
           Creates a new audio frame with linked audio file and inserts it to a collection at the specified index.
 void insertAutoShape(int index, int shapeType, float x, float y, float width, float height)
           Creates a new AutoShapeEx and inserts it to the collection at the specified index.
 void insertChart(int type, float x, float y, float width, float height, int index)
           Creates a new ChartEx and inserts it to the specified position in the collection.
 void insertConnector(int index, int shapeType, float x, float y, float width, float height)
           Creates a new ConnectorEx and inserts it to the collection at the specified index.
 void insertOleObjectFrame(int index, float x, float y, float width, float height, java.lang.String className, byte[] objectData)
           Creates a new OLE object and inserts it to a collection at the specified index.
 void insertOleObjectFrame(int index, float x, float y, float width, float height, java.lang.String className, java.lang.String path)
           Creates a new OLE object and inserts it to a collection at the specified index.
 void insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, ImageEx image)
           Creates a new PictureFrameEx and inserts it to the collection at the specified index.
 void insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)
           Creates a new TableEx and inserts it to the collection at the specified index.
 void insertVideoFrame(int index, float x, float y, float width, float height, java.lang.String fname)
           Creates a new video frame and inserts it to a collection at the specified index.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.IEnumerator<ShapeEx> iterator()
           Returns an enumerator for the entire collection.
 void remove(ShapeEx 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.
 void reorder(int index, ShapeEx... shapes)
           Moves shapes from the collection to the specified position.
 void reorder(int index, ShapeEx shape)
           Moves a shape from the collection to the specified position.
 int size()
           
 ShapeEx[] toArray()
           Creates and returns an array with all shapse in it.
 ShapeEx[] toArray(int startIndex, int count)
           Creates and returns an array with all shapes from the specified range in it.
 
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<ShapeEx>
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<ShapeEx>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Readonly object.

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

size

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

getCount

public int getCount()
Description copied from class: ShapesEx

Gets the number of elements actually contained in the collection. Read-only int.

Overrides:
getCount in class ShapesEx

get_Item

public ShapeEx get_Item(int index)
Description copied from class: ShapesEx

Gets the element at the specified index. Read-only ShapeEx.

Overrides:
get_Item in class ShapesEx

addChart

public ChartEx addChart(int type,
                        float x,
                        float y,
                        float width,
                        float height)
Description copied from class: ShapesEx

Creates a new ChartEx and adds it to the end of the collection.

Overrides:
addChart in class ShapesEx
Parameters:
type - Type of chart.
x - X coordinate of a new chart.
y - Y coordinate of a new chart.
width - Chart's width.
height - Chart's height.
Returns:
Index of created chart in the collection.

addSmartArt

public SmartArtEx addSmartArt(float x,
                              float y,
                              float width,
                              float height,
                              int layoutType)
Description copied from class: ShapesEx

Add SmartArt object


Example:
 
 [C#]
 PresentationEx pres = new PresentationEx();
 SlideEx slide = pres.Slides[0];
 SmartArtEx smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList);
 
 [Visual Basic]
 Private pres As New PresentationEx()
 Private slide As SlideEx = pres.Slides(0)
 Private smart As SmartArtEx = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList)
 

Overrides:
addSmartArt in class ShapesEx
Returns:

insertChart

public void insertChart(int type,
                        float x,
                        float y,
                        float width,
                        float height,
                        int index)
Description copied from class: ShapesEx

Creates a new ChartEx and inserts it to the specified position in the collection.

Overrides:
insertChart in class ShapesEx
Parameters:
type - Type of chart.
x - X coordinate of a new chart.
y - Y coordinate of a new chart.
width - Chart's width.
height - Chart's height.
index - Chart's position in the collection.

addOleObjectFrame

public OleObjectFrameEx addOleObjectFrame(float x,
                                          float y,
                                          float width,
                                          float height,
                                          java.lang.String className,
                                          byte[] objectData)
Description copied from class: ShapesEx

Adds a new OLE object to the end of a collection.

Overrides:
addOleObjectFrame in class ShapesEx
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.
className - Name of an OLE class.
objectData - OLE object's data.
Returns:
Created OLE object.

addOleObjectFrame

public OleObjectFrameEx addOleObjectFrame(float x,
                                          float y,
                                          float width,
                                          float height,
                                          java.lang.String className,
                                          java.lang.String path)
Description copied from class: ShapesEx

Adds a new OLE object to the end of a collection.

Overrides:
addOleObjectFrame in class ShapesEx
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.
className - Name of an OLE class.
path - path to the linked file.
Returns:
Created OLE object.

insertOleObjectFrame

public void insertOleObjectFrame(int index,
                                 float x,
                                 float y,
                                 float width,
                                 float height,
                                 java.lang.String className,
                                 byte[] objectData)
Description copied from class: ShapesEx

Creates a new OLE object and inserts it to a collection at the specified index.

Overrides:
insertOleObjectFrame in class ShapesEx
Parameters:
index - The zero-based index at which OLE object should be inserted.
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.
className - Name of an OLE class.
objectData - OLE object's data.

insertOleObjectFrame

public void insertOleObjectFrame(int index,
                                 float x,
                                 float y,
                                 float width,
                                 float height,
                                 java.lang.String className,
                                 java.lang.String path)
Description copied from class: ShapesEx

Creates a new OLE object and inserts it to a collection at the specified index.

Overrides:
insertOleObjectFrame in class ShapesEx
Parameters:
index - The zero-based index at which OLE object should be inserted.
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.
className - Name of an OLE class.
path - Path to the linked file.

addVideoFrame

public VideoFrameEx addVideoFrame(float x,
                                  float y,
                                  float width,
                                  float height,
                                  java.lang.String fname)
Description copied from class: ShapesEx

Adds a new video frame to the end of a collection.

Overrides:
addVideoFrame in class ShapesEx
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:
Created VideoFrameEx object.

insertVideoFrame

public void insertVideoFrame(int index,
                             float x,
                             float y,
                             float width,
                             float height,
                             java.lang.String fname)
Description copied from class: ShapesEx

Creates a new video frame and inserts it to a collection at the specified index.

Overrides:
insertVideoFrame in class ShapesEx
Parameters:
index - The zero-based index at which video frame should be inserted.
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.

addAudioFrameCD

public AudioFrameEx addAudioFrameCD(float x,
                                    float y,
                                    float width,
                                    float height)
Description copied from class: ShapesEx

Adds an AudioFrameEx with CD to the end of collection.

Overrides:
addAudioFrameCD in class ShapesEx
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.
Returns:
AudioFrameEx object.

insertAudioFrameCD

public void insertAudioFrameCD(int index,
                               float x,
                               float y,
                               float width,
                               float height)
Description copied from class: ShapesEx

Insert an AudioFrameEx with CD.

Overrides:
insertAudioFrameCD in class ShapesEx
Parameters:
index - The zero-based index at which video frame should be inserted.
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.

addAudioFrameLinked

public AudioFrameEx addAudioFrameLinked(float x,
                                        float y,
                                        float width,
                                        float height,
                                        java.lang.String fname)
Description copied from class: ShapesEx

Adds a new audio frame with linked audio file to the end of a collection.

Overrides:
addAudioFrameLinked in class ShapesEx
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:
Created AudioFrameEx object.

insertAudioFrameLinked

public void insertAudioFrameLinked(int index,
                                   float x,
                                   float y,
                                   float width,
                                   float height,
                                   java.lang.String fname)
Description copied from class: ShapesEx

Creates a new audio frame with linked audio file and inserts it to a collection at the specified index.

Overrides:
insertAudioFrameLinked in class ShapesEx
Parameters:
index - The zero-based index at which audio frame should be inserted.
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.

addAudioFrameEmbedded

public AudioFrameEx addAudioFrameEmbedded(float x,
                                          float y,
                                          float width,
                                          float height,
                                          java.io.InputStream audio_stream)
Overrides:
addAudioFrameEmbedded in class ShapesEx

insertAudioFrameEmbedded

public void insertAudioFrameEmbedded(int index,
                                     float x,
                                     float y,
                                     float width,
                                     float height,
                                     java.io.InputStream audio_stream)
Overrides:
insertAudioFrameEmbedded in class ShapesEx

indexOf

public int indexOf(ShapeEx shape)
Description copied from class: ShapesEx

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

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

toArray

public ShapeEx[] toArray()
Description copied from class: ShapesEx

Creates and returns an array with all shapse in it.

Overrides:
toArray in class ShapesEx
Returns:
Array of ShapeEx

toArray

public ShapeEx[] toArray(int startIndex,
                         int count)
Description copied from class: ShapesEx

Creates and returns an array with all shapes from the specified range in it.

Overrides:
toArray in class ShapesEx
Parameters:
startIndex - An index of a first shape to return.
count - A number of shapes to return.
Returns:
Array of ShapeEx

reorder

public void reorder(int index,
                    ShapeEx shape)
Description copied from class: ShapesEx

Moves a shape from the collection to the specified position.

Overrides:
reorder in class ShapesEx
Parameters:
index - Target index.
shape - Shape to move.

reorder

public void reorder(int index,
                    ShapeEx... shapes)
Description copied from class: ShapesEx

Moves shapes from the collection to the specified position. Shapes will be placed starting from index in order they appear in list.

Overrides:
reorder in class ShapesEx
Parameters:
index - Target index.
shapes - Shapes to move.

addAutoShape

public int addAutoShape(int shapeType,
                        float x,
                        float y,
                        float width,
                        float height)
Description copied from class: ShapesEx

Creates a new AutoShapeEx and adds it to the end of the collection.

Overrides:
addAutoShape in class ShapesEx
Parameters:
shapeType - The ShapeTypeEx of shape.
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.
Returns:
The zero-based index of the created shape.

insertAutoShape

public void insertAutoShape(int index,
                            int shapeType,
                            float x,
                            float y,
                            float width,
                            float height)
Description copied from class: ShapesEx

Creates a new AutoShapeEx and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.

Overrides:
insertAutoShape in class ShapesEx
Parameters:
index - The zero-based index at which value should be inserted.
shapeType - An ShapeTypeEx of shape.
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.

addConnector

public int addConnector(int shapeType,
                        float x,
                        float y,
                        float width,
                        float height)
Description copied from class: ShapesEx

Creates a new ConnectorEx and adds it to the end of the collection.

Overrides:
addConnector in class ShapesEx
Parameters:
shapeType - The ShapeTypeEx of shape.
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.
Returns:
The zero-based index of the created shape.

insertConnector

public void insertConnector(int index,
                            int shapeType,
                            float x,
                            float y,
                            float width,
                            float height)
Description copied from class: ShapesEx

Creates a new ConnectorEx and inserts it to the collection at the specified index.

Overrides:
insertConnector in class ShapesEx
Parameters:
index - The zero-based index at which value should be inserted.
shapeType - An ShapeTypeEx of shape.
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.

addPictureFrame

public int addPictureFrame(int shapeType,
                           float x,
                           float y,
                           float width,
                           float height,
                           ImageEx image)
Description copied from class: ShapesEx

Creates a new PictureFrameEx and adds it to the end of the collection.

Overrides:
addPictureFrame in class ShapesEx
Parameters:
shapeType -

The shape contained in the set ShapeTypeEx of shapes, except all sorts of lines:

ShapeTypeEx.Line,

ShapeTypeEx.StraightConnector1,

ShapeTypeEx.BentConnector2,

ShapeTypeEx.BentConnector3,

ShapeTypeEx.BentConnector4,

ShapeTypeEx.BentConnector5,

ShapeTypeEx.CurvedConnector2,

ShapeTypeEx.CurvedConnector3,

ShapeTypeEx.CurvedConnector4,

ShapeTypeEx.CurvedConnector5.

x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.
image - The image of picture frame.
Returns:
The zero-based index of the created shape.

insertPictureFrame

public void insertPictureFrame(int index,
                               int shapeType,
                               float x,
                               float y,
                               float width,
                               float height,
                               ImageEx image)
Description copied from class: ShapesEx

Creates a new PictureFrameEx and inserts it to the collection at the specified index.

Overrides:
insertPictureFrame in class ShapesEx
Parameters:
index - The zero-based index at which value should be inserted.
shapeType -

The shape contained in the set ShapeTypeEx of shapes, except all sorts of lines:

ShapeTypeEx.Line,

ShapeTypeEx.StraightConnector1,

ShapeTypeEx.BentConnector2,

ShapeTypeEx.BentConnector3,

ShapeTypeEx.BentConnector4,

ShapeTypeEx.BentConnector5,

ShapeTypeEx.CurvedConnector2,

ShapeTypeEx.CurvedConnector3,

ShapeTypeEx.CurvedConnector4,

ShapeTypeEx.CurvedConnector5.

x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
width - The width of shape's frame.
height - The height of shape's frame.
image - The image of picture frame.

addTable

public int addTable(float x,
                    float y,
                    double[] columnWidths,
                    double[] rowHeights)
Description copied from class: ShapesEx

Creates a new TableEx and adds it to the end of the collection.

Overrides:
addTable in class ShapesEx
Parameters:
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
columnWidths - Array of doubles which represents widths of columns in the table.
rowHeights - Array of doubles which represents heights of rows in the table.
Returns:
The zero-based index of the created shape.

insertTable

public void insertTable(int index,
                        float x,
                        float y,
                        double[] columnWidths,
                        double[] rowHeights)
Description copied from class: ShapesEx

Creates a new TableEx and inserts it to the collection at the specified index.

Overrides:
insertTable in class ShapesEx
Parameters:
index - The zero-based index at which value should be inserted.
x - The X-coordinate for a left side of shape's frame.
y - The Y-coordinate for a top side of shape's frame.
columnWidths - Array of doubles which represents widths of columns in the table.
rowHeights - Array of doubles which represents heights of rows in the table.

removeAt

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

Removes the element at the specified index of the collection.

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

remove

public void remove(ShapeEx shape)
Description copied from class: ShapesEx

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

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

iterator

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

Returns an enumerator for the entire collection.

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

getParent

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

Returns parent object for a Shapes collection. Read-only object. See also IPresentationComponent.

Overrides:
getParent in class ShapesEx