Package org.pptx4j.pml

Examples of org.pptx4j.pml.CTGraphicalObjectFrame


    String styleRelId = slidePart.addTargetPart(style).getId();
   
    // Create and add graphicFrame for SmartArt
    Presentation.SldSz tmpSldSz = pMLPackage.getMainPresentationPart().getJaxbElement().getSldSz();
   
    CTGraphicalObjectFrame graphicFrame = createSmartArt( layoutRelId,  dataRelId, colorsRelId,  styleRelId,
        ""+(tmpSldSz.getCx()-200000), ""+(tmpSldSz.getCy()-1000000) );
        // A bit smaller, so we can have a margin around the edge

    slidePart.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(
        graphicFrame);
View Full Code Here


    // instatiation the factory for later object creation.
    org.docx4j.dml.ObjectFactory dmlFactory = new org.docx4j.dml.ObjectFactory();
    org.pptx4j.pml.ObjectFactory pmlFactory = new org.pptx4j.pml.ObjectFactory();

    // Node Creation
    CTGraphicalObjectFrame graphicFrame = pmlFactory
        .createCTGraphicalObjectFrame();
    org.pptx4j.pml.CTGraphicalObjectFrameNonVisual nvGraphicFramePr = pmlFactory
        .createCTGraphicalObjectFrameNonVisual();
    org.docx4j.dml.CTNonVisualDrawingProps cNvPr = dmlFactory
        .createCTNonVisualDrawingProps();
    org.docx4j.dml.CTNonVisualGraphicFrameProperties cNvGraphicFramePr = dmlFactory
        .createCTNonVisualGraphicFrameProperties();
    org.docx4j.dml.CTGraphicalObjectFrameLocking graphicFrameLocks = new org.docx4j.dml.CTGraphicalObjectFrameLocking();
    org.docx4j.dml.CTTransform2D xfrm = dmlFactory.createCTTransform2D();
    Graphic graphic = dmlFactory.createGraphic();
    GraphicData graphicData = dmlFactory.createGraphicData();
   
    // Build the parent-child relationship of this slides.xml
    graphicFrame.setNvGraphicFramePr(nvGraphicFramePr);
    nvGraphicFramePr.setCNvPr(cNvPr);
    cNvPr.setName("1");
    nvGraphicFramePr.setCNvGraphicFramePr(cNvGraphicFramePr);
    cNvGraphicFramePr.setGraphicFrameLocks(graphicFrameLocks);
    graphicFrameLocks.setNoGrp(true);
    nvGraphicFramePr.setNvPr(pmlFactory.createNvPr());
   
//        <p:xfrm>
//        <a:off x="1524000" y="1397000"/>
//        <a:ext cx="6096000" cy="741680"/>
//      </p:xfrm>
    graphicFrame.setXfrm(xfrm);
   
    CTPositiveSize2D ext = dmlFactory.createCTPositiveSize2D();
    ext.setCx(6096000);
    ext.setCy(741680);
   
    xfrm.setExt(ext);
   
    CTPoint2D off = dmlFactory.createCTPoint2D();
    xfrm.setOff(off);
    off.setX(1524000);
    off.setY(1397000);
   
    graphicFrame.setGraphic(graphic);
   
    graphic.setGraphicData(graphicData);
    graphicData
        .setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
       
View Full Code Here

    // instatiation the factory for later object creation.
    org.docx4j.dml.ObjectFactory dmlFactory = new org.docx4j.dml.ObjectFactory();
    org.pptx4j.pml.ObjectFactory pmlFactory = new org.pptx4j.pml.ObjectFactory();

    // Node Creation
    CTGraphicalObjectFrame graphicFrame = pmlFactory
        .createCTGraphicalObjectFrame();
    org.pptx4j.pml.CTGraphicalObjectFrameNonVisual nvGraphicFramePr = pmlFactory
        .createCTGraphicalObjectFrameNonVisual();
    org.docx4j.dml.CTNonVisualDrawingProps cNvPr = dmlFactory
        .createCTNonVisualDrawingProps();
    org.docx4j.dml.CTNonVisualGraphicFrameProperties cNvGraphicFramePr = dmlFactory
        .createCTNonVisualGraphicFrameProperties();
    org.docx4j.dml.CTGraphicalObjectFrameLocking graphicFrameLocks = new org.docx4j.dml.CTGraphicalObjectFrameLocking();
    org.docx4j.dml.CTTransform2D xfrm = dmlFactory.createCTTransform2D();
    Graphic graphic = dmlFactory.createGraphic();
    GraphicData graphicData = dmlFactory.createGraphicData();
   
    // Build the parent-child relationship of this slides.xml
    graphicFrame.setNvGraphicFramePr(nvGraphicFramePr);
    nvGraphicFramePr.setCNvPr(cNvPr);
    cNvPr.setName("1");
    nvGraphicFramePr.setCNvGraphicFramePr(cNvGraphicFramePr);
    cNvGraphicFramePr.setGraphicFrameLocks(graphicFrameLocks);
    graphicFrameLocks.setNoGrp(true);
    nvGraphicFramePr.setNvPr(pmlFactory.createNvPr());
   
//        <p:xfrm>
//        <a:off x="1524000" y="1397000"/>
//        <a:ext cx="6096000" cy="741680"/>
//      </p:xfrm>
    graphicFrame.setXfrm(xfrm);
   
    CTPositiveSize2D ext = dmlFactory.createCTPositiveSize2D();
    ext.setCx(6096000);
    ext.setCy(741680);
   
    xfrm.setExt(ext);
   
    CTPoint2D off = dmlFactory.createCTPoint2D();
    xfrm.setOff(off);
    off.setX(1524000);
    off.setY(1397000);
   
    graphicFrame.setGraphic(graphic);
   
    graphic.setGraphicData(graphicData);
    graphicData
        .setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
       
View Full Code Here

TOP

Related Classes of org.pptx4j.pml.CTGraphicalObjectFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.