public class HSLFGroupShape extends HSLFShape implements HSLFShapeContainer, GroupShape<HSLFShape,HSLFTextParagraph>
Modifier | Constructor and Description |
---|---|
|
HSLFGroupShape()
Create a new ShapeGroup.
|
protected |
HSLFGroupShape(EscherContainerRecord escherRecord,
ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a ShapeGroup object and initialize it from the supplied Record container.
|
|
HSLFGroupShape(ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
Create a new ShapeGroup.
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(HSLFShape shape)
Add a shape to this group.
|
HSLFAutoShape |
createAutoShape()
create a new shape with a predefined geometry and add it to this shape container
|
HSLFConnectorShape |
createConnector()
create a connector
|
HSLFFreeformShape |
createFreeform()
create a new shape with a custom geometry
|
HSLFGroupShape |
createGroup()
create a group of shapes belonging to this container
|
HSLFObjectShape |
createOleShape(PictureData pictureData)
Create a new OLE object shape with the given pictureData as preview image
|
HSLFPictureShape |
createPicture(PictureData pictureData)
create a picture belonging to this container
|
protected EscherContainerRecord |
createSpContainer(boolean isChild)
Create a new ShapeGroup and create an instance of
EscherSpgrContainer which represents a group of shapes |
HSLFTable |
createTable(int numRows,
int numCols)
Create a new Table of the given number of rows and columns
|
HSLFTextBox |
createTextBox()
create a text box
|
java.awt.geom.Rectangle2D |
getAnchor()
Returns the anchor (the bounding box rectangle) of this shape group.
|
<T extends EscherRecord> |
getEscherChild(int recordId) |
HSLFHyperlink |
getHyperlink()
Returns
null - shape groups can't have hyperlinks |
java.awt.geom.Rectangle2D |
getInteriorAnchor()
Gets the coordinate space of this group.
|
java.util.List<HSLFShape> |
getShapes()
Returns an list containing all of the elements in this container in proper
sequence (from first to last element).
|
ShapeType |
getShapeType()
Return type of the shape.
|
java.util.Iterator<HSLFShape> |
iterator() |
protected void |
moveAndScale(java.awt.geom.Rectangle2D anchorDest)
Moves and scales this
ShapeGroup to the specified anchor. |
boolean |
removeShape(HSLFShape shape)
Removes the specified shape from this sheet, if it is present
(optional operation).
|
void |
setAnchor(java.awt.geom.Rectangle2D anchor)
Sets the anchor (the bounding box rectangle) of this shape.
|
protected void |
setExteriorAnchor(java.awt.geom.Rectangle2D anchor) |
void |
setInteriorAnchor(java.awt.geom.Rectangle2D anchor)
Sets the coordinate space of this group.
|
afterInsert, draw, getClientData, getClientDataRecord, getClientRecords, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, isPlaceholder, moveTo, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType, setSheet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw, getParent, getShapeId, getShapeName, getSheet
getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setFlipHorizontal, setFlipVertical, setRotation
public HSLFGroupShape()
public HSLFGroupShape(ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
parent
- the parent of the shapeprotected HSLFGroupShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)
escherRecord
- EscherSpContainer
container which holds information about this shapeparent
- the parent of the shapepublic void setAnchor(java.awt.geom.Rectangle2D anchor)
HSLFShape
setAnchor
in interface PlaceableShape<HSLFShape,HSLFTextParagraph>
setAnchor
in class HSLFShape
anchor
- new anchorpublic void setInteriorAnchor(java.awt.geom.Rectangle2D anchor)
GroupShape
setInteriorAnchor
in interface GroupShape<HSLFShape,HSLFTextParagraph>
anchor
- the coordinate space of this grouppublic java.awt.geom.Rectangle2D getInteriorAnchor()
GroupShape
getInteriorAnchor
in interface GroupShape<HSLFShape,HSLFTextParagraph>
protected void setExteriorAnchor(java.awt.geom.Rectangle2D anchor)
protected EscherContainerRecord createSpContainer(boolean isChild)
EscherSpgrContainer
which represents a group of shapescreateSpContainer
in class HSLFShape
public void addShape(HSLFShape shape)
addShape
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
shape
- - the Shape to addprotected void moveAndScale(java.awt.geom.Rectangle2D anchorDest)
ShapeGroup
to the specified anchor.public java.awt.geom.Rectangle2D getAnchor()
getAnchor
in interface PlaceableShape<HSLFShape,HSLFTextParagraph>
getAnchor
in interface Shape<HSLFShape,HSLFTextParagraph>
getAnchor
in class HSLFShape
public ShapeType getShapeType()
ShapeType.NOT_PRIMITIVE
getShapeType
in class HSLFShape
public HSLFHyperlink getHyperlink()
null
- shape groups can't have hyperlinksnull
.public <T extends EscherRecord> T getEscherChild(int recordId)
getEscherChild
in class HSLFShape
public java.util.Iterator<HSLFShape> iterator()
iterator
in interface java.lang.Iterable<HSLFShape>
public boolean removeShape(HSLFShape shape)
ShapeContainer
removeShape
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
shape
- the shape to be removed from this sheet, if presentpublic java.util.List<HSLFShape> getShapes()
ShapeContainer
getShapes
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFTextBox createTextBox()
ShapeContainer
createTextBox
in interface HSLFShapeContainer
createTextBox
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFAutoShape createAutoShape()
ShapeContainer
createAutoShape
in interface HSLFShapeContainer
createAutoShape
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFFreeformShape createFreeform()
ShapeContainer
createFreeform
in interface HSLFShapeContainer
createFreeform
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFConnectorShape createConnector()
ShapeContainer
createConnector
in interface HSLFShapeContainer
createConnector
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFGroupShape createGroup()
ShapeContainer
createGroup
in interface HSLFShapeContainer
createGroup
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFPictureShape createPicture(PictureData pictureData)
ShapeContainer
createPicture
in interface HSLFShapeContainer
createPicture
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
public HSLFTable createTable(int numRows, int numCols)
ShapeContainer
createTable
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
numRows
- the number of rowsnumCols
- the number of columnspublic HSLFObjectShape createOleShape(PictureData pictureData)
ShapeContainer
createOleShape
in interface HSLFShapeContainer
createOleShape
in interface ShapeContainer<HSLFShape,HSLFTextParagraph>
pictureData
- the preview imageCopyright 2020 The Apache Software Foundation or its licensors, as applicable.