Class XSLFBackground

All Implemented Interfaces:
IAdjustableShape, Background<XSLFShape,XSLFTextParagraph>, PlaceableShape<XSLFShape,XSLFTextParagraph>, Shape<XSLFShape,XSLFTextParagraph>, SimpleShape<XSLFShape,XSLFTextParagraph>

public class XSLFBackground extends XSLFSimpleShape implements Background<XSLFShape,XSLFTextParagraph>
Background shape
  • Method Details

    • getAnchor

      public Rectangle2D getAnchor()
      Description copied from interface: Shape
      Returns the anchor (the bounding box rectangle) of this shape. All coordinates are expressed in points (72 dpi).
      Specified by:
      getAnchor in interface PlaceableShape<XSLFShape,XSLFTextParagraph>
      Specified by:
      getAnchor in interface Shape<XSLFShape,XSLFTextParagraph>
      Overrides:
      getAnchor in class XSLFSimpleShape
      Returns:
      the anchor of this shape
    • getXfrm

      protected org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D getXfrm(boolean create)
      background does not have a associated transform, therefore we return null
      Overrides:
      getXfrm in class XSLFSimpleShape
      Parameters:
      create - ignored
      Returns:
      null
    • setPlaceholder

      public void setPlaceholder(Placeholder placeholder)
      Description copied from interface: SimpleShape
      Specifies that the corresponding shape should be represented by the generating application as a placeholder. When a shape is considered a placeholder by the generating application it can have special properties to alert the user that they may enter content into the shape.
      Specified by:
      setPlaceholder in interface SimpleShape<XSLFShape,XSLFTextParagraph>
      Overrides:
      setPlaceholder in class XSLFShape
      Parameters:
      placeholder - the placeholder or null to remove the reference to the placeholder
      See Also:
    • getBgPr

      protected org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperties getBgPr(boolean create)
    • setFillColor

      public void setFillColor(Color color)
      Description copied from interface: SimpleShape
      Specifies a solid color fill. The shape is filled entirely with the specified color.
      Specified by:
      setFillColor in interface SimpleShape<XSLFShape,XSLFTextParagraph>
      Overrides:
      setFillColor in class XSLFSimpleShape
      Parameters:
      color - the solid color fill. The value of null unsets the solid fill attribute from the underlying implementation
    • getShapeProperties

      protected org.apache.xmlbeans.XmlObject getShapeProperties()
      Description copied from class: XSLFShape
      Return the shape specific (visual) properties
      Overrides:
      getShapeProperties in class XSLFShape
      Returns:
      the shape specific properties