com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class MasterSlideCollection

  • java.lang.Object
    • com.aspose.slides.MasterSlideCollection
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      IMasterSlide addClone(IMasterSlide sourceMaster)
      Adds a copy of a specified master slide to the end of the collection.
      void copyTo(com.aspose.ms.System.Array array, int index)
      Copies all elements from the collection to the specified array.
      IMasterSlide get_Item(int index)
      Gets the element at the specified index.
      com.aspose.slides.IDOMObject getParent_Immediate()
      Returns an enumerator for the entire collection.
      java.lang.Object getSyncRoot()
      Returns a synchronization root.
      IMasterSlide insertClone(int index, IMasterSlide sourceMaster)
      Inserts a copy of a specified master slide to specified position of the collection.
      boolean isSynchronized()
      Returns a value indicating whether access to the collection is synchronized (thread-safe).
      com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IMasterSlide> iterator()
      Returns an enumerator that iterates through the collection.
      void remove(IMasterSlide value)
      Removes the first occurrence of a specific object from the collection.
      void removeAt(int index)
      Removes the element at the specified index of the collection.
      void removeUnused(boolean ignorePreserveField)
      Removes unused master slides.
      int size()
      Gets the number of elements actually contained in the collection.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • size

        public final int size()

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

        Specified by:
        size in interface com.aspose.ms.System.Collections.ICollection<IMasterSlide>
      • remove

        public final void remove(IMasterSlide value)

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

        Specified by:
        remove in interface IMasterSlideCollection
        Parameters:
        value - The master slide to remove from the collection.
      • removeAt

        public final void removeAt(int index)

        Removes the element at the specified index of the collection.

        Specified by:
        removeAt in interface IMasterSlideCollection
        Parameters:
        index - The zero-based index of the element to remove.


        To avoid throwing of the PptxEditException check master's HasDependingSlides property before.

        Throws:
        PptxEditException - Thrown if the master to remove is used in presentation (its HasDependingSlides property is true).
      • addClone

        public final IMasterSlide addClone(IMasterSlide sourceMaster)

        Adds a copy of a specified master slide to the end of the collection. Linked layout slides will be copied too.

        Specified by:
        addClone in interface IMasterSlideCollection
        Parameters:
        sourceMaster - Slide to clone.
        Returns:
        Added slide.
      • insertClone

        public final IMasterSlide insertClone(int index,
                                              IMasterSlide sourceMaster)

        Inserts a copy of a specified master slide to specified position of the collection. Linked layout slides will be copied too.

        Specified by:
        insertClone in interface IMasterSlideCollection
        Parameters:
        index - Index of new slide.
        sourceMaster - Slide to clone.
        Returns:
        Inserted master slide.
      • copyTo

        public final 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<IMasterSlide>
        Parameters:
        array - Target array.
        index - Starting index in the target array.
      • isSynchronized

        public final boolean isSynchronized()

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

        Specified by:
        isSynchronized in interface com.aspose.ms.System.Collections.ICollection<IMasterSlide>
      • getSyncRoot

        public final java.lang.Object getSyncRoot()

        Returns a synchronization root. Read-only Object.

        Specified by:
        getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<IMasterSlide>
      • iterator

        public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IMasterSlide> iterator()

        Returns an enumerator that iterates through the collection.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMasterSlide>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<IMasterSlide>
        Specified by:
        iterator in interface java.lang.Iterable<IMasterSlide>
        Returns:
        A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
      • getParent_Immediate

        public final com.aspose.slides.IDOMObject getParent_Immediate()

        Returns an enumerator for the entire collection.

        Returns:
        An IEnumerator for the entire collection.