Package org.apache.poi.sl.usermodel
Interface Shape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
-
- All Known Subinterfaces:
AutoShape<S,P>
,Background<S,P>
,ConnectorShape<S,P>
,FreeformShape<S,P>
,GraphicalFrame<S,P>
,GroupShape<S,P>
,Line<S,P>
,ObjectShape<S,P>
,PictureShape<S,P>
,SimpleShape<S,P>
,TableCell<S,P>
,TableShape<S,P>
,TextBox<S,P>
,TextShape<S,P>
public interface Shape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
draw(Graphics2D graphics, Rectangle2D bounds)
Convenience method to draw a single shapeRectangle2D
getAnchor()
Returns the anchor (the bounding box rectangle) of this shape.ShapeContainer<S,P>
getParent()
int
getShapeId()
Returns a unique identifier for this shape within the current slide.String
getShapeName()
Sheet<S,P>
getSheet()
-
-
-
Method Detail
-
getParent
ShapeContainer<S,P> getParent()
-
getAnchor
Rectangle2D getAnchor()
Returns the anchor (the bounding box rectangle) of this shape. All coordinates are expressed in points (72 dpi).- Returns:
- the anchor of this shape
-
getShapeName
String getShapeName()
- Returns:
- human-readable name of this shape, e.g. "Rectange 3"
- Since:
- POI 4.0.0
-
draw
void draw(Graphics2D graphics, Rectangle2D bounds)
Convenience method to draw a single shape- Parameters:
graphics
- the graphics contextbounds
- the rectangle to fit the shape to. if null, the bounds of the shape are used.
-
getShapeId
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:
- unique id of this shape
-
-