Package org.apache.poi.xssf.usermodel
Class XSSFShapeGroup
java.lang.Object
org.apache.poi.xssf.usermodel.XSSFShape
org.apache.poi.xssf.usermodel.XSSFShapeGroup
- All Implemented Interfaces:
Iterable<XSSFShape>
,Shape
,ShapeContainer<XSSFShape>
This object specifies a group shape that represents many shapes grouped together. This shape is to be treated
just as if it were a regular shape but instead of being described by a single geometry it is made up of all the
shape geometries encompassed within it. Within a group shape each of the shapes that make up the group are
specified just as they normally would.
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
XSSFShapeGroup
(XSSFDrawing drawing, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape ctGroup) Construct a new XSSFSimpleShape object. -
Method Summary
Modifier and TypeMethodDescriptioncreateConnector
(XSSFChildAnchor anchor) Creates a simple shape.createGroup
(XSSFChildAnchor anchor) Creates a group shape.createPicture
(XSSFClientAnchor anchor, int pictureIndex) Creates a picture.createSimpleShape
(XSSFChildAnchor anchor) Creates a simple shape.createTextbox
(XSSFChildAnchor anchor) Constructs a textbox.org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties
Returns xml bean with shape properties.iterator()
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape
Initialize default structure of a new shape groupvoid
setCoordinates
(int x1, int y1, int x2, int y2) Sets the coordinate space of this group.Methods inherited from class org.apache.poi.xssf.usermodel.XSSFShape
getAnchor, getDrawing, getParent, isNoFill, setFillColor, setLineStyle, setLineStyleColor, setLineWidth, setNoFill
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
-
Constructor Details
-
XSSFShapeGroup
protected XSSFShapeGroup(XSSFDrawing drawing, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape ctGroup) Construct a new XSSFSimpleShape object.- Parameters:
drawing
- the XSSFDrawing that owns this shapectGroup
- the XML bean that stores this group content
-
-
Method Details
-
prototype
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape prototype()Initialize default structure of a new shape group -
createTextbox
Constructs a textbox.- Parameters:
anchor
- the child anchor describes how this shape is attached to the group.- Returns:
- the newly created textbox.
-
createSimpleShape
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.- Parameters:
anchor
- the child anchor describes how this shape is attached to the group.- Returns:
- the newly created shape.
-
createConnector
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.- Parameters:
anchor
- the child anchor describes how this shape is attached to the group.- Returns:
- the newly created shape.
-
createPicture
Creates a picture.- Parameters:
anchor
- the client anchor describes how this picture is attached to the sheet.pictureIndex
- the index of the picture in the workbook collection of pictures,XSSFWorkbook.getAllPictures()
.- Returns:
- the newly created picture shape.
-
createGroup
Creates a group shape.- Parameters:
anchor
- the client anchor describes how this group is attached to the group.- Returns:
- the newly created group shape.
-
getCTGroupShape
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape getCTGroupShape() -
setCoordinates
public void setCoordinates(int x1, int y1, int x2, int y2) Sets the coordinate space of this group. All children are constrained to these coordinates. -
getShapeProperties
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getShapeProperties()Description copied from class:XSSFShape
Returns xml bean with shape properties.- Specified by:
getShapeProperties
in classXSSFShape
- Returns:
- xml bean with shape properties.
-
iterator
-
getShapeName
- Specified by:
getShapeName
in interfaceShape
- Returns:
- the name of this shape
-