Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public enum Presentation.Format
- Object
- Enum<Presentation.Format>
- Presentation.Format
ImplementsComparable<Presentation.Format>
The formats a presentation is read from and written to.
Enum constants
NATIVE | Codename One’s own .cn1slides: a ZIP holding presentation.xml, with each text box in the .cn1doc vocabulary. |
PPTX | Office Open XML, the format of PowerPoint 2007 and later. |
ODP | OpenDocument presentation, the format of LibreOffice Impress and Keynote’s export. |
KEY | Apple Keynote 2013 and later (.key). |
PPT | PowerPoint 97-2003 (.ppt). |
PDF | PDF, one page per visible slide. |
Methods
public static Presentation.Format[] values() | |
public static Presentation.Format valueOf(String name) | |
public String extension() | The file extension without a dot. |
public boolean canRead() | True when a presentation can be read from this format. |
public boolean canWrite() | True when a presentation can be written in this format. |
public static Presentation.Format forFileName(String fileName) | The format a file name’s extension names, ignoring case. |
Inherited methods
Enum constant details
NATIVE
NATIVECodename One’s own
.cn1slides: a ZIP holding presentation.xml, with each text
box in the .cn1doc vocabulary. Keeps everything the model holds, diagrams
included.PPTX
PPTXOffice Open XML, the format of PowerPoint 2007 and later. Reads and writes shapes
with preset geometry, fills, outlines and arrowheads, text with layout and master
placeholder inheritance, pictures with cropping, tables with merged cells, groups,
charts, speaker notes, transitions and entrance/exit animations. A diagram is
written as a group of shapes.
ODP
ODPOpenDocument presentation, the format of LibreOffice Impress and Keynote’s
export. Reads and writes the same features as PPTX.
KEY
KEYApple Keynote 2013 and later (
.key). Read only: slides, text boxes and
placeholders with their text, shapes, pictures and speaker notes are read from the
package’s archived objects. What cannot be decoded is listed in getWarnings().PPT
PPTPowerPoint 97-2003 (
.ppt). Read only: text, shapes, pictures, notes and slide
backgrounds.PDFPDF, one page per visible slide. Write only.
Method details
values
public static Presentation.Format[] values()valueOf
public static Presentation.Format valueOf(String name)extension
public String extension()The file extension without a dot.
Returns
the extension
canRead
public boolean canRead()True when a presentation can be read from this format.
Returns
true when readable
canWrite
public boolean canWrite()True when a presentation can be written in this format.
Returns
true when writable
forFileName
public static Presentation.Format forFileName(String fileName)The format a file name’s extension names, ignoring case.
Parameters
fileNameString- the name
Returns
the format, or null when the extension is not a presentation format