Example usage for org.apache.poi.xslf.usermodel XSLFTextShape setPlaceholder

List of usage examples for org.apache.poi.xslf.usermodel XSLFTextShape setPlaceholder

Introduction

In this page you can find the example usage for org.apache.poi.xslf.usermodel XSLFTextShape setPlaceholder.

Prototype

@Override
    public void setPlaceholder(Placeholder placeholder) 

Source Link

Usage

From source file:poi.xslf.usermodel.Tutorial3.java

License:Apache License

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

    XSLFSlide slide = ppt.createSlide();

    XSLFTextShape titleShape = slide.createTextBox();
    titleShape.setPlaceholder(Placeholder.TITLE);
    titleShape.setText("This is a slide title");
    titleShape.setAnchor(new Rectangle(50, 50, 400, 100));

    FileOutputStream out = new FileOutputStream("title.pptx");
    ppt.write(out);/*from  w  ww.  j  av  a2  s. c o m*/
    out.close();
}