org.apache.poi.xslf.usermodel
Class XSLFShape
- java.lang.Object
-
- org.apache.poi.xslf.usermodel.XSLFShape
-
- Direct Known Subclasses:
- XSLFGraphicFrame, XSLFGroupShape, XSLFSimpleShape
@Beta public abstract class XSLFShape extends java.lang.Object
Base super-class class for all shapes in PresentationML
-
-
Constructor Summary
Constructors Constructor and Description XSLFShape()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description abstract voiddraw(java.awt.Graphics2D graphics)Draw this shape into the supplied canvasabstract java.awt.geom.Rectangle2DgetAnchor()abstract booleangetFlipHorizontal()Whether the shape is horizontally flippedabstract booleangetFlipVertical()Whether the shape is vertically flippedabstract doublegetRotation()Rotation angle in degreesabstract intgetShapeId()Returns a unique identifier for this shape within the current document.abstract java.lang.StringgetShapeName()abstract org.apache.xmlbeans.XmlObjectgetXmlObject()abstract voidsetAnchor(java.awt.geom.Rectangle2D anchor)abstract voidsetFlipHorizontal(boolean flip)abstract voidsetFlipVertical(boolean flip)Whether the shape is vertically flippedabstract voidsetRotation(double theta)Rotate this shape.
-
-
-
Method Detail
-
getAnchor
public abstract java.awt.geom.Rectangle2D getAnchor()
- Returns:
- the position of this shape within the drawing canvas. The coordinates are expressed in points
-
setAnchor
public abstract void setAnchor(java.awt.geom.Rectangle2D anchor)
- Parameters:
anchor- the position of this shape within the drawing canvas. The coordinates are expressed in points
-
getXmlObject
public abstract org.apache.xmlbeans.XmlObject getXmlObject()
- Returns:
- the xml bean holding this shape's data
-
getShapeName
public abstract java.lang.String getShapeName()
- Returns:
- human-readable name of this shape, e.g. "Rectange 3"
-
getShapeId
public abstract int getShapeId()
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.
- Returns:
- unique id of this shape
-
setRotation
public abstract void setRotation(double theta)
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).
- Parameters:
theta- the rotation angle in degrees.
-
getRotation
public abstract double getRotation()
Rotation 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).
- Returns:
- rotation angle in degrees
-
setFlipHorizontal
public abstract void setFlipHorizontal(boolean flip)
- Parameters:
flip- whether the shape is horizontally flipped
-
setFlipVertical
public abstract void setFlipVertical(boolean flip)
Whether the shape is vertically flipped- Parameters:
flip- whether the shape is vertically flipped
-
getFlipHorizontal
public abstract boolean getFlipHorizontal()
Whether the shape is horizontally flipped- Returns:
- whether the shape is horizontally flipped
-
getFlipVertical
public abstract boolean getFlipVertical()
Whether the shape is vertically flipped- Returns:
- whether the shape is vertically flipped
-
draw
public abstract void draw(java.awt.Graphics2D graphics)
Draw this shape into the supplied canvas- Parameters:
graphics- the graphics to draw into
-
-
DataMelt 3.0 © DataMelt by jWork.ORG