org.apache.poi.xslf.usermodel
Class XSLFSimpleShape

java.lang.Object
  extended by org.apache.poi.xslf.usermodel.XSLFShape
      extended by org.apache.poi.xslf.usermodel.XSLFSimpleShape
All Implemented Interfaces:
IAdjustableShape, PlaceableShape<XSLFShape,XSLFTextParagraph>, Shape<XSLFShape,XSLFTextParagraph>, SimpleShape<XSLFShape,XSLFTextParagraph>
Direct Known Subclasses:
XSLFBackground, XSLFConnectorShape, XSLFPictureShape, XSLFTextShape

@Beta
public abstract class XSLFSimpleShape
extends XSLFShape
implements SimpleShape<XSLFShape,XSLFTextParagraph>

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


Field Summary
 
Fields inherited from class org.apache.poi.xslf.usermodel.XSLFShape
PML_NS
 
Method Summary
 XSLFHyperlink createHyperlink()
           
 Guide getAdjustValue(java.lang.String name)
           
 java.awt.geom.Rectangle2D getAnchor()
           
 java.awt.Color getFillColor()
           
 FillStyle getFillStyle()
          fetch shape fill as a java.awt.Paint
 boolean getFlipHorizontal()
           
 boolean getFlipVertical()
           
 CustomGeometry getGeometry()
           
 XSLFHyperlink getHyperlink()
           
 StrokeStyle.LineCap getLineCap()
           
 java.awt.Color getLineColor()
           
 StrokeStyle.LineCompound getLineCompound()
           
 StrokeStyle.LineDash getLineDash()
           
 LineDecoration getLineDecoration()
           
 LineDecoration.DecorationShape getLineHeadDecoration()
           
 LineDecoration.DecorationSize getLineHeadLength()
           
 LineDecoration.DecorationSize getLineHeadWidth()
           
protected  PaintStyle getLinePaint()
           
 LineDecoration.DecorationShape getLineTailDecoration()
           
 LineDecoration.DecorationSize getLineTailLength()
           
 LineDecoration.DecorationSize getLineTailWidth()
           
 double getLineWidth()
           
 double getRotation()
           
 XSLFShadow getShadow()
           
 ShapeType getShapeType()
           
 StrokeStyle getStrokeStyle()
           
protected  org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D getXfrm(boolean create)
           
 boolean isPlaceholder()
           
 void setAnchor(java.awt.geom.Rectangle2D anchor)
           
 void setFillColor(java.awt.Color color)
           
 void setFlipHorizontal(boolean flip)
           
 void setFlipVertical(boolean flip)
           
 void setLineCap(StrokeStyle.LineCap cap)
           
 void setLineColor(java.awt.Color color)
           
 void setLineCompound(StrokeStyle.LineCompound compound)
           
 void setLineDash(StrokeStyle.LineDash dash)
           
 void setLineHeadDecoration(LineDecoration.DecorationShape style)
          Specifies the line end decoration, such as a triangle or arrowhead.
 void setLineHeadLength(LineDecoration.DecorationSize style)
          Specifies the line end width in relation to the line width.
 void setLineHeadWidth(LineDecoration.DecorationSize style)
          specifies decoration width of the head of a line.
 void setLineTailDecoration(LineDecoration.DecorationShape style)
          Specifies the line end decoration, such as a triangle or arrowhead.
 void setLineTailLength(LineDecoration.DecorationSize style)
          Specifies the line end width in relation to the line width.
 void setLineTailWidth(LineDecoration.DecorationSize style)
          specifies decorations which can be added to the tail of a line.
 void setLineWidth(double width)
           
 void setPlaceholder(Placeholder placeholder)
          Specifies that the corresponding shape should be represented by the generating application as a placeholder.
 void setRotation(double theta)
           
 void setShapeType(ShapeType type)
           
 void setStrokeStyle(java.lang.Object... styles)
           
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFShape
draw, fetchShapeProperty, getBgPr, getBgRef, getChild, getCNvPr, getCTPlaceholder, getFillPaint, getGrpSpPr, getParent, getPlaceholder, getShapeId, getShapeName, getShapeProperties, getSheet, getSpStyle, getXmlObject, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectProperty, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
getPlaceholder
 
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getParent, getSheet
 
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getParent, getSheet
 

Method Detail

setShapeType

public void setShapeType(ShapeType type)
Specified by:
setShapeType in interface SimpleShape<XSLFShape,XSLFTextParagraph>

getShapeType

public ShapeType getShapeType()
Specified by:
getShapeType in interface SimpleShape<XSLFShape,XSLFTextParagraph>

getXfrm

protected org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D getXfrm(boolean create)

getAnchor

public java.awt.geom.Rectangle2D getAnchor()
Specified by:
getAnchor in interface PlaceableShape<XSLFShape,XSLFTextParagraph>
Specified by:
getAnchor in interface Shape<XSLFShape,XSLFTextParagraph>

setAnchor

public void setAnchor(java.awt.geom.Rectangle2D anchor)
Specified by:
setAnchor in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

setRotation

public void setRotation(double theta)
Specified by:
setRotation in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

getRotation

public double getRotation()
Specified by:
getRotation in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

setFlipHorizontal

public void setFlipHorizontal(boolean flip)
Specified by:
setFlipHorizontal in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

setFlipVertical

public void setFlipVertical(boolean flip)
Specified by:
setFlipVertical in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

getFlipHorizontal

public boolean getFlipHorizontal()
Specified by:
getFlipHorizontal in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

getFlipVertical

public boolean getFlipVertical()
Specified by:
getFlipVertical in interface PlaceableShape<XSLFShape,XSLFTextParagraph>

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

getLinePaint

protected PaintStyle getLinePaint()

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.

setLineCompound

public void setLineCompound(StrokeStyle.LineCompound compound)
Parameters:
compound - set the line compound style

getLineCompound

public StrokeStyle.LineCompound getLineCompound()
Returns:
the line compound

setLineDash

public void setLineDash(StrokeStyle.LineDash dash)
Parameters:
dash - a preset line dashing scheme to stroke thr shape outline

getLineDash

public StrokeStyle.LineDash getLineDash()
Returns:
a preset line dashing scheme to stroke the shape outline

setLineCap

public void setLineCap(StrokeStyle.LineCap cap)
Parameters:
cap - the line end cap style

getLineCap

public StrokeStyle.LineCap getLineCap()
Returns:
the line end cap style

setFillColor

public void setFillColor(java.awt.Color color)
Specified by:
setFillColor in interface SimpleShape<XSLFShape,XSLFTextParagraph>

getFillColor

public java.awt.Color getFillColor()
Specified by:
getFillColor in interface SimpleShape<XSLFShape,XSLFTextParagraph>

getShadow

public XSLFShadow getShadow()
Specified by:
getShadow in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Returns:
shadow of this shape or null if shadow is disabled

getGeometry

public CustomGeometry getGeometry()
Specified by:
getGeometry in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Returns:
definition of the shape geometry

setLineHeadDecoration

public void setLineHeadDecoration(LineDecoration.DecorationShape style)
Specifies the line end decoration, such as a triangle or arrowhead.

Parameters:
style - the line end docoration style

getLineHeadDecoration

public LineDecoration.DecorationShape getLineHeadDecoration()
Returns:
the line end decoration shape

setLineHeadWidth

public void setLineHeadWidth(LineDecoration.DecorationSize style)
specifies decoration width of the head of a line.

Parameters:
style - the decoration width

getLineHeadWidth

public LineDecoration.DecorationSize getLineHeadWidth()
Returns:
the line end decoration width

setLineHeadLength

public void setLineHeadLength(LineDecoration.DecorationSize style)
Specifies the line end width in relation to the line width.


getLineHeadLength

public LineDecoration.DecorationSize getLineHeadLength()
Returns:
the line end decoration length

setLineTailDecoration

public void setLineTailDecoration(LineDecoration.DecorationShape style)
Specifies the line end decoration, such as a triangle or arrowhead.


getLineTailDecoration

public LineDecoration.DecorationShape getLineTailDecoration()
Returns:
the line end decoration shape

setLineTailWidth

public void setLineTailWidth(LineDecoration.DecorationSize style)
specifies decorations which can be added to the tail of a line.


getLineTailWidth

public LineDecoration.DecorationSize getLineTailWidth()
Returns:
the line end decoration width

setLineTailLength

public void setLineTailLength(LineDecoration.DecorationSize style)
Specifies the line end width in relation to the line width.


getLineTailLength

public LineDecoration.DecorationSize getLineTailLength()
Returns:
the line end decoration length

isPlaceholder

public boolean isPlaceholder()

getAdjustValue

public Guide getAdjustValue(java.lang.String name)
Specified by:
getAdjustValue in interface IAdjustableShape

getLineDecoration

public LineDecoration getLineDecoration()
Specified by:
getLineDecoration in interface SimpleShape<XSLFShape,XSLFTextParagraph>

getFillStyle

public FillStyle getFillStyle()
fetch shape fill as a java.awt.Paint

Specified by:
getFillStyle in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Returns:
either Color or GradientPaint or TexturePaint or null

getStrokeStyle

public StrokeStyle getStrokeStyle()
Specified by:
getStrokeStyle in interface SimpleShape<XSLFShape,XSLFTextParagraph>

setStrokeStyle

public void setStrokeStyle(java.lang.Object... styles)
Specified by:
setStrokeStyle in interface SimpleShape<XSLFShape,XSLFTextParagraph>

setPlaceholder

public void setPlaceholder(Placeholder placeholder)
Description copied from class: XSLFShape
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. Different types of placeholders are allowed and can be specified by using the placeholder type attribute for this element

Specified by:
setPlaceholder in interface SimpleShape<XSLFShape,XSLFTextParagraph>
Overrides:
setPlaceholder in class XSLFShape
Parameters:
placeholder - The shape to use as placeholder or null if no placeholder should be set.

getHyperlink

public XSLFHyperlink getHyperlink()
Specified by:
getHyperlink in interface SimpleShape<XSLFShape,XSLFTextParagraph>

createHyperlink

public XSLFHyperlink createHyperlink()
Specified by:
createHyperlink in interface SimpleShape<XSLFShape,XSLFTextParagraph>