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.Double
getAngle()
java.lang.Double
getBeginX()
java.lang.Double
getBeginY()
java.awt.geom.Rectangle2D.Double
getBounds()
java.awt.geom.Path2D.Double
getBoundsAsPath()
XDGFCell
getCell(java.lang.String cellName)
A cell is really just a settingjava.lang.Double
getEndX()
java.lang.Double
getEndY()
java.lang.Boolean
getFlipX()
java.lang.Boolean
getFlipY()
java.awt.Color
getFontColor()
java.lang.Double
getFontSize()
GeometrySection
getGeometryByIdx(long idx)
java.lang.Iterable<GeometrySection>
getGeometrySections()
java.lang.Double
getHeight()
long
getID()
java.lang.Integer
getLineCap()
java.awt.Color
getLineColor()
java.lang.Integer
getLinePattern()
java.lang.Double
getLineWeight()
java.lang.Double
getLocPinX()
java.lang.Double
getLocPinY()
XDGFShape
getMasterShape()
java.lang.String
getName()
XDGFShape
getParentShape()
java.awt.geom.Path2D.Double
getPath()
java.lang.Double
getPinX()
java.lang.Double
getPinY()
java.util.List<XDGFShape>
getShapes()
Only available if this shape is a shape group, may be nulljava.lang.String
getShapeType()
java.awt.Stroke
getStroke()
java.lang.String
getSymbolName()
XDGFText
getText()
java.lang.String
getTextAsString()
XDGFShape
getTopmostParentShape()
java.lang.Double
getTxtAngle()
java.lang.Double
getTxtHeight()
java.lang.Double
getTxtLocPinX()
java.lang.Double
getTxtLocPinY()
java.lang.Double
getTxtPinX()
java.lang.Double
getTxtPinY()
java.lang.Double
getTxtWidth()
java.lang.String
getType()
java.lang.Double
getWidth()
com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType
getXmlObject()
boolean
hasGeometry()
boolean
hasMaster()
boolean
hasMasterShape()
boolean
hasParent()
boolean
hasShapes()
boolean
hasText()
boolean
isDeleted()
boolean
isShape1D()
boolean
isTopmost()
java.lang.String
toString()
void
visitShapes(ShapeVisitor visitor, int level)
The visitor will first visit this shape, then it's children.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.-
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:
toString
in 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:XDGFSheet
A 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:
getLineCap
in classXDGFSheet
-
getLineColor
public java.awt.Color getLineColor()
- Overrides:
getLineColor
in classXDGFSheet
-
getLinePattern
public java.lang.Integer getLinePattern()
- Overrides:
getLinePattern
in classXDGFSheet
-
getLineWeight
public java.lang.Double getLineWeight()
- Overrides:
getLineWeight
in classXDGFSheet
-
getFontColor
public java.awt.Color getFontColor()
- Overrides:
getFontColor
in classXDGFSheet
-
getFontSize
public java.lang.Double getFontSize()
- Overrides:
getFontSize
in 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.
-
-