Class XSSFShapeGroup

  • All Implemented Interfaces:
    java.lang.Iterable<XSSFShape>, Shape, ShapeContainer<XSSFShape>

    public final class XSSFShapeGroup
    extends XSSFShape
    implements 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.
    • Method Detail

      • createTextbox

        public XSSFTextBox createTextbox​(XSSFChildAnchor anchor)
        Constructs a textbox.
        Parameters:
        anchor - the child anchor describes how this shape is attached to the group.
        Returns:
        the newly created textbox.
      • createSimpleShape

        public XSSFSimpleShape createSimpleShape​(XSSFChildAnchor anchor)
        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

        public XSSFConnector createConnector​(XSSFChildAnchor anchor)
        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

        public XSSFPicture createPicture​(XSSFClientAnchor anchor,
                                         int pictureIndex)
        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

        public XSSFShapeGroup createGroup​(XSSFChildAnchor anchor)
        Creates a group shape.
        Parameters:
        anchor - the client anchor describes how this group is attached to the group.
        Returns:
        the newly created group shape.
      • 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.
      • iterator

        public java.util.Iterator<XSSFShape> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<XSSFShape>
      • getShapeName

        public java.lang.String getShapeName()
        Specified by:
        getShapeName in interface Shape
        Returns:
        the name of this shape