Top Description Methods
org.apache.poi.ss.usermodel

public Interface Drawing<T extends Shape>

extends ShapeContainer<T extends Shape>
Known Direct Implementers
org.apache.poi.hssf.usermodel.HSSFPatriarch

High level representation of spreadsheet drawing.

Method Summary

Modifier and TypeMethod and Description
public ClientAnchor

Returns:

the newly created client anchor
createAnchor
(int
the x coordinate in EMU within the first cell.
dx1
,
int
the y coordinate in EMU within the first cell.
dy1
,
int
the x coordinate in EMU within the second cell.
dx2
,
int
the y coordinate in EMU within the second cell.
dy2
,
int
the column (0 based) of the first cell.
col1
,
int
the row (0 based) of the first cell.
row1
,
int
the column (0 based) of the second cell.
col2
,
int
the row (0 based) of the second cell.
row2
)

Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor.

public Comment

Returns:

the newly created comment.
createCellComment
(ClientAnchor
the client anchor describes how this comment is attached to the sheet.
anchor
)

Creates a comment.

public ObjectData

Returns:

newly created shape
createObjectData
(ClientAnchor
the client anchor describes how this picture is attached to the sheet.
anchor
,
int storageId, int
the index of the picture (used as preview image) in the workbook collection of pictures.
pictureIndex
)

Adds a new OLE Package Shape

public Picture

Returns:

the newly created picture.
createPicture
(ClientAnchor
the client anchor describes how this picture is attached to the sheet.
anchor
,
int
the index of the picture in the workbook collection of pictures.
pictureIndex
)

Creates a picture.

Method Detail

createAnchorback to summary
public ClientAnchor createAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2)

Creates a new client anchor and sets the top-left and bottom-right coordinates of the anchor.

Parameters
dx1:int

the x coordinate in EMU within the first cell.

dy1:int

the y coordinate in EMU within the first cell.

dx2:int

the x coordinate in EMU within the second cell.

dy2:int

the y coordinate in EMU within the second cell.

col1:int

the column (0 based) of the first cell.

row1:int

the row (0 based) of the first cell.

col2:int

the column (0 based) of the second cell.

row2:int

the row (0 based) of the second cell.

Returns:ClientAnchor

the newly created client anchor

createCellCommentback to summary
public Comment createCellComment(ClientAnchor anchor)

Creates a comment.

Parameters
anchor:ClientAnchor

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

Returns:Comment

the newly created comment.

createObjectDataback to summary
public ObjectData createObjectData(ClientAnchor anchor, int storageId, int pictureIndex)

Adds a new OLE Package Shape

Parameters
anchor:ClientAnchor

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

storageId:int

the storageId returned by Workbook#addOlePackage(byte[], String, String, String)

pictureIndex:int

the index of the picture (used as preview image) in the workbook collection of pictures.

Returns:ObjectData

newly created shape

createPictureback to summary
public Picture createPicture(ClientAnchor anchor, int pictureIndex)

Creates a picture.

Parameters
anchor:ClientAnchor

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

pictureIndex:int

the index of the picture in the workbook collection of pictures.

Returns:Picture

the newly created picture.