Package org.apache.poi.sl.usermodel
Interface ShapeContainer<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
- All Superinterfaces:
Iterable<S>
- All Known Subinterfaces:
GroupShape<S,
,P> HSLFShapeContainer
,MasterSheet<S,
,P> Notes<S,
,P> Sheet<S,
,P> Slide<S,
,P> XSLFShapeContainer
- All Known Implementing Classes:
HSLFGroupShape
,HSLFMasterSheet
,HSLFNotes
,HSLFSheet
,HSLFSlide
,HSLFSlideMaster
,HSLFTable
,HSLFTitleMaster
,XSLFGroupShape
,XSLFNotes
,XSLFNotesMaster
,XSLFSheet
,XSLFSlide
,XSLFSlideLayout
,XSLFSlideMaster
public interface ShapeContainer<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
extends Iterable<S>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create a new shape with a predefined geometry and add it to this shape containercreate a connectorcreate a new shape with a custom geometryGroupShape
<S, P> create a group of shapes belonging to this containerObjectShape
<?, ?> createOleShape
(PictureData pictureData) Create a new OLE object shape with the given pictureData as preview imagecreatePicture
(PictureData pictureData) create a picture belonging to this containerTableShape
<S, P> createTable
(int numRows, int numCols) Create a new Table of the given number of rows and columnscreate a text boxReturns an list containing all of the elements in this container in proper sequence (from first to last element).boolean
removeShape
(S shape) Removes the specified shape from this sheet, if it is present (optional operation).Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getShapes
Returns an list containing all of the elements in this container in proper sequence (from first to last element).- Returns:
- an list containing all of the elements in this container in proper sequence
-
addShape
-
removeShape
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
- the shape to be removed from this sheet, if present- Returns:
true
if this sheet contained the specified element- Throws:
IllegalArgumentException
- if the type of the specified shape is incompatible with this sheet (optional)
-
createAutoShape
create a new shape with a predefined geometry and add it to this shape container -
createFreeform
FreeformShape<S,P> createFreeform()create a new shape with a custom geometry -
createTextBox
create a text box -
createConnector
ConnectorShape<S,P> createConnector()create a connector -
createGroup
GroupShape<S,P> createGroup()create a group of shapes belonging to this container -
createPicture
create a picture belonging to this container -
createTable
Create a new Table of the given number of rows and columns- Parameters:
numRows
- the number of rowsnumCols
- the number of columns
-
createOleShape
Create a new OLE object shape with the given pictureData as preview image- Parameters:
pictureData
- the preview image
-