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
Base super-class class for all shapes in PresentationML
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D graphics, Rectangle2D bounds) Convenience method to draw a single shapebooleanfetchShapeProperty(PropertyFetcher<?> visitor) Walk up the inheritance tree and fetch shape properties.intReturns a unique identifier for this shape within the current slide.getSheet()final XmlObjectbooleanvoidsetParent(XSLFShapeContainer parent) voidsetPlaceholder(Placeholder placeholder)
-
Method Details
-
getXmlObject
- Returns:
- the xml bean holding this shape's data
-
getSheet
- Specified by:
getSheetin interfaceShape<XSLFShape,XSLFTextParagraph> - Returns:
- the sheet this shape belongs to
-
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
-
getParent
- Specified by:
getParentin interfaceShape<XSLFShape,XSLFTextParagraph>
-
isPlaceholder
public boolean isPlaceholder() -
getPlaceholder
- See Also:
-
setPlaceholder
- See Also:
-
getPlaceholderDetails
- See Also:
-
fetchShapeProperty
Walk up the inheritance tree and fetch shape properties.The following order of inheritance is assumed:
- slide
- slideLayout
- slideMaster
- Parameters:
visitor- the object that collects the desired property- Returns:
- true if the property was fetched
-
draw
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.
-