com.aspose.slides
Class LayoutSlideCollection

java.lang.Object
  extended by com.aspose.slides.LayoutSlideCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<ILayoutSlide>, com.aspose.ms.System.Collections.IEnumerable<ILayoutSlide>, IGenericCollection<ILayoutSlide>, ILayoutSlideCollection, java.lang.Iterable<ILayoutSlide>
Direct Known Subclasses:
GlobalLayoutSlideCollection, MasterLayoutSlideCollection

public class LayoutSlideCollection
extends java.lang.Object
implements ILayoutSlideCollection

Represents a base class for collection of a layout slides.


Method Summary
 void copyTo(ILayoutSlide[] array, int index)
           Copies all elements from the collection to the specified array.
 ILayoutSlide get_Item(int index)
           Returns the layout slide by index.
 ILayoutSlide getByType(byte type)
           Returns the first layout slide of specified type.
 com.aspose.slides.IDOMObject getParent_Immediate()
           Returns Parent_Immediate object.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.Generic.IGenericEnumerator<ILayoutSlide> iterator()
           Returns an enumerator that iterates through the collection.
 void remove(ILayoutSlide value)
           Removes a layout from the collection.
 void removeUnused()
           Removes unused layout slides (layout slides whose HasDependingSlides is false).
 int size()
           Returns the number of layout slides in a collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

size

public int size()

Returns the number of layout slides in a collection. Read-only int.

Specified by:
size in interface IGenericCollection<ILayoutSlide>

get_Item

public ILayoutSlide get_Item(int index)

Returns the layout slide by index. Read-only LayoutSlide.

Specified by:
get_Item in interface ILayoutSlideCollection

getByType

public ILayoutSlide getByType(byte type)

Returns the first layout slide of specified type.

Specified by:
getByType in interface ILayoutSlideCollection
Parameters:
type - A type of layout slide to find.
Returns:
LayoutSlide with specified type or null if no layouts found.

remove

public void remove(ILayoutSlide value)

Removes a layout from the collection.

Specified by:
remove in interface ILayoutSlideCollection
Parameters:
value - The layout slide to remove from the collection.


1) To avoid throwing of the PptxEditException check layout's HasDependingSlides property before. 2) You can use also ILayoutSlide.Remove() method to simplify code.

Throws:
PptxEditException - Thrown if layout is used in presentation (its HasDependingSlides property is true).

removeUnused

public void removeUnused()

Removes unused layout slides (layout slides whose HasDependingSlides is false).

Specified by:
removeUnused in interface ILayoutSlideCollection

iterator

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

Returns an enumerator that iterates through the collection.

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

copyTo

public void copyTo(ILayoutSlide[] array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface IGenericCollection<ILayoutSlide>
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<ILayoutSlide>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Read-only Object.

Specified by:
getSyncRoot in interface IGenericCollection<ILayoutSlide>

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.