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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.DoublegetAngle()java.lang.DoublegetBeginX()java.lang.DoublegetBeginY()java.awt.geom.Rectangle2D.DoublegetBounds()java.awt.geom.Path2D.DoublegetBoundsAsPath()XDGFCellgetCell(java.lang.String cellName)A cell is really just a settingjava.lang.DoublegetEndX()java.lang.DoublegetEndY()java.lang.BooleangetFlipX()java.lang.BooleangetFlipY()java.awt.ColorgetFontColor()java.lang.DoublegetFontSize()GeometrySectiongetGeometryByIdx(long idx)java.lang.Iterable<GeometrySection>getGeometrySections()java.lang.DoublegetHeight()longgetID()java.lang.IntegergetLineCap()java.awt.ColorgetLineColor()java.lang.IntegergetLinePattern()java.lang.DoublegetLineWeight()java.lang.DoublegetLocPinX()java.lang.DoublegetLocPinY()XDGFShapegetMasterShape()java.lang.StringgetName()XDGFShapegetParentShape()java.awt.geom.Path2D.DoublegetPath()java.lang.DoublegetPinX()java.lang.DoublegetPinY()java.util.List<XDGFShape>getShapes()Only available if this shape is a shape group, may be nulljava.lang.StringgetShapeType()java.awt.StrokegetStroke()java.lang.StringgetSymbolName()XDGFTextgetText()java.lang.StringgetTextAsString()XDGFShapegetTopmostParentShape()java.lang.DoublegetTxtAngle()java.lang.DoublegetTxtHeight()java.lang.DoublegetTxtLocPinX()java.lang.DoublegetTxtLocPinY()java.lang.DoublegetTxtPinX()java.lang.DoublegetTxtPinY()java.lang.DoublegetTxtWidth()java.lang.StringgetType()java.lang.DoublegetWidth()com.microsoft.schemas.office.visio.x2012.main.ShapeSheetTypegetXmlObject()booleanhasGeometry()booleanhasMaster()booleanhasMasterShape()booleanhasParent()booleanhasShapes()booleanhasText()booleanisDeleted()booleanisShape1D()booleanisTopmost()java.lang.StringtoString()voidvisitShapes(ShapeVisitor visitor, int level)The visitor will first visit this shape, then it's children.voidvisitShapes(ShapeVisitor visitor, java.awt.geom.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.-
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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getXmlObject
@Internal public com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType getXmlObject()
-
getID
public long getID()
-
getType
public java.lang.String getType()
-
getTextAsString
public java.lang.String getTextAsString()
-
hasText
public boolean hasText()
-
getCell
public XDGFCell getCell(java.lang.String cellName)
Description copied from class:XDGFSheetA cell is really just a setting
-
getGeometryByIdx
public GeometrySection getGeometryByIdx(long idx)
-
getShapes
public java.util.List<XDGFShape> getShapes()
Only available if this shape is a shape group, may be null
-
getName
public java.lang.String getName()
-
getShapeType
public java.lang.String getShapeType()
-
getSymbolName
public java.lang.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 java.lang.Double getPinX()
-
getPinY
public java.lang.Double getPinY()
-
getWidth
public java.lang.Double getWidth()
-
getHeight
public java.lang.Double getHeight()
-
getLocPinX
public java.lang.Double getLocPinX()
-
getLocPinY
public java.lang.Double getLocPinY()
-
getBeginX
public java.lang.Double getBeginX()
-
getBeginY
public java.lang.Double getBeginY()
-
getEndX
public java.lang.Double getEndX()
-
getEndY
public java.lang.Double getEndY()
-
getAngle
public java.lang.Double getAngle()
-
getFlipX
public java.lang.Boolean getFlipX()
-
getFlipY
public java.lang.Boolean getFlipY()
-
getTxtPinX
public java.lang.Double getTxtPinX()
-
getTxtPinY
public java.lang.Double getTxtPinY()
-
getTxtLocPinX
public java.lang.Double getTxtLocPinX()
-
getTxtLocPinY
public java.lang.Double getTxtLocPinY()
-
getTxtAngle
public java.lang.Double getTxtAngle()
-
getTxtWidth
public java.lang.Double getTxtWidth()
-
getTxtHeight
public java.lang.Double getTxtHeight()
-
getLineCap
public java.lang.Integer getLineCap()
- Overrides:
getLineCapin classXDGFSheet
-
getLineColor
public java.awt.Color getLineColor()
- Overrides:
getLineColorin classXDGFSheet
-
getLinePattern
public java.lang.Integer getLinePattern()
- Overrides:
getLinePatternin classXDGFSheet
-
getLineWeight
public java.lang.Double getLineWeight()
- Overrides:
getLineWeightin classXDGFSheet
-
getFontColor
public java.awt.Color getFontColor()
- Overrides:
getFontColorin classXDGFSheet
-
getFontSize
public java.lang.Double getFontSize()
- Overrides:
getFontSizein classXDGFSheet
-
getStroke
public java.awt.Stroke getStroke()
-
getGeometrySections
public java.lang.Iterable<GeometrySection> getGeometrySections()
-
getBounds
public java.awt.geom.Rectangle2D.Double getBounds()
- Returns:
- rectangle in local coordinates
-
getBoundsAsPath
public java.awt.geom.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 java.awt.geom.Path2D.Double getPath()
- Returns:
- The outline of the shape in local coordinates
-
hasGeometry
public boolean hasGeometry()
-
visitShapes
public void visitShapes(ShapeVisitor visitor, java.awt.geom.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.
-
-