com.aspose.slides.pptx
Class SlidesEx

java.lang.Object
  extended by com.aspose.slides.pptx.SlidesEx

public final class SlidesEx
extends java.lang.Object

Represents a collection of a slides.


Method Summary
 int addClone(SlideEx slide)
          Adds a copy of a specified slide to the end of the collection.
 int addClone(SlideEx slide, LayoutSlideEx layout)
          Adds a copy of a specified slide to the end of the collection.
 int addClone(SlideEx slide, MasterSlideEx master)
          Adds a copy of a specified slide to the end of the collection.
 int addEmptySlide(LayoutSlideEx layout)
          Adds a new empty slide to the end of the collection.
 SlideEx get(int index)
          Gets the element at the specified index.
 int indexOf(SlideEx slide)
          Returns an index of the specified slide in the collection.
 void insertClone(int index, SlideEx slide)
          Inserts a copy of a specified slide to specified position of the collection Note: this function supports cloning within the same presentation.
 void insertClone(int index, SlideEx slide, LayoutSlideEx layout)
          Inserts a copy of a specified slide to specified position of the collection.
 void insertClone(int index, SlideEx slide, MasterSlideEx master)
          Inserts a copy of a specified slide to specified position of the collection.
 void insertEmptySlide(int index, LayoutSlideEx layout)
          Inserts a copy of a specified slide to specified position of the collection.
 java.util.Iterator iterator()
          Returns an iterator for the entire collection.
 void remove(int index)
          Removes the element at the specified index of the collection.
 void remove(SlideEx value)
          Removes the first occurrence of a specific object from the collection.
 void reorder(int index, SlideEx slide)
          Moves slide from the collection to the specified position.
 void reorder(int index, SlideEx[] slides)
          Moves slides from the collection to the specified position.
 int size()
          Gets the number of elements actually contained in the collection.
 SlideEx[] toArray()
          Creates and returns an array with all slides in it.
 SlideEx[] toArray(int startIndex, int count)
          Creates and returns an array with all slides from the specified range in it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

size

public int size()
Gets the number of elements actually contained in the collection.


get

public SlideEx get(int index)
Gets the element at the specified index.

Parameters:
index - index of the element to return.
Returns:
See SlideEx.

addClone

public int addClone(SlideEx slide)
Adds a copy of a specified slide to the end of the collection.

Parameters:
slide - Slide to clone.
Returns:
Index of new slide. When cloning a slide between different presentations slide's master can be cloned too. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered. If you need more control over cloning process use
See Also:
SlidesEx.addClone(SlideEx, LayoutSlideEx), SlidesEx.addClone(SlideEx, MasterSlideEx), MasterSlidesEx.addClone(MasterSlideEx)

insertClone

public void insertClone(int index,
                        SlideEx slide)
Inserts a copy of a specified slide to specified position of the collection Note: this function supports cloning within the same presentation. For cloning slides from other presentation use SlidesEx.insertClone(int, SlideEx, LayoutSlideEx) or SlidesEx.insertClone(int, SlideEx, MasterSlideEx)

Parameters:
index - Index of a new slide.
slide - Slide to clone. When cloning a slide between different presentations slide's master can be cloned too. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered. If you need more control over cloning process use

addEmptySlide

public int addEmptySlide(LayoutSlideEx layout)
Adds a new empty slide to the end of the collection.

Parameters:
layout - Layout for a slide.
Returns:
Index of a new slide.

insertEmptySlide

public void insertEmptySlide(int index,
                             LayoutSlideEx layout)
Inserts a copy of a specified slide to specified position of the collection.

Parameters:
index - Index of a new slide.
layout - Layout for a slide.

addClone

public int addClone(SlideEx slide,
                    LayoutSlideEx layout)
Adds a copy of a specified slide to the end of the collection.

Parameters:
slide - Slide to clone.
layout - Layout slide for a new slide.
Returns:
Index of new slide.

insertClone

public void insertClone(int index,
                        SlideEx slide,
                        LayoutSlideEx layout)
Inserts a copy of a specified slide to specified position of the collection.

Parameters:
index - Index of new slide.
slide - Slide to clone.
layout - Layout slide for a new slide.

addClone

public int addClone(SlideEx slide,
                    MasterSlideEx master)
Adds a copy of a specified slide to the end of the collection. Layout will be selected automatically from the specified master.

Parameters:
slide - Slide to clone.
master - Master slide for a new slide.
Returns:
Index of new slide.

insertClone

public void insertClone(int index,
                        SlideEx slide,
                        MasterSlideEx master)
Inserts a copy of a specified slide to specified position of the collection. Layout will be selected automatically from the specified master.

Parameters:
index - Index of new slide.
slide - Slide to clone.
master - Master slide for a new slide.

remove

public void remove(SlideEx value)
Removes the first occurrence of a specific object from the collection.

Parameters:
value - The slide to remove from the collection.

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.

iterator

public java.util.Iterator iterator()
Returns an iterator for the entire collection.


toArray

public SlideEx[] toArray()
Creates and returns an array with all slides in it.


toArray

public SlideEx[] toArray(int startIndex,
                         int count)
Creates and returns an array with all slides from the specified range in it.

Parameters:
startIndex - An index of a first slide to add.
count - A number of slides to add.

reorder

public void reorder(int index,
                    SlideEx slide)
Moves slide from the collection to the specified position.

Parameters:
index - Target index.
slide - Slide to move.

reorder

public void reorder(int index,
                    SlideEx[] slides)
Moves slides from the collection to the specified position. Slides will be placed starting from index in order they appear in list.

Parameters:
index - Target index.
slides - Slides to move.

indexOf

public int indexOf(SlideEx slide)
Returns an index of the specified slide in the collection.

Parameters:
slide - Slide to find.
Returns:
Index of a slide or -1 if slide not from this collection.