Top Methods
org.apache.poi.sl.usermodel

public Interface Shape<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

Known Direct Subinterfaces
org.apache.poi.sl.usermodel.SimpleShape, org.apache.poi.sl.usermodel.TableShape, org.apache.poi.sl.usermodel.Background, org.apache.poi.sl.usermodel.GraphicalFrame, org.apache.poi.sl.usermodel.GroupShape, org.apache.poi.sl.usermodel.ObjectShape
Imports
java.awt.Graphics2D, java.awt.geom.Rectangle2D

Method Summary

Modifier and TypeMethod and Description
public void
draw(Graphics2D
the graphics context
graphics
,
Rectangle2D
the rectangle to fit the shape to. if null, the bounds of the shape are used.
bounds
)

Convenience method to draw a single shape

public Rectangle2D

Returns:

the anchor of this shape
getAnchor
()

Returns the anchor (the bounding box rectangle) of this shape.

public ShapeContainer<S, P>
public int

Returns:

unique id of this shape
getShapeId
()

Returns a unique identifier for this shape within the current slide.

public String

Returns:

human-readable name of this shape, e.g. "Rectange 3"
getShapeName
()

public Sheet<S, P>

Returns:

the sheet this shape belongs to
getSheet
()

Method Detail

drawback to summary
public void draw(Graphics2D graphics, Rectangle2D bounds)

Convenience method to draw a single shape

Parameters
graphics:Graphics2D

the graphics context

bounds:Rectangle2D

the rectangle to fit the shape to. if null, the bounds of the shape are used.

getAnchorback to summary
public Rectangle2D getAnchor()

Returns the anchor (the bounding box rectangle) of this shape. All coordinates are expressed in points (72 dpi).

Returns:Rectangle2D

the anchor of this shape

getParentback to summary
public ShapeContainer<S, P> getParent()
getShapeIdback to summary
public int getShapeId()

Returns a unique identifier for this shape within the current slide. This ID may be used to assist in uniquely identifying this object so that it can be referred to by other parts of the document.

If multiple objects within the same slide share the same id attribute value, then the document shall be considered non-conformant.

Returns:int

unique id of this shape

getShapeNameback to summary
public String getShapeName()
Returns:String

human-readable name of this shape, e.g. "Rectange 3"

Since
POI 4.0.0
getSheetback to summary
public Sheet<S, P> getSheet()
Returns:Sheet<S, P>

the sheet this shape belongs to