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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddraw(java.awt.Graphics2D graphics)Draw this shape into the supplied canvasvoiddrawContent(java.awt.Graphics2D graphics)draw any content within this shape (image, text, etc.).java.awt.geom.Rectangle2DgetAnchor()java.awt.ColorgetFillColor()booleangetFlipHorizontal()Whether the shape is horizontally flippedbooleangetFlipVertical()Whether the shape is vertically flippedLineCapgetLineCap()java.awt.ColorgetLineColor()LineDashgetLineDash()LineDecorationgetLineHeadDecoration()LineEndLengthgetLineHeadLength()LineEndWidthgetLineHeadWidth()LineDecorationgetLineTailDecoration()LineEndLengthgetLineTailLength()LineEndWidthgetLineTailWidth()doublegetLineWidth()doublegetRotation()Rotation angle in degreesXSLFShadowgetShadow()intgetShapeId()Returns a unique identifier for this shape within the current document.java.lang.StringgetShapeName()XSLFShapeTypegetShapeType()XSLFSheetgetSheet()org.apache.xmlbeans.XmlObjectgetXmlObject()voidsetAnchor(java.awt.geom.Rectangle2D anchor)voidsetFillColor(java.awt.Color color)Specifies a solid color fill.voidsetFlipHorizontal(boolean flip)voidsetFlipVertical(boolean flip)Whether the shape is vertically flippedvoidsetLineCap(LineCap cap)voidsetLineColor(java.awt.Color color)voidsetLineDash(LineDash dash)voidsetLineHeadDecoration(LineDecoration style)Specifies the line end decoration, such as a triangle or arrowhead.voidsetLineHeadLength(LineEndLength style)Specifies the line end width in relation to the line width.voidsetLineHeadWidth(LineEndWidth style)specifies decorations which can be added to the head of a line.voidsetLineTailDecoration(LineDecoration style)Specifies the line end decoration, such as a triangle or arrowhead.voidsetLineTailLength(LineEndLength style)Specifies the line end width in relation to the line width.voidsetLineTailWidth(LineEndWidth style)specifies decorations which can be added to the tail of a line.voidsetLineWidth(double width)voidsetRotation(double theta)Rotate this shape.voidsetShapeType(XSLFShapeType type)
-
-
-
Method Detail
-
getXmlObject
public org.apache.xmlbeans.XmlObject getXmlObject()
- Specified by:
getXmlObjectin classXSLFShape- 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:
getShapeNamein classXSLFShape- Returns:
- human-readable name of this shape, e.g. "Rectange 3"
-
getShapeId
public int getShapeId()
Description copied from class:XSLFShapeReturns 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:
getShapeIdin classXSLFShape- Returns:
- unique id of this shape
-
getAnchor
public java.awt.geom.Rectangle2D getAnchor()
-
setAnchor
public void setAnchor(java.awt.geom.Rectangle2D anchor)
-
setRotation
public void setRotation(double theta)
Description copied from class:XSLFShapeRotate 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:
setRotationin classXSLFShape- Parameters:
theta- the rotation angle in degrees.
-
getRotation
public double getRotation()
Description copied from class:XSLFShapeRotation angle in degreesPositive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis).
- Specified by:
getRotationin classXSLFShape- Returns:
- rotation angle in degrees
-
setFlipHorizontal
public void setFlipHorizontal(boolean flip)
- Specified by:
setFlipHorizontalin classXSLFShape- Parameters:
flip- whether the shape is horizontally flipped
-
setFlipVertical
public void setFlipVertical(boolean flip)
Description copied from class:XSLFShapeWhether the shape is vertically flipped- Specified by:
setFlipVerticalin classXSLFShape- Parameters:
flip- whether the shape is vertically flipped
-
getFlipHorizontal
public boolean getFlipHorizontal()
Description copied from class:XSLFShapeWhether the shape is horizontally flipped- Specified by:
getFlipHorizontalin classXSLFShape- Returns:
- whether the shape is horizontally flipped
-
getFlipVertical
public boolean getFlipVertical()
Description copied from class:XSLFShapeWhether the shape is vertically flipped- Specified by:
getFlipVerticalin classXSLFShape- Returns:
- whether the shape is vertically flipped
-
setLineColor
public void setLineColor(java.awt.Color color)
- Parameters:
color- the color to paint the shape outline. Anullvalue turns off the shape outline.
-
getLineColor
public java.awt.Color getLineColor()
- Returns:
- the color of the shape outline or
nullif outline is turned off
-
setLineWidth
public void setLineWidth(double width)
- Parameters:
width- line width in points.0means no line
-
getLineWidth
public double getLineWidth()
- Returns:
- line width in points.
0means 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 ofnullunsets 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:XSLFShapeDraw this shape into the supplied canvas
-
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()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG