Package org.openxmlformats.schemas.drawingml.x2006.picture

Examples of org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture


    if(! chart.isSetTitle()) {
      return null;
    }

    // TODO Do properly
    CTTitle title = chart.getTitle();

    StringBuffer text = new StringBuffer();
    XmlObject[] t = title
      .selectPath("declare namespace a='"+XSSFDrawing.NAMESPACE_A+"' .//a:t");
    for (int m = 0; m < t.length; m++) {
      NodeList kids = t[m].getDomNode().getChildNodes();
      for (int n = 0; n < kids.getLength(); n++) {
        if (kids.item(n) instanceof Text) {
View Full Code Here


         
          CTNonVisualPictureProperties cNvPicPr = nvPicPr.addNewCNvPicPr();
          cNvPicPr.addNewPicLocks().setNoChangeAspect(true);
         
          CTBlipFillProperties blipFill = pic.addNewBlipFill();
          CTBlip blip = blipFill.addNewBlip();
          blip.setEmbed( picData.getPackageRelationship().getId() );
          blipFill.addNewStretch().addNewFillRect();
         
          CTShapeProperties spPr = pic.addNewSpPr();
          CTTransform2D xfrm = spPr.addNewXfrm();
         
View Full Code Here

          cNvPr.setDescr(filename);
         
          CTNonVisualPictureProperties cNvPicPr = nvPicPr.addNewCNvPicPr();
          cNvPicPr.addNewPicLocks().setNoChangeAspect(true);
         
          CTBlipFillProperties blipFill = pic.addNewBlipFill();
          CTBlip blip = blipFill.addNewBlip();
          blip.setEmbed( picData.getPackageRelationship().getId() );
          blipFill.addNewStretch().addNewFillRect();
         
          CTShapeProperties spPr = pic.addNewSpPr();
          CTTransform2D xfrm = spPr.addNewXfrm();
         
          CTPoint2D off = xfrm.addNewOff();
View Full Code Here

            nvProps.setName("Picture 1");
            nvProps.setDescr("Picture");
            CTNonVisualPictureProperties nvPicProps = nvpr.addNewCNvPicPr();
            nvPicProps.addNewPicLocks().setNoChangeAspect(true);

            CTBlipFillProperties blip = pic.addNewBlipFill();
            blip.addNewBlip().setEmbed("");
            blip.addNewStretch().addNewFillRect();

            CTShapeProperties sppr = pic.addNewSpPr();
            CTTransform2D t2d = sppr.addNewXfrm();
            CTPositiveSize2D ext = t2d.addNewExt();
            //should be original picture width and height expressed in EMUs
View Full Code Here

            nvProps.setName("Picture 1");
            nvProps.setDescr("Picture");
            CTNonVisualPictureProperties nvPicProps = nvpr.addNewCNvPicPr();
            nvPicProps.addNewPicLocks().setNoChangeAspect(true);

            CTBlipFillProperties blip = pic.addNewBlipFill();
            blip.addNewBlip().setEmbed("");
            blip.addNewStretch().addNewFillRect();

            CTShapeProperties sppr = pic.addNewSpPr();
            CTTransform2D t2d = sppr.addNewXfrm();
            CTPositiveSize2D ext = t2d.addNewExt();
            //should be original picture width and height expressed in EMUs
View Full Code Here

        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
                    if (ctColor.getSrgbClr() != null) {
                       // Colour is a regular one
                       rgb = ctColor.getSrgbClr().getVal();
                    } else if (ctColor.getSysClr() != null) {
                       // Colour is a tint of white or black
                       rgb = ctColor.getSysClr().getLastClr();
                    }

                    return new XSSFColor(rgb);
                }
                cnt++;
View Full Code Here

        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
                    if (ctColor.getSrgbClr() != null) {
                       // Colour is a regular one
                       rgb = ctColor.getSrgbClr().getVal();
                    } else if (ctColor.getSysClr() != null) {
                       // Colour is a tint of white or black
                       rgb = ctColor.getSysClr().getLastClr();
                    }

                    return new XSSFColor(rgb);
                }
                cnt++;
View Full Code Here

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

    public ThemesTable(ThemeDocument theme) {
        this.theme = theme;
    }

    public XSSFColor getThemeColor(int idx) {
        CTColorScheme colorScheme = theme.getTheme().getThemeElements().getClrScheme();
        CTColor ctColor = null;
        int cnt = 0;
        for (XmlObject obj : colorScheme.selectPath("./*")) {
            if (obj instanceof org.openxmlformats.schemas.drawingml.x2006.main.CTColor) {
                if (cnt == idx) {
                    ctColor = (org.openxmlformats.schemas.drawingml.x2006.main.CTColor) obj;
                   
                    byte[] rgb = null;
View Full Code Here

      extPoint.setCx(0);
      extPoint.setCy(0);
      offPoint.setX(0);
      offPoint.setY(0);

      CTGraphicalObject graphic = graphicFrame.addNewGraphic();

      prototype = graphicFrame;
    }
    return prototype;
  }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture

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.