com.tonicsystems.pp
Interface ShapeContainer

All Known Implementing Classes:
Content, Group, HandoutMaster, Master, Notes, NotesMaster, Page, Slide, SlideMaster, Table, TitleMaster

public interface ShapeContainer

A common interface for Page and Group, which both can contain shapes and groups.


Method Summary
 java.util.List getShapes()
          Return a list of all the shapes or groups in this container.
 ShapeOrGroup paste(Clipboard clipboard)
          Paste a shape or group into this container.
 

Method Detail

getShapes

java.util.List getShapes()
Return a list of all the shapes or groups in this container. All objects in the list will be instances of ShapeOrGroup. The objects in the list are ordered according to their "z-order" depth in PowerPoint. The first object in the list is the furthest back, and the last object is the topmost.

The same instance is always returned, and its contents will be updated as shapes and groups are cut, pasted, or reordered. The list may not be modified directly.

Returns:
an immutable, ordered list of shapes and groups
Throws:
DetachedObjectException - if this container or its ancestor has been cut

paste

ShapeOrGroup paste(Clipboard clipboard)
Paste a shape or group into this container. The pasted object is placed on top of any other objects within this container, and so will become the last object in the list returned by ShapeContainer.getShapes(). The appearance of pasted shapes may differ from their original source (if any), due to factors such as different master slides and color schemes.

Parameters:
clipboard - a clipboard containing a shape or group
Returns:
a new shape or group
Throws:
java.lang.IllegalArgumentException - if the clipboard does not contain a shape or group
DetachedObjectException - if this container or its ancestor has been cut