Package org.docx4j.dml

Examples of org.docx4j.dml.GraphicData


    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");
       
    CTTable ctTable = dmlFactory.createCTTable();
    JAXBElement<CTTable> tbl = dmlFactory.createTbl(ctTable);
    graphicData.getAny().add(tbl);
   
    CTTableGrid ctTableGrid = dmlFactory.createCTTableGrid();   
    CTTableCol gridCol = dmlFactory.createCTTableCol();
    ctTable.setTblGrid(ctTableGrid);
    ctTableGrid.getGridCol().add(gridCol);
View Full Code Here


    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");
       
    CTTable ctTable = dmlFactory.createCTTable();
    JAXBElement<CTTable> tbl = dmlFactory.createTbl(ctTable);
    graphicData.getAny().add(tbl);
   
    CTTableGrid ctTableGrid = dmlFactory.createCTTableGrid();   
    CTTableCol gridCol = dmlFactory.createCTTableCol();
    ctTable.setTblGrid(ctTableGrid);
    ctTableGrid.getGridCol().add(gridCol);
View Full Code Here

TOP

Related Classes of org.docx4j.dml.GraphicData

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.