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 voiddraw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)Convenience method to draw a single shapeXSLFShapeContainergetParent()PlaceholdergetPlaceholder()XSLFPlaceholderDetailsgetPlaceholderDetails()intgetShapeId()Returns a unique identifier for this shape within the current slide.java.lang.StringgetShapeName()XSLFSheetgetSheet()XmlObjectgetXmlObject()booleanisPlaceholder()voidsetParent(XSLFShapeContainer parent)voidsetPlaceholder(Placeholder placeholder)
-
-
-
Method Detail
-
getXmlObject
public final XmlObject getXmlObject()
- Returns:
- the xml bean holding this shape's data
-
getSheet
public XSLFSheet getSheet()
- Specified by:
getSheetin interfaceShape<XSLFShape,XSLFTextParagraph>- Returns:
- the sheet this shape belongs to
-
getShapeName
public java.lang.String getShapeName()
- Specified by:
getShapeNamein interfaceShape<XSLFShape,XSLFTextParagraph>- Returns:
- human-readable name of this shape, e.g. "Rectange 3"
-
getShapeId
public int getShapeId()
Description copied from interface:ShapeReturns 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:
getShapeIdin interfaceShape<XSLFShape,XSLFTextParagraph>- Returns:
- unique id of this shape
-
setParent
public void setParent(XSLFShapeContainer parent)
-
getParent
public XSLFShapeContainer getParent()
- Specified by:
getParentin 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:ShapeConvenience method to draw a single shape- Specified by:
drawin interfaceShape<XSLFShape,XSLFTextParagraph>- Parameters:
graphics- the graphics contextbounds- the rectangle to fit the shape to. if null, the bounds of the shape are used.
-
-