Package org.apache.poi.xslf.usermodel

Examples of org.apache.poi.xslf.usermodel.XSLFTextRun


      XSLFSlide slide = ppt.createSlide();

      XSLFTextBox shape = slide.createTextBox();
      XSLFTextParagraph p = shape.addNewTextParagraph();

      XSLFTextRun r1 = p.addNewTextRun();
      r1.setText("The");
      r1.setFontColor(Color.blue);
      r1.setFontSize(24);

      XSLFTextRun r2 = p.addNewTextRun();
      r2.setText(" quick");
      r2.setFontColor(Color.red);
      r2.setBold(true);

      XSLFTextRun r3 = p.addNewTextRun();
      r3.setText(" brown");
      r3.setFontSize(12);
      r3.setItalic(true);
      r3.setStrikethrough(true);
     
      XSLFTextRun r4 = p.addNewTextRun();
      r4.setText(" fox");
      r4.setUnderline(true);

      //save changes in a file
    FileOutputStream out = new FileOutputStream("data/Formatted Text_Apache.pptx");
    ppt.write(out);
    out.close();
View Full Code Here


      XSLFSlide slide = ppt.createSlide();

    
      // assign a hyperlink to a text run
      XSLFTextBox shape = slide.createTextBox();
      XSLFTextRun r = shape.addNewTextParagraph().addNewTextRun();
      r.setText("Apache POI");
      XSLFHyperlink link = r.createHyperlink();
      link.setAddress("http://poi.apache.org");
     
      //save changes
      FileOutputStream out = new FileOutputStream("data/Apache_Hyperlink.ppt");
      ppt.write(out);
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.usermodel.XSLFTextRun

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.