Search in sources :

Example 6 with CTConnector

use of org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTConnector in project poi by apache.

the class XSSFShapeGroup method createConnector.

/**
     * Creates a simple shape.  This includes such shapes as lines, rectangles,
     * and ovals.
     *
     * @param anchor the child anchor describes how this shape is attached
     *               to the group.
     * @return the newly created shape.
     */
public XSSFConnector createConnector(XSSFChildAnchor anchor) {
    CTConnector ctShape = ctGroup.addNewCxnSp();
    ctShape.set(XSSFConnector.prototype());
    XSSFConnector shape = new XSSFConnector(getDrawing(), ctShape);
    shape.parent = this;
    shape.anchor = anchor;
    shape.getCTConnector().getSpPr().setXfrm(anchor.getCTTransform2D());
    return shape;
}
Also used : CTConnector(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTConnector)

Aggregations

CTConnector (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTConnector)4 CTNonVisualDrawingProps (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps)2 CTPresetGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D)2 CTShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties)2 CTConnector (org.openxmlformats.schemas.presentationml.x2006.main.CTConnector)2 Rectangle2D (java.awt.geom.Rectangle2D)1 XmlCursor (org.apache.xmlbeans.XmlCursor)1 XmlException (org.apache.xmlbeans.XmlException)1 XmlObject (org.apache.xmlbeans.XmlObject)1 XmlAnyTypeImpl (org.apache.xmlbeans.impl.values.XmlAnyTypeImpl)1 Test (org.junit.Test)1 CTConnection (org.openxmlformats.schemas.drawingml.x2006.main.CTConnection)1 CTFontReference (org.openxmlformats.schemas.drawingml.x2006.main.CTFontReference)1 CTNonVisualConnectorProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualConnectorProperties)1 CTPoint2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D)1 CTPositiveSize2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D)1 CTSchemeColor (org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor)1 CTShapeStyle (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle)1 CTStyleMatrixReference (org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference)1 CTTransform2D (org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D)1