Package loci.poi.hssf.usermodel
Class HSSFPatriarch
- java.lang.Object
-
- loci.poi.hssf.usermodel.HSSFPatriarch
-
- All Implemented Interfaces:
HSSFShapeContainer
public class HSSFPatriarch extends java.lang.Object implements HSSFShapeContainer
The patriarch is the toplevel container for shapes in a sheet. It does little other than act as a container for other shapes and groups.- Author:
- Glen Stampoultzis (glens at apache.org)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountOfAllChildren()Total count of all children and their children's children.HSSFCommentcreateComment(HSSFAnchor anchor)Constructs a cell comment.HSSFShapeGroupcreateGroup(HSSFClientAnchor anchor)Creates a new group record stored under this patriarch.HSSFPicturecreatePicture(HSSFClientAnchor anchor, int pictureIndex)Creates a picture.HSSFPolygoncreatePolygon(HSSFClientAnchor anchor)Creates a polygonHSSFSimpleShapecreateSimpleShape(HSSFClientAnchor anchor)Creates a simple shape.HSSFTextboxcreateTextbox(HSSFClientAnchor anchor)Constructs a textbox under the patriarch.java.util.ListgetChildren()Returns a list of all shapes contained by the patriarch.intgetX1()The top left x coordinate of this group.intgetX2()The bottom right x coordinate of this group.intgetY1()The top left y coordinate of this group.intgetY2()The bottom right y coordinate of this group.voidsetCoordinates(int x1, int y1, int x2, int y2)Sets the coordinate space of this group.
-
-
-
Method Detail
-
createGroup
public HSSFShapeGroup createGroup(HSSFClientAnchor anchor)
Creates a new group record stored under this patriarch.- Parameters:
anchor- the client anchor describes how this group is attached to the sheet.- Returns:
- the newly created group.
-
createSimpleShape
public HSSFSimpleShape createSimpleShape(HSSFClientAnchor anchor)
Creates a simple shape. This includes such shapes as lines, rectangles, and ovals.- Parameters:
anchor- the client anchor describes how this group is attached to the sheet.- Returns:
- the newly created shape.
-
createPicture
public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex)
Creates a picture.- Parameters:
anchor- the client anchor describes how this group is attached to the sheet.- Returns:
- the newly created shape.
-
createPolygon
public HSSFPolygon createPolygon(HSSFClientAnchor anchor)
Creates a polygon- Parameters:
anchor- the client anchor describes how this group is attached to the sheet.- Returns:
- the newly created shape.
-
createTextbox
public HSSFTextbox createTextbox(HSSFClientAnchor anchor)
Constructs a textbox under the patriarch.- Parameters:
anchor- the client anchor describes how this group is attached to the sheet.- Returns:
- the newly created textbox.
-
createComment
public HSSFComment createComment(HSSFAnchor anchor)
Constructs a cell comment.- Parameters:
anchor- the client anchor describes how this comment is attached to the sheet.- Returns:
- the newly created comment.
-
getChildren
public java.util.List getChildren()
Returns a list of all shapes contained by the patriarch.- Specified by:
getChildrenin interfaceHSSFShapeContainer- Returns:
- Any children contained by this shape.
-
countOfAllChildren
public int countOfAllChildren()
Total count of all children and their children's children.
-
setCoordinates
public void setCoordinates(int x1, int y1, int x2, int y2)Sets the coordinate space of this group. All children are contrained to these coordinates.
-
getX1
public int getX1()
The top left x coordinate of this group.
-
getY1
public int getY1()
The top left y coordinate of this group.
-
getX2
public int getX2()
The bottom right x coordinate of this group.
-
getY2
public int getY2()
The bottom right y coordinate of this group.
-
-