## org.apache.poi.xslf.usermodel
Class XSLFSimpleShape

    java.lang.Object
      org.apache.poi.xslf.usermodel.XSLFShape
          org.apache.poi.xslf.usermodel.XSLFSimpleShape

Direct Known Subclasses:
  XSLFBackground, XSLFConnectorShape, XSLFPictureShape, XSLFShadow, XSLFTextShape

    @Beta
    public abstract class XSLFSimpleShape

extends XSLFShape

Represents a single (non-group) shape in a .pptx slide show

Author:
  Yegor Kozlov

Method Summary
`void` `draw(java.awt.Graphics2D graphics)` Draw this shape into the supplied canvas
`void` `drawContent(java.awt.Graphics2D graphics)` draw any content within this shape (image, text, etc.).
`java.awt.geom.Rectangle2D` `getAnchor()`
`protected org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder` `getCTPlaceholder()`
`java.awt.Color` `getFillColor()`
`boolean` `getFlipHorizontal()` Whether the shape is horizontally flipped
`boolean` `getFlipVertical()` Whether the shape is vertically flipped
`LineCap` `getLineCap()`
`java.awt.Color` `getLineColor()`
`LineDash` `getLineDash()`
`LineDecoration` `getLineHeadDecoration()`
`LineEndLength` `getLineHeadLength()`
`LineEndWidth` `getLineHeadWidth()`
`LineDecoration` `getLineTailDecoration()`
`LineEndLength` `getLineTailLength()`
`LineEndWidth` `getLineTailWidth()`
`double` `getLineWidth()`
`protected org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps` `getNvPr()`
`double` `getRotation()` Rotation angle in degrees
`XSLFShadow` `getShadow()`
`int` `getShapeId()` Returns a unique identifier for this shape within the current document.
`java.lang.String` `getShapeName()`
`XSLFShapeType` `getShapeType()`
`XSLFSheet` `getSheet()`
`protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties` `getSpPr()`
`protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle` `getSpStyle()`
`org.apache.xmlbeans.XmlObject` `getXmlObject()`
`void` `setAnchor(java.awt.geom.Rectangle2D anchor)`
`void` `setFillColor(java.awt.Color color)` Specifies a solid color fill.
`void` `setFlipHorizontal(boolean flip)`
`void` `setFlipVertical(boolean flip)` Whether the shape is vertically flipped
`void` `setLineCap(LineCap cap)`
`void` `setLineColor(java.awt.Color color)`
`void` `setLineDash(LineDash dash)`
`void` `setLineHeadDecoration(LineDecoration style)` Specifies the line end decoration, such as a triangle or arrowhead.
`void` `setLineHeadLength(LineEndLength style)` Specifies the line end width in relation to the line width.
`void` `setLineHeadWidth(LineEndWidth style)` specifies decorations which can be added to the head of a line.
`void` `setLineTailDecoration(LineDecoration style)` Specifies the line end decoration, such as a triangle or arrowhead.
`void` `setLineTailLength(LineEndLength style)` Specifies the line end width in relation to the line width.
`void` `setLineTailWidth(LineEndWidth style)` specifies decorations which can be added to the tail of a line.
`void` `setLineWidth(double width)`
`void` `setRotation(double theta)` Rotate this shape.
`void` `setShapeType(XSLFShapeType type)`

Methods inherited from class org.apache.poi.xslf.usermodel.XSLFShape
`applyTransform`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getXmlObject

    public org.apache.xmlbeans.XmlObject getXmlObject()

  Specified by:
    `getXmlObject` in class `XSLFShape`
  Returns:
    the xml bean holding this shape's data

### getSheet

    public XSLFSheet getSheet()

  Returns:
    the sheet this shape belongs to

### setShapeType

    public void setShapeType(XSLFShapeType type)

  Parameters:
    `type` -

### getShapeType

    public XSLFShapeType getShapeType()

### getShapeName

    public java.lang.String getShapeName()

  Specified by:
    `getShapeName` in class `XSLFShape`
  Returns:
    human-readable name of this shape, e.g. "Rectange 3"

### getShapeId

    public int getShapeId()

  Description copied from class: `XSLFShape`
  Returns a unique identifier for this shape within the current document. 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 document share the same id attribute value, then the document shall be considered non-conformant.

  Specified by:
    `getShapeId` in class `XSLFShape`
  Returns:
    unique id of this shape

### getNvPr

    protected org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps getNvPr()

### getSpPr

    protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getSpPr()

### getSpStyle

    protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle getSpStyle()

### getCTPlaceholder

    protected org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder getCTPlaceholder()

### getAnchor

    public java.awt.geom.Rectangle2D getAnchor()

  Specified by:
    `getAnchor` in class `XSLFShape`
  Returns:
    the position of this shape within the drawing canvas. The coordinates are expressed in points

### setAnchor

    public void setAnchor(java.awt.geom.Rectangle2D anchor)

  Specified by:
    `setAnchor` in class `XSLFShape`
  Parameters:
    `anchor` - the position of this shape within the drawing canvas. The coordinates are expressed in points

### setRotation

    public void setRotation(double theta)

  Description copied from class: `XSLFShape`
  Rotate this shape.

  Positive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis).

  Specified by:
    `setRotation` in class `XSLFShape`
  Parameters:
    `theta` - the rotation angle in degrees.

### getRotation

    public double getRotation()

  Description copied from class: `XSLFShape`
  Rotation angle in degrees

  Positive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis).

  Specified by:
    `getRotation` in class `XSLFShape`
  Returns:
    rotation angle in degrees

### setFlipHorizontal

    public void setFlipHorizontal(boolean flip)

  Specified by:
    `setFlipHorizontal` in class `XSLFShape`
  Parameters:
    `flip` - whether the shape is horizontally flipped

### setFlipVertical

    public void setFlipVertical(boolean flip)

  Description copied from class: `XSLFShape`
  Whether the shape is vertically flipped

  Specified by:
    `setFlipVertical` in class `XSLFShape`
  Parameters:
    `flip` - whether the shape is vertically flipped

### getFlipHorizontal

    public boolean getFlipHorizontal()

  Description copied from class: `XSLFShape`
  Whether the shape is horizontally flipped

  Specified by:
    `getFlipHorizontal` in class `XSLFShape`
  Returns:
    whether the shape is horizontally flipped

### getFlipVertical

    public boolean getFlipVertical()

  Description copied from class: `XSLFShape`
  Whether the shape is vertically flipped

  Specified by:
    `getFlipVertical` in class `XSLFShape`
  Returns:
    whether the shape is vertically flipped

### setLineColor

    public void setLineColor(java.awt.Color color)

  Parameters:
    `color` - the color to paint the shape outline. A `null` value turns off the shape outline.

### getLineColor

    public java.awt.Color getLineColor()

  Returns:
    the color of the shape outline or `null` if outline is turned off

### setLineWidth

    public void setLineWidth(double width)

  Parameters:
    `width` - line width in points. `0` means no line

### getLineWidth

    public double getLineWidth()

  Returns:
    line width in points. `0` means no line.

### setLineDash

    public void setLineDash(LineDash dash)

  Parameters:
    `dash` - a preset line dashing scheme to stroke thr shape outline

### getLineDash

    public LineDash getLineDash()

  Returns:
    a preset line dashing scheme to stroke thr shape outline

### setLineCap

    public void setLineCap(LineCap cap)

  Parameters:
    `cap` - the line end cap style

### getLineCap

    public LineCap getLineCap()

  Returns:
    the line end cap style

### setFillColor

    public void setFillColor(java.awt.Color color)

  Specifies a solid color fill. The shape is filled entirely with the specified color.

  Parameters:
    `color` - the solid color fill. The value of `null` unsets the solidFIll attribute from the underlying xml

### getFillColor

    public java.awt.Color getFillColor()

  Returns:
    solid fill color of null if not set or fill color is not solid (pattern or gradient)

### getShadow

    public XSLFShadow getShadow()

  Returns:
    shadow of this shape or null if shadow is disabled

### draw

    public void draw(java.awt.Graphics2D graphics)

  Description copied from class: `XSLFShape`
  Draw this shape into the supplied canvas

  Specified by:
    `draw` in class `XSLFShape`
  Parameters:
    `graphics` - the graphics to draw into

### drawContent

    public void drawContent(java.awt.Graphics2D graphics)

  draw any content within this shape (image, text, etc.).

  Parameters:
    `graphics` - the graphics to draw into

### setLineHeadDecoration

    public void setLineHeadDecoration(LineDecoration style)

  Specifies the line end decoration, such as a triangle or arrowhead.

### getLineHeadDecoration

    public LineDecoration getLineHeadDecoration()

### setLineHeadWidth

    public void setLineHeadWidth(LineEndWidth style)

  specifies decorations which can be added to the head of a line.

### getLineHeadWidth

    public LineEndWidth getLineHeadWidth()

### setLineHeadLength

    public void setLineHeadLength(LineEndLength style)

  Specifies the line end width in relation to the line width.

### getLineHeadLength

    public LineEndLength getLineHeadLength()

### setLineTailDecoration

    public void setLineTailDecoration(LineDecoration style)

  Specifies the line end decoration, such as a triangle or arrowhead.

### getLineTailDecoration

    public LineDecoration getLineTailDecoration()

### setLineTailWidth

    public void setLineTailWidth(LineEndWidth style)

  specifies decorations which can be added to the tail of a line.

### getLineTailWidth

    public LineEndWidth getLineTailWidth()

### setLineTailLength

    public void setLineTailLength(LineEndLength style)

  Specifies the line end width in relation to the line width.

### getLineTailLength

    public LineEndLength getLineTailLength()

Copyright 2012 The Apache Software Foundation or its licensors, as applicable.