Package org.apache.poi.hslf.usermodel

Examples of org.apache.poi.hslf.usermodel.SlideShow.createSlide()


public final class CreateHyperlink {

    public static void main(String[] args) throws Exception {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        TextBox shape = new TextBox();
        shape.setText("Apache POI");
        Rectangle anchor = new Rectangle(100, 100, 200, 50);
        shape.setAnchor(anchor);
View Full Code Here


      POIFSFileSystem poiData1 = new POIFSFileSystem(is);
      is.close();
     
      int oleObjectId1 = ppt.addEmbed(poiData1);
     
      Slide slide1 = ppt.createSlide();
      OLEShape oleShape1 = new OLEShape(pictId);
      oleShape1.setObjectID(oleObjectId1);
      slide1.addShape(oleShape1);
      oleShape1.setAnchor(new Rectangle2D.Double(100,100,100,100));
     
View Full Code Here

      oleShape1.setObjectID(oleObjectId1);
      slide1.addShape(oleShape1);
      oleShape1.setAnchor(new Rectangle2D.Double(100,100,100,100));
     
      // add second slide with different order in object creation
      Slide slide2 = ppt.createSlide();
      OLEShape oleShape2 = new OLEShape(pictId);

        is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("SimpleWithImages.xls");
        POIFSFileSystem poiData2 = new POIFSFileSystem(is);
        is.close();
View Full Code Here

    }
  }
 
  public void testSSSlideInfoAtom() throws Exception {
    SlideShow ss = new SlideShow();
    org.apache.poi.hslf.model.Slide  slide1 = ss.createSlide(), slide2 = ss.createSlide();
    slide2.setHidden(true);

    ByteArrayOutputStream bos = new ByteArrayOutputStream(4096);
    ss.write(bos);
    ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
View Full Code Here

    }
  }
 
  public void testSSSlideInfoAtom() throws Exception {
    SlideShow ss = new SlideShow();
    org.apache.poi.hslf.model.Slide  slide1 = ss.createSlide(), slide2 = ss.createSlide();
    slide2.setHidden(true);

    ByteArrayOutputStream bos = new ByteArrayOutputStream(4096);
    ss.write(bos);
    ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
View Full Code Here

     * Test that ShapeFactory works properly and returns <code>Table</code>
     */
    public void testShapeFactory() throws Exception {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        Table tbl = new Table(2, 5);
        slide.addShape(tbl);

        TableCell cell = tbl.getCell(0, 0);
View Full Code Here

    /**
     * Error constructing Table when rownum=1
     */
    public void test45889(){
        SlideShow ppt = new SlideShow();
        Slide slide = ppt.createSlide();
        Shape[] shapes;
        Table tbl1 = new Table(1, 5);
        assertEquals(5, tbl1.getNumberOfColumns());
        assertEquals(1, tbl1.getNumberOfRows());
        slide.addShape(tbl1);
View Full Code Here

     */
    public void testMultiplePictures() throws Exception {
        String cwd = System.getProperty("HSLF.testdata.path");
        SlideShow ppt = new SlideShow();

        Slide s = ppt.createSlide();
        Slide s2 = ppt.createSlide();
        Slide s3 = ppt.createSlide();

        int idx = ppt.addPicture(new File(cwd, "clock.jpg"), Picture.JPEG);
        Picture pict = new Picture(idx);
View Full Code Here

    public void testMultiplePictures() throws Exception {
        String cwd = System.getProperty("HSLF.testdata.path");
        SlideShow ppt = new SlideShow();

        Slide s = ppt.createSlide();
        Slide s2 = ppt.createSlide();
        Slide s3 = ppt.createSlide();

        int idx = ppt.addPicture(new File(cwd, "clock.jpg"), Picture.JPEG);
        Picture pict = new Picture(idx);
        Picture pict2 = new Picture(idx);
View Full Code Here

        String cwd = System.getProperty("HSLF.testdata.path");
        SlideShow ppt = new SlideShow();

        Slide s = ppt.createSlide();
        Slide s2 = ppt.createSlide();
        Slide s3 = ppt.createSlide();

        int idx = ppt.addPicture(new File(cwd, "clock.jpg"), Picture.JPEG);
        Picture pict = new Picture(idx);
        Picture pict2 = new Picture(idx);
        Picture pict3 = new Picture(idx);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.