com.aspose.slides
Class MasterSlideCollection

java.lang.Object
  extended by com.aspose.slides.MasterSlideCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IMasterSlide>, com.aspose.ms.System.Collections.IEnumerable<IMasterSlide>, IGenericCollection<IMasterSlide>, IMasterSlideCollection, java.lang.Iterable<IMasterSlide>

public final class MasterSlideCollection
extends java.lang.Object
implements IMasterSlideCollection

Represents a collection of master slides.


Method Summary
 IMasterSlide addClone(IMasterSlide sourceMaster)
           Adds a copy of a specified master slide to the end of the collection.
 void copyTo(IMasterSlide[] 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 Parent_Immediate object.
 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
 

Method Detail

size

public int size()

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

Specified by:
size in interface IGenericCollection<IMasterSlide>

get_Item

public IMasterSlide get_Item(int index)

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

Specified by:
get_Item in interface IMasterSlideCollection

remove

public 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 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).

removeUnused

public void removeUnused(boolean ignorePreserveField)

Removes unused master slides.

Specified by:
removeUnused in interface IMasterSlideCollection
Parameters:
ignorePreserveField - Determines, whether this method should remove unused master even if its MasterSlide.Preserve property is set to true.

addClone

public 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 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 void copyTo(IMasterSlide[] array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface IGenericCollection<IMasterSlide>
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). Read-only boolean.

Specified by:
isSynchronized in interface IGenericCollection<IMasterSlide>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Read-only Object.

Specified by:
getSyncRoot in interface IGenericCollection<IMasterSlide>

iterator

public 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 T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

getParent_Immediate

public com.aspose.slides.IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.



Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.