Package org.apache.poi.xslf.usermodel
Class XSLFGroupShape
- java.lang.Object
-
- org.apache.poi.xslf.usermodel.XSLFShape
-
- org.apache.poi.xslf.usermodel.XSLFGroupShape
-
- All Implemented Interfaces:
Iterable<XSLFShape>,GroupShape<XSLFShape,XSLFTextParagraph>,PlaceableShape<XSLFShape,XSLFTextParagraph>,Shape<XSLFShape,XSLFTextParagraph>,ShapeContainer<XSLFShape,XSLFTextParagraph>,XSLFShapeContainer
@Beta public class XSLFGroupShape extends XSLFShape implements XSLFShapeContainer, GroupShape<XSLFShape,XSLFTextParagraph>
Represents a group shape that consists of many shapes grouped together.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.poi.xslf.usermodel.XSLFShape
XSLFShape.ReparseFactory<T extends XmlObject>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXSLFGroupShape(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape shape, XSLFSheet sheet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShape(XSLFShape shape)voidclear()Removes all of the elements from this container (optional operation).XSLFAutoShapecreateAutoShape()XSLFConnectorShapecreateConnector()XSLFFreeformShapecreateFreeform()XSLFGroupShapecreateGroup()XSLFObjectShapecreateOleShape(PictureData pictureData)XSLFPictureShapecreatePicture(PictureData pictureData)XSLFTablecreateTable()XSLFTablecreateTable(int numRows, int numCols)XSLFTextBoxcreateTextBox()Rectangle2DgetAnchor()booleangetFlipHorizontal()booleangetFlipVertical()protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapePropertiesgetGrpSpPr()Rectangle2DgetInteriorAnchor()doublegetRotation()List<XSLFShape>getShapes()protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2DgetXfrm()Iterator<XSLFShape>iterator()Returns an iterator over the shapes in this sheetbooleanremoveShape(XSLFShape xShape)Remove the specified shape from this groupvoidsetAnchor(Rectangle2D anchor)voidsetFlipHorizontal(boolean flip)voidsetFlipVertical(boolean flip)voidsetInteriorAnchor(Rectangle2D anchor)voidsetRotation(double theta)-
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFShape
draw, fetchShapeProperty, getBgPr, getBgRef, getChild, getCNvPr, getFillPaint, getParent, getPlaceholder, getPlaceholderDetails, getShapeId, getShapeName, getShapeProperties, getSheet, getSpStyle, getXmlObject, isPlaceholder, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectProperty, setParent, setPlaceholder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getParent, getSheet
-
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getParent, getShapeId, getShapeName, getSheet
-
-
-
-
Constructor Detail
-
XSLFGroupShape
protected XSLFGroupShape(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape shape, XSLFSheet sheet)
-
-
Method Detail
-
getGrpSpPr
protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties getGrpSpPr()
- Overrides:
getGrpSpPrin classXSLFShape
-
getXfrm
protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D getXfrm()
-
getAnchor
public Rectangle2D getAnchor()
- Specified by:
getAnchorin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>- Specified by:
getAnchorin interfaceShape<XSLFShape,XSLFTextParagraph>
-
setAnchor
public void setAnchor(Rectangle2D anchor)
- Specified by:
setAnchorin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
getInteriorAnchor
public Rectangle2D getInteriorAnchor()
- Specified by:
getInteriorAnchorin interfaceGroupShape<XSLFShape,XSLFTextParagraph>- Returns:
- the coordinates of the child extents rectangle used for calculations of grouping, scaling, and rotation behavior of shapes placed within a group.
-
setInteriorAnchor
public void setInteriorAnchor(Rectangle2D anchor)
- Specified by:
setInteriorAnchorin interfaceGroupShape<XSLFShape,XSLFTextParagraph>- Parameters:
anchor- the coordinates of the child extents rectangle used for calculations of grouping, scaling, and rotation behavior of shapes placed within a group.
-
getShapes
public List<XSLFShape> getShapes()
- Specified by:
getShapesin interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Returns:
- child shapes contained within this group
-
removeShape
public boolean removeShape(XSLFShape xShape)
Remove the specified shape from this group- Specified by:
removeShapein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>
-
createAutoShape
public XSLFAutoShape createAutoShape()
- Specified by:
createAutoShapein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createAutoShapein interfaceXSLFShapeContainer
-
createFreeform
public XSLFFreeformShape createFreeform()
- Specified by:
createFreeformin interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createFreeformin interfaceXSLFShapeContainer
-
createTextBox
public XSLFTextBox createTextBox()
- Specified by:
createTextBoxin interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createTextBoxin interfaceXSLFShapeContainer
-
createConnector
public XSLFConnectorShape createConnector()
- Specified by:
createConnectorin interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createConnectorin interfaceXSLFShapeContainer
-
createGroup
public XSLFGroupShape createGroup()
- Specified by:
createGroupin interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createGroupin interfaceXSLFShapeContainer
-
createPicture
public XSLFPictureShape createPicture(PictureData pictureData)
- Specified by:
createPicturein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>- Specified by:
createPicturein interfaceXSLFShapeContainer
-
createOleShape
public XSLFObjectShape createOleShape(PictureData pictureData)
- Specified by:
createOleShapein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>
-
createTable
public XSLFTable createTable()
-
createTable
public XSLFTable createTable(int numRows, int numCols)
- Specified by:
createTablein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>
-
setFlipHorizontal
public void setFlipHorizontal(boolean flip)
- Specified by:
setFlipHorizontalin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
setFlipVertical
public void setFlipVertical(boolean flip)
- Specified by:
setFlipVerticalin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
getFlipHorizontal
public boolean getFlipHorizontal()
- Specified by:
getFlipHorizontalin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
getFlipVertical
public boolean getFlipVertical()
- Specified by:
getFlipVerticalin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
setRotation
public void setRotation(double theta)
- Specified by:
setRotationin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
getRotation
public double getRotation()
- Specified by:
getRotationin interfacePlaceableShape<XSLFShape,XSLFTextParagraph>
-
clear
public void clear()
Removes all of the elements from this container (optional operation). The container will be empty after this call returns.- Specified by:
clearin interfaceXSLFShapeContainer
-
addShape
public void addShape(XSLFShape shape)
- Specified by:
addShapein interfaceShapeContainer<XSLFShape,XSLFTextParagraph>
-
-