Top Description Fields Constructors Methods
org.apache.poi.hssf.usermodel

public Class HSSFShapeGroup

extends HSSFShape
implements HSSFShapeContainer
Class Inheritance
All Implemented Interfaces
org.apache.poi.hssf.usermodel.HSSFShapeContainer, org.apache.poi.ss.usermodel.ShapeContainer, java.lang.Iterable
Imports
java.util.ArrayList, .Collections, .Iterator, .List, .Spliterator, org.apache.poi.ddf.DefaultEscherRecordFactory, .EscherBoolProperty, .EscherChildAnchorRecord, .EscherClientAnchorRecord, .EscherClientDataRecord, .EscherContainerRecord, .EscherOptRecord, .EscherPropertyTypes, .EscherRecord, .EscherRecordTypes, .EscherSpRecord, .EscherSpgrRecord, org.apache.poi.hssf.record.CommonObjectDataSubRecord, .EndSubRecord, .EscherAggregate, .GroupMarkerSubRecord, .ObjRecord

A shape group may contain other shapes. It was no actual form on the sheet.

Field Summary

Modifier and TypeField and Description
private final EscherSpgrRecord
private final List<HSSFShape>
Inherited from org.apache.poi.hssf.usermodel.HSSFShape:
anchorFILL__FILLCOLOR_DEFAULTLINESTYLE__COLOR_DEFAULTLINESTYLE_DASHDOTDOTSYSLINESTYLE_DASHDOTGELLINESTYLE_DASHDOTSYSLINESTYLE_DASHGELLINESTYLE_DASHSYSLINESTYLE_DEFAULTLINESTYLE_DOTGELLINESTYLE_DOTSYSLINESTYLE_LONGDASHDOTDOTGELLINESTYLE_LONGDASHDOTGELLINESTYLE_LONGDASHGELLINESTYLE_NONELINESTYLE_SOLIDLINEWIDTH_DEFAULTLINEWIDTH_ONE_PTNO_FILL_DEFAULTNO_FILLHITTEST_FALSENO_FILLHITTEST_TRUE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addShape(HSSFShape shape)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.addShape.

add shape to the list of child records

pack-priv void
protected void
afterRemove(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

public void
protected HSSFShape
protected HSSFShape
public int
countOfAllChildren()

Overrides org.apache.poi.hssf.usermodel.HSSFShape.countOfAllChildren.

Count of all children and their childrens children.

public HSSFShapeGroup

Returns:

the group
createGroup
(HSSFChildAnchor
the position of the new group.
anchor
)

Create another group under this group.

protected ObjRecord
public HSSFPicture

Returns:

the newly created shape.
createPicture
(HSSFChildAnchor
the client anchor describes how this group is attached to the sheet.
anchor
,
int pictureIndex)

Creates a picture.

public HSSFPolygon

Returns:

the newly created shape.
createPolygon
(HSSFChildAnchor
the client anchor describes how this group is attached to the sheet.
anchor
)

Creates a polygon

public HSSFSimpleShape

Returns:

the shape
createShape
(HSSFChildAnchor
the position of the shape.
anchor
)

Create a new simple shape under this group.

protected EscherContainerRecord
public HSSFTextbox

Returns:

the textbox
createTextbox
(HSSFChildAnchor
the position of the shape.
anchor
)

Create a new textbox under this group.

public List<HSSFShape>
getChildren()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getChildren.

Return all children contained by this shape.

pack-priv int
public int
getX1()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX1.

The top left x coordinate of this group.

public int
getX2()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX2.

The bottom right x coordinate of this group.

public int
getY1()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY1.

The top left y coordinate of this group.

public int
getY2()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY2.

The bottom right y coordinate of this group.

public Iterator<HSSFShape>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

private void
public boolean
removeShape(HSSFShape
to be removed
shape
)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.removeShape.

remove first level shapes

public void
setCoordinates(int x1, int y1, int x2, int y2)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.setCoordinates.

Sets the coordinate space of this group.

pack-priv void
setShapeId(int
- global shapeId which must be set to EscherSpRecord
shapeId
)

Overrides org.apache.poi.hssf.usermodel.HSSFShape.setShapeId.

public Spliterator<HSSFShape>
spliterator()

Overrides default java.lang.Iterable.spliterator.

Creates a Spliterator over the elements described by this Iterable.

Inherited from org.apache.poi.hssf.usermodel.HSSFShape:
getAnchorgetEscherContainergetFillColorgetLineStylegetLineStyleColorgetLineWidthgetObjRecordgetOptRecordgetParentgetPatriarchgetRotationDegreegetShapeNameisFlipHorizontalisFlipVerticalisNoFillsetAnchorsetFillColorsetFillColorsetFlipHorizontalsetFlipVerticalsetLineStylesetLineStyleColorsetLineStyleColorsetLineWidthsetNoFillsetParentsetPatriarchsetPropertyValuesetRotationDegree

Field Detail

_spgrRecordback to summary
private final EscherSpgrRecord _spgrRecord
shapesback to summary
private final List<HSSFShape> shapes

Constructor Detail

HSSFShapeGroupback to summary
public HSSFShapeGroup(EscherContainerRecord spgrContainer, ObjRecord objRecord)
HSSFShapeGroupback to summary
public HSSFShapeGroup(HSSFShape parent, HSSFAnchor anchor)

Method Detail

addShapeback to summary
public void addShape(HSSFShape shape)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.addShape.

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.addShape.

add shape to the list of child records

Annotations
@Override
afterInsertback to summary
pack-priv void afterInsert(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterInsert.

Annotations
@Override
afterRemoveback to summary
protected void afterRemove(HSSFPatriarch patriarch)

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

Doc from org.apache.poi.hssf.usermodel.HSSFShape.afterRemove.

remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes

Annotations
@Override
clearback to summary
public void clear()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.clear.

Annotations
@Override
cloneShapeback to summary
protected HSSFShape cloneShape()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.cloneShape.

Annotations
@Override
cloneShapeback to summary
protected HSSFShape cloneShape(HSSFPatriarch patriarch)
countOfAllChildrenback to summary
public int countOfAllChildren()

Overrides org.apache.poi.hssf.usermodel.HSSFShape.countOfAllChildren.

Count of all children and their childrens children.

Annotations
@Override
createGroupback to summary
public HSSFShapeGroup createGroup(HSSFChildAnchor anchor)

Create another group under this group.

Parameters
anchor:HSSFChildAnchor

the position of the new group.

Returns:HSSFShapeGroup

the group

createObjRecordback to summary
protected ObjRecord createObjRecord()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.createObjRecord.

Annotations
@Override
createPictureback to summary
public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex)

Creates a picture.

Parameters
anchor:HSSFChildAnchor

the client anchor describes how this group is attached to the sheet.

Returns:HSSFPicture

the newly created shape.

createPolygonback to summary
public HSSFPolygon createPolygon(HSSFChildAnchor anchor)

Creates a polygon

Parameters
anchor:HSSFChildAnchor

the client anchor describes how this group is attached to the sheet.

Returns:HSSFPolygon

the newly created shape.

createShapeback to summary
public HSSFSimpleShape createShape(HSSFChildAnchor anchor)

Create a new simple shape under this group.

Parameters
anchor:HSSFChildAnchor

the position of the shape.

Returns:HSSFSimpleShape

the shape

createSpContainerback to summary
protected EscherContainerRecord createSpContainer()

Implements abstract org.apache.poi.hssf.usermodel.HSSFShape.createSpContainer.

Annotations
@Override
createTextboxback to summary
public HSSFTextbox createTextbox(HSSFChildAnchor anchor)

Create a new textbox under this group.

Parameters
anchor:HSSFChildAnchor

the position of the shape.

Returns:HSSFTextbox

the textbox

getChildrenback to summary
public List<HSSFShape> getChildren()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getChildren.

Return all children contained by this shape.

Returns:List<HSSFShape>

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.getChildren.

Any children contained by this shape.

Annotations
@Override
getShapeIdback to summary
pack-priv int getShapeId()

Overrides org.apache.poi.hssf.usermodel.HSSFShape.getShapeId.

Returns:int

Doc from org.apache.poi.hssf.usermodel.HSSFShape.getShapeId.

global shapeId(from EscherSpRecord)

Annotations
@Override
getX1back to summary
public int getX1()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX1.

The top left x coordinate of this group.

Returns:int

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX1.

The top left x coordinate of this group.

Annotations
@Override
getX2back to summary
public int getX2()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX2.

The bottom right x coordinate of this group.

Returns:int

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.getX2.

The bottom right x coordinate of this group.

Annotations
@Override
getY1back to summary
public int getY1()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY1.

The top left y coordinate of this group.

Returns:int

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY1.

The top left y coordinate of this group.

Annotations
@Override
getY2back to summary
public int getY2()

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY2.

The bottom right y coordinate of this group.

Returns:int

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.getY2.

The bottom right y coordinate of this group.

Annotations
@Override
iteratorback to summary
public Iterator<HSSFShape> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<HSSFShape>

an Iterator.

Annotations
@Override
onCreateback to summary
private void onCreate(HSSFShape shape)
removeShapeback to summary
public boolean removeShape(HSSFShape shape)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.removeShape.

Doc from org.apache.poi.hssf.usermodel.HSSFShapeContainer.removeShape.

remove first level shapes

Parameters
shape:HSSFShape

to be removed

Returns:boolean

true if shape is removed else return false

Annotations
@Override
setCoordinatesback to summary
public void setCoordinates(int x1, int y1, int x2, int y2)

Implements org.apache.poi.hssf.usermodel.HSSFShapeContainer.setCoordinates.

Sets the coordinate space of this group. All children are constrained to these coordinates.

Annotations
@Override
setShapeIdback to summary
pack-priv void setShapeId(int shapeId)

Overrides org.apache.poi.hssf.usermodel.HSSFShape.setShapeId.

Parameters
shapeId:int

Doc from org.apache.poi.hssf.usermodel.HSSFShape.setShapeId.

- global shapeId which must be set to EscherSpRecord

Annotations
@Override
spliteratorback to summary
public Spliterator<HSSFShape> spliterator()

Overrides default java.lang.Iterable.spliterator.

Doc from java.lang.Iterable.spliterator.

Creates a Spliterator over the elements described by this Iterable.

Returns:Spliterator<HSSFShape>

a Spliterator over the elements described by this Iterable.

Annotations
@Override
Since
POI 5.2.0