Package org.apache.poi.xslf.usermodel
Class XSLFShape
- java.lang.Object
-
- org.apache.poi.xslf.usermodel.XSLFShape
-
- All Implemented Interfaces:
Shape<XSLFShape,XSLFTextParagraph>
- Direct Known Subclasses:
XSLFGraphicFrame
,XSLFGroupShape
,XSLFShadow
,XSLFSimpleShape
@Beta public abstract class XSLFShape extends java.lang.Object implements Shape<XSLFShape,XSLFTextParagraph>
Base super-class class for all shapes in PresentationML
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)
Convenience method to draw a single shapeXSLFShapeContainer
getParent()
Placeholder
getPlaceholder()
XSLFPlaceholderDetails
getPlaceholderDetails()
int
getShapeId()
Returns a unique identifier for this shape within the current slide.java.lang.String
getShapeName()
XSLFSheet
getSheet()
XmlObject
getXmlObject()
boolean
isPlaceholder()
void
setParent(XSLFShapeContainer parent)
void
setPlaceholder(Placeholder placeholder)
-
-
-
Method Detail
-
getXmlObject
public final XmlObject getXmlObject()
- Returns:
- the xml bean holding this shape's data
-
getSheet
public XSLFSheet getSheet()
- Specified by:
getSheet
in interfaceShape<XSLFShape,XSLFTextParagraph>
- Returns:
- the sheet this shape belongs to
-
getShapeName
public java.lang.String getShapeName()
- Specified by:
getShapeName
in interfaceShape<XSLFShape,XSLFTextParagraph>
- Returns:
- human-readable name of this shape, e.g. "Rectange 3"
-
getShapeId
public int getShapeId()
Description copied from interface:Shape
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.
- Specified by:
getShapeId
in interfaceShape<XSLFShape,XSLFTextParagraph>
- Returns:
- unique id of this shape
-
setParent
public void setParent(XSLFShapeContainer parent)
-
getParent
public XSLFShapeContainer getParent()
- Specified by:
getParent
in interfaceShape<XSLFShape,XSLFTextParagraph>
-
isPlaceholder
public boolean isPlaceholder()
-
getPlaceholder
public Placeholder getPlaceholder()
- See Also:
PlaceholderDetails.getPlaceholder()
-
setPlaceholder
public void setPlaceholder(Placeholder placeholder)
-
getPlaceholderDetails
public XSLFPlaceholderDetails getPlaceholderDetails()
- See Also:
SimpleShape.getPlaceholderDetails()
-
draw
public void draw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)
Description copied from interface:Shape
Convenience method to draw a single shape- Specified by:
draw
in interfaceShape<XSLFShape,XSLFTextParagraph>
- Parameters:
graphics
- the graphics contextbounds
- the rectangle to fit the shape to. if null, the bounds of the shape are used.
-
-