@Beta public abstract class XSLFSimpleShape extends XSLFShape
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D graphics)
Draw this shape into the supplied canvas
|
void |
drawContent(Graphics2D graphics)
draw any content within this shape (image, text, etc.).
|
Rectangle2D |
getAnchor() |
protected org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder |
getCTPlaceholder() |
Color |
getFillColor() |
boolean |
getFlipHorizontal()
Whether the shape is horizontally flipped
|
boolean |
getFlipVertical()
Whether the shape is vertically flipped
|
LineCap |
getLineCap() |
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.
|
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(Rectangle2D anchor) |
void |
setFillColor(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(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) |
applyTransform
public org.apache.xmlbeans.XmlObject getXmlObject()
getXmlObject
in class XSLFShape
public XSLFSheet getSheet()
public void setShapeType(XSLFShapeType type)
type
- public XSLFShapeType getShapeType()
public String getShapeName()
getShapeName
in class XSLFShape
public int getShapeId()
XSLFShape
If multiple objects within the same document share the same id attribute value, then the document shall be considered non-conformant.
getShapeId
in class XSLFShape
protected org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps getNvPr()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getSpPr()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle getSpStyle()
protected org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder getCTPlaceholder()
public Rectangle2D getAnchor()
public void setAnchor(Rectangle2D anchor)
public void setRotation(double theta)
XSLFShape
Positive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis).
setRotation
in class XSLFShape
theta
- the rotation angle in degrees.public double getRotation()
XSLFShape
Positive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis).
getRotation
in class XSLFShape
public void setFlipHorizontal(boolean flip)
setFlipHorizontal
in class XSLFShape
flip
- whether the shape is horizontally flippedpublic void setFlipVertical(boolean flip)
XSLFShape
setFlipVertical
in class XSLFShape
flip
- whether the shape is vertically flippedpublic boolean getFlipHorizontal()
XSLFShape
getFlipHorizontal
in class XSLFShape
public boolean getFlipVertical()
XSLFShape
getFlipVertical
in class XSLFShape
public void setLineColor(Color color)
color
- the color to paint the shape outline.
A null
value turns off the shape outline.public Color getLineColor()
null
if outline is turned offpublic void setLineWidth(double width)
width
- line width in points. 0
means no linepublic double getLineWidth()
0
means no line.public void setLineDash(LineDash dash)
dash
- a preset line dashing scheme to stroke thr shape outlinepublic LineDash getLineDash()
public void setLineCap(LineCap cap)
cap
- the line end cap stylepublic LineCap getLineCap()
public void setFillColor(Color color)
color
- the solid color fill. The value of null
unsets
the solidFIll attribute from the underlying xmlpublic Color getFillColor()
public XSLFShadow getShadow()
public void draw(Graphics2D graphics)
XSLFShape
public void drawContent(Graphics2D graphics)
graphics
- the graphics to draw intopublic void setLineHeadDecoration(LineDecoration style)
public LineDecoration getLineHeadDecoration()
public void setLineHeadWidth(LineEndWidth style)
public LineEndWidth getLineHeadWidth()
public void setLineHeadLength(LineEndLength style)
public LineEndLength getLineHeadLength()
public void setLineTailDecoration(LineDecoration style)
public LineDecoration getLineTailDecoration()
public void setLineTailWidth(LineEndWidth style)
public LineEndWidth getLineTailWidth()
public void setLineTailLength(LineEndLength style)
public LineEndLength getLineTailLength()
Copyright © 2020. All rights reserved.