Package org.apache.poi.xdgf.usermodel
Class XDGFShape
java.lang.Object
org.apache.poi.xdgf.usermodel.XDGFSheet
org.apache.poi.xdgf.usermodel.XDGFShape
A shape is a collection of Geometry Visualization, Format, Text, Images, and
Shape Data in a Drawing Page.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionXDGFShape
(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
Modifier and TypeMethodDescriptiongetAngle()
A cell is really just a settinggetEndX()
getEndY()
getFlipX()
getFlipY()
getGeometryByIdx
(long idx) long
getID()
getName()
protected AffineTransform
Returns a transform that can translate shape-local coordinates to the coordinates of its parent shapegetPath()
getPinX()
getPinY()
Only available if this shape is a shape group, may be nullgetText()
getType()
getWidth()
com.microsoft.schemas.office.visio.x2012.main.ShapeSheetType
boolean
boolean
boolean
boolean
boolean
boolean
hasText()
boolean
boolean
boolean
protected void
protected void
setupMaster
(XDGFPageContents pageContents, XDGFMasterContents master) Setup top level shapes Shapes that have a 'Master' attribute refer to a specific master in the page, whereas shapes with a 'MasterShape' attribute refer to a subshape of a Master.protected void
toString()
void
visitShapes
(ShapeVisitor visitor, int level) The visitor will first visit this shape, then it's children.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.Methods inherited from class org.apache.poi.xdgf.usermodel.XDGFSheet
getDocument, getFillStyle, getLineStyle, getSection, getTextStyle
-
Constructor Details
-
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 Details
-
toString
-
readProperties
protected void readProperties() -
setupMaster
Setup top level shapes Shapes that have a 'Master' attribute refer to a specific master in the page, whereas shapes with a 'MasterShape' attribute refer to a subshape of a Master. -
setupSectionMasters
protected void setupSectionMasters() -
getXmlObject
-
getID
public long getID() -
getType
-
getTextAsString
-
hasText
public boolean hasText() -
getCell
Description copied from class:XDGFSheet
A cell is really just a setting -
getGeometryByIdx
-
getShapes
Only available if this shape is a shape group, may be null -
getName
-
getShapeType
-
getSymbolName
-
getMasterShape
-
getParentShape
- Returns:
- The parent shape if this is a subshape, null otherwise
-
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
-
getPinX
-
getPinY
-
getWidth
-
getHeight
-
getLocPinX
-
getLocPinY
-
getBeginX
-
getBeginY
-
getEndX
-
getEndY
-
getAngle
-
getFlipX
-
getFlipY
-
getTxtPinX
-
getTxtPinY
-
getTxtLocPinX
-
getTxtLocPinY
-
getTxtAngle
-
getTxtWidth
-
getTxtHeight
-
getLineCap
- Overrides:
getLineCap
in classXDGFSheet
-
getLineColor
- Overrides:
getLineColor
in classXDGFSheet
-
getLinePattern
- Overrides:
getLinePattern
in classXDGFSheet
-
getLineWeight
- Overrides:
getLineWeight
in classXDGFSheet
-
getFontColor
- Overrides:
getFontColor
in classXDGFSheet
-
getFontSize
- Overrides:
getFontSize
in classXDGFSheet
-
getStroke
-
getGeometrySections
-
getBounds
- Returns:
- rectangle in local coordinates
-
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
- Returns:
- The outline of the shape in local coordinates
-
hasGeometry
public boolean hasGeometry() -
getParentTransform
Returns a transform that can translate shape-local coordinates to the coordinates of its parent shape -
visitShapes
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
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.
-