FileDocCategorySizeDatePackage
BulletsDemo.javaAPI DocApache Poi 3.0.12331Thu May 31 18:45:30 BST 2007org.apache.poi.hslf.examples

BulletsDemo

public class BulletsDemo extends Object
How to create a single-level bulleted list and change some of the bullet attributes
author
Yegor Kozlov

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        TextBox shape = new TextBox();
        RichTextRun rt = shape.getTextRun().getRichTextRuns()[0];
        shape.setText(
                "January\r" +
                "February\r" +
                "March\r" +
                "April");
        rt.setFontSize(42);
        rt.setBullet(true);
        rt.setBulletOffset(0);  //bullet offset
        rt.setTextOffset(50);   //text offset (should be greater than bullet offset)
        rt.setBulletChar('\u263A"); //bullet character
        slide.addShape(shape);

        shape.setAnchor(new java.awt.Rectangle(50, 50, 500, 300));  //position of the text box in the slide
        slide.addShape(shape);

        FileOutputStream out = new FileOutputStream("bullets.ppt");
        ppt.write(out);
        out.close();