|
||
There are three ways to start working with a presentation:
1. Start a presentation from scratch
2. Open an existing presentation using a supplied file or input stream
3. Copy an existing presentation
Creating a presentation in this way opens a presentation with one blank slide and a single master slide. To create a new presentation from scratch, use the constructor:
Presentation()
To create a new presentation and a single slide with a particular autolayout, use the constructor
Presentation(int autolayout)
All other presentation elements need to be created from scratch, which can be complex and time-consuming. It is most often easier to use a template presentation as the basis for your new presentation.
This approach allows you to use an existing PowerPoint file as the basis of your new presentation. When creating presentations, it is recommended that a template presentation is first created using PowerPoint and then loaded, rather than creating a presentation from scratch.
This allows you to use PowerPoint's WYSIWYG tools to create and manipulate the static elements you need, and focus on using the Builder to programmatically create the dynamic elements.
To open an existing presentation with a supplied file use one of these methods:
Presentation(java.io.File f) Presentation(java.io.File f, boolean useNio)
To open an existing presentation from a supplied input stream use:
Presentation(java.io.InputStream in)
Opening from an input stream is chiefly used for web applications.
This approach creates a copy of a presentation that you have been working with so that you can use it as the basis of a new presentation. To create a copy of an existing presentation use:
Presentation(Presentation p)
|
||
| Page generated: 2008-01-18 02:53:28 GMT | TonicPoint Builder Developer's Guide -- Version 2.3 |