public final class ShapeCollection extends DomObject<GroupShape> implements IShapeCollection
Represents a collection of a shapes.
| Modifier and Type | Method and Description |
|---|---|
IAudioFrame |
addAudioFrameCD(float x,
float y,
float width,
float height)
Adds an AudioFrame with CD to the end of collection.
|
IAudioFrame |
addAudioFrameEmbedded(float x,
float y,
float width,
float height,
IAudio audio)
Adds a new audio frame with embedded audio file to the end of a collection.
|
IAudioFrame |
addAudioFrameEmbedded(float x,
float y,
float width,
float height,
java.io.InputStream audio_stream)
Adds a new audio frame with embedded audio file to the end of a collection.
|
IAudioFrame |
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.
|
IAutoShape |
addAutoShape(int shapeType,
float x,
float y,
float width,
float height)
Creates a new AutoShape, tunes it from default template and adds it to the end of the collection.
|
IAutoShape |
addAutoShape(int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new AutoShape and adds it to the end of the collection.
|
IChart |
addChart(int type,
float x,
float y,
float width,
float height)
Creates a new Chart, initialize it with sample series data and settings and adds
it to the end of the collection.
|
IChart |
addChart(int type,
float x,
float y,
float width,
float height,
boolean initWithSample)
Creates a new Chart and adds it to the end of the collection.
|
IShape |
addClone(IShape sourceShape)
Adds a copy of a specified shape to the end of the collection.
|
IShape |
addClone(IShape sourceShape,
float x,
float y)
Adds a copy of a specified shape to the end of the collection.
|
IShape |
addClone(IShape sourceShape,
float x,
float y,
float width,
float height)
Adds a copy of a specified shape to the end of the collection.
|
IConnector |
addConnector(int shapeType,
float x,
float y,
float width,
float height)
Creates a new Connector, tunes it from default template and adds it to the end of the collection.
|
IConnector |
addConnector(int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new Connector and adds it to the end of the collection.
|
IGroupShape |
addGroupShape()
Creates a new GroupShape and adds it to the end of the collection.
|
IGroupShape |
addGroupShape(ISvgImage svgImage,
float x,
float y,
float width,
float height)
Creates a new GroupShape, fills it with converted shapes from SVG and adds it to the end of the collection.
|
IAutoShape |
addMathShape(float x,
float y,
float width,
float height)
Creates a new Autoshape tuned from default template to math content and adds it to the end of the collection.
|
IOleObjectFrame |
addOleObjectFrame(float x,
float y,
float width,
float height,
IOleEmbeddedDataInfo dataInfo)
Adds a new OLE object to the end of a collection.
|
IOleObjectFrame |
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.
|
IPictureFrame |
addPictureFrame(int shapeType,
float x,
float y,
float width,
float height,
IPPImage image)
Creates a new PictureFrame and adds it to the end of the collection.
|
ISectionZoomFrame |
addSectionZoomFrame(float x,
float y,
float width,
float height,
ISection section)
Adds a new Section Zoom object to the end of a collection.
|
ISectionZoomFrame |
addSectionZoomFrame(float x,
float y,
float width,
float height,
ISection section,
IPPImage image)
Adds a new Section Zoom object to the end of a collection with a predefined image.
|
ISmartArt |
addSmartArt(float x,
float y,
float width,
float height,
int layoutType)
Add SmartArt diagram.
|
ISummaryZoomFrame |
addSummaryZoomFrame(float x,
float y,
float width,
float height)
Adds a new Summary Zoom object to the end of a collection.
|
ITable |
addTable(float x,
float y,
double[] columnWidths,
double[] rowHeights)
Creates a new Table and adds it to the end of the collection.
|
IVideoFrame |
addVideoFrame(float x,
float y,
float width,
float height,
IVideo video)
Adds a new video frame to the end of a collection.
|
IVideoFrame |
addVideoFrame(float x,
float y,
float width,
float height,
java.lang.String fname)
Adds a new video frame to the end of a collection.
|
IZoomFrame |
addZoomFrame(float x,
float y,
float width,
float height,
ISlide slide)
Adds a new Zoom object to the end of a collection.
|
IZoomFrame |
addZoomFrame(float x,
float y,
float width,
float height,
ISlide slide,
IPPImage image)
Adds a new Zoom object to the end of a collection.
|
void |
clear()
Removes all shapes from the collection.
|
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies all elements from the collection to the specified array.
|
IShape |
get_Item(int index)
Gets the element at the specified index.
|
IGroupShape |
getParentGroup()
Returns parent GroupShape object for a shapes collection.
|
java.lang.Object |
getSyncRoot()
Returns a synchronization root.
|
int |
indexOf(IShape shape)
Returns the zero-based index of the first occurrence of a shape in the collection.
|
IAudioFrame |
insertAudioFrameCD(int index,
float x,
float y,
float width,
float height)
Insert an AudioFrame with CD.
|
IAudioFrame |
insertAudioFrameEmbedded(int index,
float x,
float y,
float width,
float height,
IAudio audio)
Insert an AudioFrame with embedded audio file.
|
IAudioFrame |
insertAudioFrameEmbedded(int index,
float x,
float y,
float width,
float height,
java.io.InputStream audio_stream)
Insert an AudioFrame with embedded audio file.
|
IAudioFrame |
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.
|
IAutoShape |
insertAutoShape(int index,
int shapeType,
float x,
float y,
float width,
float height)
Creates a new AutoShape, tunes it from default template and inserts it to
the collection at the specified index.
|
IAutoShape |
insertAutoShape(int index,
int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new AutoShape and inserts it to the collection at the specified index.
|
IChart |
insertChart(int type,
float x,
float y,
float width,
float height,
int index)
Creates a new Chart, initialize it with sample series data and settings and inserts
it to the specified position in the collection.
|
IChart |
insertChart(int type,
float x,
float y,
float width,
float height,
int index,
boolean initWithSample)
Creates a new Chart and inserts it to the specified position in the collection.
|
IShape |
insertClone(int index,
IShape sourceShape)
Inserts a copy of a specified shape to specified position of the collection.
|
IShape |
insertClone(int index,
IShape sourceShape,
float x,
float y)
Inserts a copy of a specified shape to specified position of the collection.
|
IShape |
insertClone(int index,
IShape sourceShape,
float x,
float y,
float width,
float height)
Inserts a copy of a specified shape to specified position of the collection.
|
IConnector |
insertConnector(int index,
int shapeType,
float x,
float y,
float width,
float height)
Creates a new Connector, tunes it from default template and inserts it to
the collection at the specified index.
|
IConnector |
insertConnector(int index,
int shapeType,
float x,
float y,
float width,
float height,
boolean createFromTemplate)
Creates a new Connector and inserts it to the collection at the specified index.
|
IGroupShape |
insertGroupShape(int index)
Creates a new GroupShape and inserts it to the collection at the specified index.
|
IOleObjectFrame |
insertOleObjectFrame(int index,
float x,
float y,
float width,
float height,
IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object and inserts it to a collection at the specified index.
|
IOleObjectFrame |
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.
|
IPictureFrame |
insertPictureFrame(int index,
int shapeType,
float x,
float y,
float width,
float height,
IPPImage image)
Creates a new PictureFrame and inserts it to the collection at the specified index.
|
ISectionZoomFrame |
insertSectionZoomFrame(int index,
float x,
float y,
float width,
float height,
ISection section)
Creates a new Section Zoom object and inserts into to a collection at the specified index.
|
ISectionZoomFrame |
insertSectionZoomFrame(int index,
float x,
float y,
float width,
float height,
ISection section,
IPPImage image)
Creates a new Section Zoom object and inserts it to a collection at the specified index.
|
ISummaryZoomFrame |
insertSummaryZoomFrame(int index,
float x,
float y,
float width,
float height)
Creates a new Summary Zoom object and inserts it to a collection at the specified index.
|
ITable |
insertTable(int index,
float x,
float y,
double[] columnWidths,
double[] rowHeights)
Creates a new Table and inserts it to the collection at the specified index.
|
IVideoFrame |
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.
|
IZoomFrame |
insertZoomFrame(int index,
float x,
float y,
float width,
float height,
ISlide slide)
Creates a new Zoom object and inserts it to a collection at the specified index.
|
IZoomFrame |
insertZoomFrame(int index,
float x,
float y,
float width,
float height,
ISlide slide,
IPPImage image)
Creates a new Zoom object 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.Generic.IGenericEnumerator<IShape> |
iterator()
Returns an enumerator that iterates through the collection.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IShape> |
iteratorJava()
Returns a java iterator for the entire collection.
|
void |
remove(IShape 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,
IShape... shapes)
Moves shapes from the collection to the specified position.
|
void |
reorder(int index,
IShape shape)
Moves a shape from the collection to the specified position.
|
int |
size()
Gets the number of elements actually contained in the collection.
|
IShape[] |
toArray()
Creates and returns an array with all shapse in it.
|
IShape[] |
toArray(int startIndex,
int count)
Creates and returns an array with all shapes from the specified range in it.
|
getParent_Immediatepublic final int size()
Gets the number of elements actually contained in the collection.
Read-only int.
size in interface com.aspose.ms.System.Collections.ICollection<IShape>public final IShape get_Item(int index)
Gets the element at the specified index.
Read-only IShape.
get_Item in interface IShapeCollectionpublic final IChart addChart(int type, float x, float y, float width, float height)
Creates a new Chart, initialize it with sample series data and settings and adds it to the end of the collection.
addChart in interface IShapeCollectiontype - 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.public final IChart addChart(int type, float x, float y, float width, float height, boolean initWithSample)
Creates a new Chart and adds it to the end of the collection.
addChart in interface IShapeCollectiontype - 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.initWithSample - If true then new chart will be initialized with sample series data and settings.
If false then new chart will have no series and minimum settings. In this case
chart creation will be more fast.public final ISmartArt addSmartArt(float x, float y, float width, float height, int layoutType)
Add SmartArt diagram.
Example:Presentation pres = new Presentation(); ISlide slide = pres.getSlides().get_Item(0); ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
addSmartArt in interface IShapeCollectionx - The X-coordinate for a left side of diagram's frame.y - The Y-coordinate for a left side of diagram's frame.width - The width of diagram's frame.height - The height of diagram's frame.layoutType - The type of SmartArt diagrampublic final IChart insertChart(int type, float x, float y, float width, float height, int index)
Creates a new Chart, initialize it with sample series data and settings and inserts it to the specified position in the collection.
insertChart in interface IShapeCollectiontype - 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.public final IChart insertChart(int type, float x, float y, float width, float height, int index, boolean initWithSample)
Creates a new Chart and inserts it to the specified position in the collection.
insertChart in interface IShapeCollectiontype - 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.initWithSample - If true then new chart will be initialized with sample series data and settings.
If false then new chart will have no series and minimum settings. In this case
chart creation will be more fast.public final IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide)
Adds a new Zoom object to the end of a collection.
This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
addZoomFrame in interface IShapeCollectionx - X coordinate of a new Zoom frame float.y - Y coordinate of a new Zoom frame float.width - Width of a new Zoom frame float.height - Height of a new Zoom frame float.slide - The slide object referenced by the Zoom frame ISlide.IZoomFrame.com.aspose.ms.System.ArgumentException - Referenced slide does not belong to the current presentation.public final IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image)
Adds a new Zoom object to the end of a collection.
This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(imageBytes); IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1), image); } finally { if (pres != null) pres.dispose(); }
addZoomFrame in interface IShapeCollectionx - X coordinate of a new Zoom frame float.y - Y coordinate of a new Zoom frame float.width - Width of a new Zoom frame float.height - Height of a new Zoom frame float.slide - The slide object referenced by the Zoom frame ISlide.image - The image for the referenced slide IPPImageIZoomFrame.com.aspose.ms.System.ArgumentException - Referenced slide does not belong to the current presentation.public final IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide)
Creates a new Zoom object and inserts it to a collection at the specified index.
This example demonstrates creation and inserting a Zoom object at the specified index of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertZoomFrame(2, 150, 20, 50, 50, pres.getSlides().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
insertZoomFrame in interface IShapeCollectionindex - The zero-based index at which Zoom frame should be inserted.x - X coordinate of a new Zoom frame float.y - Y coordinate of a new Zoom frame float.width - Width of a new Zoom frame float.height - Height of a new Zoom frame float.slide - The slide object referenced by the Zoom frame ISlide.IZoomFrame.com.aspose.ms.System.ArgumentException - Referenced slide does not belong to the current presentation.public final IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image)
Creates a new Zoom object and inserts it to a collection at the specified index.
This example demonstrates creation and inserting a Zoom object at the specified index of a collection (assume that there are at least two slides in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(imageBytes); IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertZoomFrame(2, 150, 20, 50, 50, pres.getSlides().get_Item(1), image); } finally { if (pres != null) pres.dispose(); }
insertZoomFrame in interface IShapeCollectionindex - The zero-based index at which Zoom frame should be inserted.x - X coordinate of a new Zoom frame float.y - Y coordinate of a new Zoom frame float.width - Width of a new Zoom frame float.height - Height of a new Zoom frame float.slide - The slide object referenced by the Zoom frame ISlide.image - The image for the referenced slide IPPImageIZoomFrame.com.aspose.ms.System.ArgumentException - Referenced slide does not belong to the current presentation.public final ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section)
Adds a new Section Zoom object to the end of a collection.
This example demonstrates adding a Section Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSectionZoomFrame(150, 20, 50, 50, pres.getSections().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
addSectionZoomFrame in interface IShapeCollectionx - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.section - The section object referenced by the Section Zoom frame ISection.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Referenced section does not belong to the current presentation or does not contains any slides.public final ISectionZoomFrame addSectionZoomFrame(float x, float y, float width, float height, ISection section, IPPImage image)
Adds a new Section Zoom object to the end of a collection with a predefined image.
This example demonstrates adding a Section Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.png"))); ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSectionZoomFrame(150, 20, 50, 50, pres.getSections().get_Item(1), image); } catch (IOException e) { } finally { if (pres != null) pres.dispose(); }
addSectionZoomFrame in interface IShapeCollectionx - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.section - The section object referenced by the Section Zoom frame ISection.image - The image for the referenced slide IPPImageISectionZoomFrame.com.aspose.ms.System.ArgumentException - Referenced section does not belong to the current presentation or does not contains any slides.public final ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section)
Creates a new Section Zoom object and inserts into to a collection at the specified index.
This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSectionZoomFrame(2, 150, 20, 50, 50, pres.getSections().get_Item(1)); } finally { if (pres != null) pres.dispose(); }
insertSectionZoomFrame in interface IShapeCollectionindex - The zero-based index at which Section Zoom frame should be inserted.x - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.section - The slide object referenced by the Section Zoom frame ISection.ISectionZoomFrame.com.aspose.ms.System.ArgumentException - Referenced section does not belong to the current presentation or does not contains any slides.public final ISectionZoomFrame insertSectionZoomFrame(int index, float x, float y, float width, float height, ISection section, IPPImage image)
Creates a new Section Zoom object and inserts it to a collection at the specified index.
This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { IPPImage image = pres.getImages().addImage(Files.readAllBytes(Paths.get("image.png"))); ISectionZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSectionZoomFrame(2, 150, 20, 50, 50, pres.getSections().get_Item(1), image); } finally { if (pres != null) pres.dispose(); }
insertSectionZoomFrame in interface IShapeCollectionindex - The zero-based index at which Section Zoom frame should be inserted.x - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.section - The slide object referenced by the Section Zoom frame ISection.image - The image for the referenced slide IPPImageISectionZoomFrame.com.aspose.ms.System.ArgumentException - Referenced section does not belong to the current presentation or does not contains any slides.public final ISummaryZoomFrame addSummaryZoomFrame(float x, float y, float width, float height)
Adds a new Summary Zoom object to the end of a collection.
This example demonstrates adding a Summary Zoom object to the end of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISummaryZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addSummaryZoomFrame(150, 20, 500, 250); } finally { if (pres != null) pres.dispose(); }
addSummaryZoomFrame in interface IShapeCollectionx - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.
ISummaryZoomFrame.PptxEditException - There are no sections in the presentation, or the target slide does not belong to any section.public final ISummaryZoomFrame insertSummaryZoomFrame(int index, float x, float y, float width, float height)
Creates a new Summary Zoom object and inserts it to a collection at the specified index.
This example demonstrates creation and inserting a Summary Zoom object at the specified index of a collection (assume that there are at least two sections in the "Presentation.pptx" presentation):Presentation pres = new Presentation("Presentation.pptx"); try { ISummaryZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().insertSummaryZoomFrame(2, 150, 20, 50, 50); } finally { if (pres != null) pres.dispose(); }
insertSummaryZoomFrame in interface IShapeCollectionindex - The zero-based index at which Section Zoom frame should be inserted.x - X coordinate of a new Section Zoom frame float.y - Y coordinate of a new Section Zoom frame float.width - Width of a new Section Zoom frame float.height - Height of a new Section Zoom frame float.
ISummaryZoomFrame.PptxEditException - There are no sections in the presentation, or the target slide does not belong to any section.public final IOleObjectFrame addOleObjectFrame(float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)
Adds a new OLE object to the end of a collection.
This example demonstrates adding an OLE object to the end of a collection:byte[] fileData = Files.readAllBytes(Paths.get("test.zip")); IEmbeddedDataInfo dataInfo = new EmbeddedDataInfo(fileData, "zip"); IOleObjectFrame oleObjectFrame = slidees.getShapes().addOleObjectFrame(150, 20, 50, 50, dataInfo);
addOleObjectFrame in interface IShapeCollectionx - 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.dataInfo - Embedded data info IOleEmbeddedDataInfo.public final IOleObjectFrame 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.
addOleObjectFrame in interface IShapeCollectionx - 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.The path is stored in the presentation as is. If a relative path is specified the corresponding file will be inaccessible when opening the presentation from a different directory.
public final IOleObjectFrame insertOleObjectFrame(int index, float x, float y, float width, float height, IOleEmbeddedDataInfo dataInfo)
Creates a new OLE object and inserts it to a collection at the specified index.
This example demonstrates inserting an OLE object at the second index:byte[] fileData = Files.readAllBytes(Paths.get("test.zip")); IOleDataInfo dataInfo = new OleDataInfo(fileData, "zip"); IOleObjectFrame oleObjectFrame = slidees.getShapes().addOleObjectFrame(2, 150, 20, 50, 50, dataInfo);
insertOleObjectFrame in interface IShapeCollectionindex - 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.dataInfo - Embedded data info IOleEmbeddedDataInfo.public final IOleObjectFrame 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.
insertOleObjectFrame in interface IShapeCollectionindex - 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.public final IVideoFrame addVideoFrame(float x, float y, float width, float height, java.lang.String fname)
Adds a new video frame to the end of a collection.
addVideoFrame in interface IShapeCollectionx - 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.public final IVideoFrame addVideoFrame(float x, float y, float width, float height, IVideo video)
Adds a new video frame to the end of a collection.
addVideoFrame in interface IShapeCollectionx - 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.video - Video to add.public final IVideoFrame 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.
insertVideoFrame in interface IShapeCollectionindex - 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.public final IAudioFrame addAudioFrameCD(float x, float y, float width, float height)
Adds an AudioFrame with CD to the end of collection.
addAudioFrameCD in interface IShapeCollectionx - 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.public final IAudioFrame insertAudioFrameCD(int index, float x, float y, float width, float height)
Insert an AudioFrame with CD.
insertAudioFrameCD in interface IShapeCollectionindex - 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.public final IAudioFrame 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.
addAudioFrameLinked in interface IShapeCollectionx - 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.public final IAudioFrame 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.
insertAudioFrameLinked in interface IShapeCollectionindex - 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.public final IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, java.io.InputStream audio_stream)
Adds a new audio frame with embedded audio file to the end of a collection. Embedded audio file can be a WAV only. It adds new audio into Presentation.Audios list.
addAudioFrameEmbedded in interface IShapeCollectionx - 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.audio_stream - Inout stream with audio data.public final IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, java.io.InputStream audio_stream)
Insert an AudioFrame with embedded audio file. Embedded audio file sound can be a WAV only.
insertAudioFrameEmbedded in interface IShapeCollectionindex - The zero-based index at which value 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.audio_stream - Audio stream.public final IAudioFrame addAudioFrameEmbedded(float x, float y, float width, float height, IAudio audio)
Adds a new audio frame with embedded audio file to the end of a collection. It uses audio file from Presentation.Audios list.
addAudioFrameEmbedded in interface IShapeCollectionx - 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.audio - Audio from Presentation.Audios list.public final IAudioFrame insertAudioFrameEmbedded(int index, float x, float y, float width, float height, IAudio audio)
Insert an AudioFrame with embedded audio file. It uses audio file from Presentation.Audios list.
insertAudioFrameEmbedded in interface IShapeCollectionindex - The zero-based index at which value 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.audio - Audio from Presentation.Audios list.public final int indexOf(IShape shape)
Returns the zero-based index of the first occurrence of a shape in the collection.
indexOf in interface IShapeCollectionshape - The shape to locate in the collection.public final IShape[] toArray()
Creates and returns an array with all shapse in it.
toArray in interface IShapeCollectionShapepublic final IShape[] toArray(int startIndex, int count)
Creates and returns an array with all shapes from the specified range in it.
toArray in interface IShapeCollectionstartIndex - An index of a first shape to return.count - A number of shapes to return.Shapepublic final void reorder(int index,
IShape shape)
Moves a shape from the collection to the specified position.
reorder in interface IShapeCollectionindex - Target index.shape - Shape to move.public final void reorder(int index,
IShape... shapes)
Moves shapes from the collection to the specified position. Shapes will be placed starting from index in order they appear in list.
reorder in interface IShapeCollectionindex - Target index.shapes - Shapes to move.public final IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height)
Creates a new AutoShape, tunes it from default template and adds it to the end of the collection.
addAutoShape in interface IShapeCollectionshapeType - The ShapeType 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.public final IAutoShape addAutoShape(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new AutoShape and adds it to the end of the collection.
addAutoShape in interface IShapeCollectionshapeType - The ShapeType 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.createFromTemplate - If true then new shape will be tuned from default template. Not empty name,
simple style, text centered will be assined to the new shape.
If false then all values of the properties of the new shape will have default values.public final IAutoShape addMathShape(float x, float y, float width, float height)
Creates a new Autoshape tuned from default template to math content and adds it to the end of the collection.
addMathShape in interface IShapeCollectionx - 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.public final IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height)
Creates a new AutoShape, tunes it from default template and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.
insertAutoShape in interface IShapeCollectionindex - The zero-based index at which value should be inserted.shapeType - An ShapeType 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.public final IAutoShape insertAutoShape(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new AutoShape and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.
insertAutoShape in interface IShapeCollectionindex - The zero-based index at which value should be inserted.shapeType - An ShapeType 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.createFromTemplate - If true then new shape will be tuned from default template. Not empty name,
simple style, text centered will be assined to the new shape.
If false then all values of the properties of the new shape will have default values.public final IGroupShape addGroupShape()
Creates a new GroupShape and adds it to the end of the collection. GroupShape frame size and position will be fitted to content when new shape will be added into the GroupShape.
addGroupShape in interface IShapeCollectionpublic final IGroupShape addGroupShape(ISvgImage svgImage, float x, float y, float width, float height)
Creates a new GroupShape, fills it with converted shapes from SVG and adds it to the end of the collection.
addGroupShape in interface IShapeCollectionsvgImage - Svg image object ISvgImagex - The X coordinate for the left side of the shape group frame.y - The Y coordinate for the top side of the shape group frame.width - The width of the group of the shape group frame.height - The height of a group of the shape group frame.public final IGroupShape insertGroupShape(int index)
Creates a new GroupShape and inserts it to the collection at the specified index. GroupShape frame size and position will be fitted to content when new shape will be added into the GroupShape.
insertGroupShape in interface IShapeCollectionindex - The zero-based index at which value should be inserted.public final IConnector addConnector(int shapeType, float x, float y, float width, float height)
Creates a new Connector, tunes it from default template and adds it to the end of the collection.
addConnector in interface IShapeCollectionshapeType - The ShapeType 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.public final IConnector addConnector(int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new Connector and adds it to the end of the collection.
addConnector in interface IShapeCollectionshapeType - The ShapeType 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.createFromTemplate - If true then new shape will be tuned from default template. Not empty name,
simple style, text centered will be assined to the new shape.
If false then all values of the properties of the new shape will have default values.public final IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height)
Creates a new Connector, tunes it from default template and inserts it to the collection at the specified index.
insertConnector in interface IShapeCollectionindex - The zero-based index at which value should be inserted.shapeType - An ShapeType 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.public final IConnector insertConnector(int index, int shapeType, float x, float y, float width, float height, boolean createFromTemplate)
Creates a new Connector and inserts it to the collection at the specified index.
insertConnector in interface IShapeCollectionindex - The zero-based index at which value should be inserted.shapeType - An ShapeType 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.createFromTemplate - If true then new shape will be tuned from default template. Not empty name,
simple style, text centered will be assined to the new shape.
If false then all values of the properties of the new shape will have default values.public final IPictureFrame addPictureFrame(int shapeType, float x, float y, float width, float height, IPPImage image)
Creates a new PictureFrame and adds it to the end of the collection.
addPictureFrame in interface IShapeCollectionshapeType - The shape contained in the set ShapeType
of shapes, except all sorts of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.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.public final IPictureFrame insertPictureFrame(int index, int shapeType, float x, float y, float width, float height, IPPImage image)
Creates a new PictureFrame and inserts it to the collection at the specified index.
insertPictureFrame in interface IShapeCollectionindex - The zero-based index at which value should be inserted.shapeType - The shape contained in the set ShapeType
of shapes, except all sorts of lines:
ShapeType.Line,
ShapeType.StraightConnector1,
ShapeType.BentConnector2,
ShapeType.BentConnector3,
ShapeType.BentConnector4,
ShapeType.BentConnector5,
ShapeType.CurvedConnector2,
ShapeType.CurvedConnector3,
ShapeType.CurvedConnector4,
ShapeType.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.public final ITable addTable(float x, float y, double[] columnWidths, double[] rowHeights)
Creates a new Table and adds it to the end of the collection.
addTable in interface IShapeCollectionx - 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.public final ITable insertTable(int index, float x, float y, double[] columnWidths, double[] rowHeights)
Creates a new Table and inserts it to the collection at the specified index.
insertTable in interface IShapeCollectionindex - 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.public final void removeAt(int index)
Removes the element at the specified index of the collection.
removeAt in interface IShapeCollectionindex - The zero-based index of the element to remove.public final void remove(IShape shape)
Removes the first occurrence of a specific shape from the collection.
remove in interface IShapeCollectionshape - The shape to remove from the collection.public final void clear()
Removes all shapes from the collection.
clear in interface IShapeCollectionpublic final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IShape> iterator()
Returns an enumerator that iterates through the collection.
iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IShape>iterator in interface com.aspose.ms.System.Collections.IEnumerable<IShape>iterator in interface java.lang.Iterable<IShape>IGenericEnumerator that can be used to iterate through the collection.public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IShape> iteratorJava()
Returns a java iterator for the entire collection.
iteratorJava in interface IGenericCollection<IShape>Iterator for the entire collection.public final IGroupShape getParentGroup()
Returns parent GroupShape object for a shapes collection.
Read-only IGroupShape.
getParentGroup in interface IShapeCollectionpublic final IShape addClone(IShape sourceShape, float x, float y, float width, float height)
Adds a copy of a specified shape to the end of the collection.
addClone in interface IShapeCollectionsourceShape - Shape to clone.x - X coordinate of a new shape.y - Y coordinate of a new shape.width - Width of a new shape.height - Height of a new shape.public final IShape addClone(IShape sourceShape, float x, float y)
Adds a copy of a specified shape to the end of the collection.
Width and Height of the new shape are equal to Width and Height of the source Shape.
addClone in interface IShapeCollectionsourceShape - Shape to clone.x - X coordinate of a new shape.y - Y coordinate of a new shape.public final IShape addClone(IShape sourceShape)
Adds a copy of a specified shape to the end of the collection.
X, Y, Width and Height of the new shape are equal to X, Y, Width and Height of the source Shape.
addClone in interface IShapeCollectionsourceShape - Shape to clone.public final IShape insertClone(int index, IShape sourceShape, float x, float y, float width, float height)
Inserts a copy of a specified shape to specified position of the collection.
insertClone in interface IShapeCollectionindex - Index of new shape.sourceShape - Shape to clone.x - X coordinate of a new shape.y - Y coordinate of a new shape.width - Width of a new shape.height - Height of a new shape.public final IShape insertClone(int index, IShape sourceShape, float x, float y)
Inserts a copy of a specified shape to specified position of the collection.
Width and Height of the new shape are equal to Width and Height of the source Shape.
insertClone in interface IShapeCollectionindex - Index of new shape.sourceShape - Shape to clone.x - X coordinate of a new shape.y - Y coordinate of a new shape.public final IShape insertClone(int index, IShape sourceShape)
Inserts a copy of a specified shape to specified position of the collection.
X, Y, Width and Height of the new shape are equal to X, Y, Width and Height of the source Shape.
insertClone in interface IShapeCollectionindex - Index of new shape.sourceShape - Shape to clone.public final void copyTo(com.aspose.ms.System.Array array,
int index)
Copies all elements from the collection to the specified array.
copyTo in interface com.aspose.ms.System.Collections.ICollection<IShape>array - Target array.index - Starting index in the target array.public final boolean isSynchronized()
Returns a value indicating whether access to the collection is synchronized (thread-safe).
Read-only boolean.
isSynchronized in interface com.aspose.ms.System.Collections.ICollection<IShape>public final java.lang.Object getSyncRoot()
Returns a synchronization root.
Read-only Object.
getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<IShape>Copyright © 2004-2022 Aspose Pty Ltd. All Rights Reserved.