Package org.apache.poi.xdgf.usermodel
Class XDGFShape
- java.lang.Object
-
- org.apache.poi.xdgf.usermodel.XDGFSheet
-
- org.apache.poi.xdgf.usermodel.XDGFShape
-
public class XDGFShape extends XDGFSheet
A shape is a collection of Geometry Visualization, Format, Text, Images, and Shape Data in a Drawing Page.
-
-
Constructor Summary
Constructors Constructor Description XDGFShape(com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document)
XDGFShape(XDGFShape parent, com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document)
-
Method Summary
-
Methods inherited from class org.apache.poi.xdgf.usermodel.XDGFSheet
getDocument, getFillStyle, getLineStyle, getSection, getTextStyle
-
-
-
-
Constructor Detail
-
XDGFShape
public XDGFShape(com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document)
-
XDGFShape
public XDGFShape(XDGFShape parent, com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document)
-
-
Method Detail
-
getXmlObject
@Internal public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType getXmlObject()
-
getID
public long getID()
-
getType
public String getType()
-
getTextAsString
public String getTextAsString()
-
hasText
public boolean hasText()
-
getCell
public XDGFCell getCell(String cellName)
Description copied from class:XDGFSheet
A cell is really just a setting
-
getGeometryByIdx
public GeometrySection getGeometryByIdx(long idx)
-
getShapes
public List<XDGFShape> getShapes()
Only available if this shape is a shape group, may be null
-
getName
public String getName()
-
getShapeType
public String getShapeType()
-
getSymbolName
public String getSymbolName()
-
getMasterShape
public XDGFShape getMasterShape()
-
getParentShape
public XDGFShape getParentShape()
- Returns:
- The parent shape if this is a subshape, null otherwise
-
getTopmostParentShape
public XDGFShape getTopmostParentShape()
-
hasMaster
public boolean hasMaster()
-
hasMasterShape
public boolean hasMasterShape()
-
hasParent
public boolean hasParent()
-
hasShapes
public boolean hasShapes()
-
isTopmost
public boolean isTopmost()
-
isShape1D
public boolean isShape1D()
-
isDeleted
public boolean isDeleted()
-
getText
public XDGFText getText()
-
getPinX
public Double getPinX()
-
getPinY
public Double getPinY()
-
getWidth
public Double getWidth()
-
getHeight
public Double getHeight()
-
getLocPinX
public Double getLocPinX()
-
getLocPinY
public Double getLocPinY()
-
getBeginX
public Double getBeginX()
-
getBeginY
public Double getBeginY()
-
getEndX
public Double getEndX()
-
getEndY
public Double getEndY()
-
getAngle
public Double getAngle()
-
getFlipX
public Boolean getFlipX()
-
getFlipY
public Boolean getFlipY()
-
getTxtPinX
public Double getTxtPinX()
-
getTxtPinY
public Double getTxtPinY()
-
getTxtLocPinX
public Double getTxtLocPinX()
-
getTxtLocPinY
public Double getTxtLocPinY()
-
getTxtAngle
public Double getTxtAngle()
-
getTxtWidth
public Double getTxtWidth()
-
getTxtHeight
public Double getTxtHeight()
-
getLineCap
public Integer getLineCap()
- Overrides:
getLineCap
in classXDGFSheet
-
getLineColor
public Color getLineColor()
- Overrides:
getLineColor
in classXDGFSheet
-
getLinePattern
public Integer getLinePattern()
- Overrides:
getLinePattern
in classXDGFSheet
-
getLineWeight
public Double getLineWeight()
- Overrides:
getLineWeight
in classXDGFSheet
-
getFontColor
public Color getFontColor()
- Overrides:
getFontColor
in classXDGFSheet
-
getFontSize
public Double getFontSize()
- Overrides:
getFontSize
in classXDGFSheet
-
getStroke
public Stroke getStroke()
-
getGeometrySections
public Iterable<GeometrySection> getGeometrySections()
-
getBounds
public Rectangle2D.Double getBounds()
- Returns:
- rectangle in local coordinates
-
getBoundsAsPath
public Path2D.Double getBoundsAsPath()
- Returns:
- returns bounds as a path in local coordinates, which is userful if you need to transform to global coordinates Warning: Don't use this for 1d objects, and will fail for infinite line objects
-
getPath
public Path2D.Double getPath()
- Returns:
- The outline of the shape in local coordinates
-
hasGeometry
public boolean hasGeometry()
-
visitShapes
public void visitShapes(ShapeVisitor visitor, AffineTransform tr, int level)
The visitor will first visit this shape, then it's children This is useful because exceptions will be marked with the shapes as it propagates up the shape hierarchy.
-
visitShapes
public void visitShapes(ShapeVisitor visitor, int level)
The visitor will first visit this shape, then it's children. No transform is calculated for this visit This is useful because exceptions will be marked with the shapes as it propagates up the shape hierarchy.
-
-