Top Methods
org.apache.poi.sl.usermodel

public Interface ShapeContainer<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

extends Iterable<S extends Shape<S, P>>
Known Direct Subinterfaces
org.apache.poi.sl.usermodel.Sheet, org.apache.poi.sl.usermodel.GroupShape
Imports
java.util.List

Method Summary

Modifier and TypeMethod and Description
public void
addShape(S shape)

public AutoShape<S, P>
createAutoShape()

create a new shape with a predefined geometry and add it to this shape container

public ConnectorShape<S, P>
createConnector()

create a connector

public FreeformShape<S, P>
createFreeform()

create a new shape with a custom geometry

public GroupShape<S, P>
createGroup()

create a group of shapes belonging to this container

public ObjectShape<?, ?>
createOleShape(PictureData
the preview image
pictureData
)

Create a new OLE object shape with the given pictureData as preview image

public PictureShape<S, P>
createPicture(PictureData pictureData)

create a picture belonging to this container

public TableShape<S, P>
createTable(int
the number of rows
numRows
,
int
the number of columns
numCols
)

Create a new Table of the given number of rows and columns

public TextBox<S, P>
createTextBox()

create a text box

public List<S>

Returns:

an list containing all of the elements in this container in proper sequence
getShapes
()

Returns an list containing all of the elements in this container in proper sequence (from first to last element).

public boolean

Returns:

true if this sheet contained the specified element
removeShape
(S
the shape to be removed from this sheet, if present
shape
)

Removes the specified shape from this sheet, if it is present (optional operation).

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

addShapeback to summary
public void addShape(S shape)
createAutoShapeback to summary
public AutoShape<S, P> createAutoShape()

create a new shape with a predefined geometry and add it to this shape container

createConnectorback to summary
public ConnectorShape<S, P> createConnector()

create a connector

createFreeformback to summary
public FreeformShape<S, P> createFreeform()

create a new shape with a custom geometry

createGroupback to summary
public GroupShape<S, P> createGroup()

create a group of shapes belonging to this container

createOleShapeback to summary
public ObjectShape<?, ?> createOleShape(PictureData pictureData)

Create a new OLE object shape with the given pictureData as preview image

Parameters
pictureData:PictureData

the preview image

createPictureback to summary
public PictureShape<S, P> createPicture(PictureData pictureData)

create a picture belonging to this container

createTableback to summary
public TableShape<S, P> createTable(int numRows, int numCols)

Create a new Table of the given number of rows and columns

Parameters
numRows:int

the number of rows

numCols:int

the number of columns

createTextBoxback to summary
public TextBox<S, P> createTextBox()

create a text box

getShapesback to summary
public List<S> getShapes()

Returns an list containing all of the elements in this container in proper sequence (from first to last element).

Returns:List<S>

an list containing all of the elements in this container in proper sequence

removeShapeback to summary
public boolean removeShape(S shape)

Removes the specified shape from this sheet, if it is present (optional operation). If this sheet does not contain the element, it is unchanged.

Parameters
shape:S

the shape to be removed from this sheet, if present

Returns:boolean

true if this sheet contained the specified element

Exceptions
IllegalArgumentException:
if the type of the specified shape is incompatible with this sheet (optional)