Package com.nomagic.magicreport.format
Class PPTXFormatter
java.lang.Object
com.nomagic.magicreport.format.DefaultFormatter
com.nomagic.magicreport.format.PPTXFormatter
- All Implemented Interfaces:
IFormatter
The Velocity engine support for PPTX.
- Since:
- Dec 29, 2009
-
Field Summary
Fields inherited from class com.nomagic.magicreport.format.DefaultFormatter
properties, styledDocumentFields inherited from interface com.nomagic.magicreport.format.IFormatter
DOT_PER_INCH -
Constructor Summary
ConstructorsConstructorDescriptionPPTXFormatter(ITemplateEngine templateEngine) Create a PPTX formatter with specific properties.PPTXFormatter(Properties properties) Create a PPTX formatter with specific properties. -
Method Summary
Modifier and TypeMethodDescriptionprotected ITool.RetainedStringcreateBookmark(Bookmark bookmark) Create a PPTX bookmark string from givenBookmarkobject.protected StringcreateColumn(Column column) Increase new columns from givenColumnobject.protected ITool.RetainedStringcreateGridRowSpan(GridRowSpan span) Create a PPTX gridrowspan (merge columns vertically) string from givenGridRowSpanobject.protected StringcreateGridSpan(GridSpan span) Create a PPTX gridspan (merge columns horizontally) string from givenGridSpanobject.protected ITool.RetainedStringcreateImage(Image image) Create a PPTX image string from givenImageobject.protected ITool.RetainedStringcreateImage(Image image, float width, float height, int flag) Create a PPTX image string from givenImageobject.protected ITool.RetainedStringcreateLink(Link link) Create a PPTX link string from givenLinkobject.Convert an Object value into PPTX format.float[]Calculation for total paper width and total paper height after minus margin of page.Methods inherited from class com.nomagic.magicreport.format.DefaultFormatter
getImageFlag, getObjectFormater, getProperties, registerObjectFormatter, setProperties, setStyledDocument, writeImage, writeImage, writeImage
-
Constructor Details
-
PPTXFormatter
Create a PPTX formatter with specific properties.- Parameters:
templateEngine- template engine
-
PPTXFormatter
Create a PPTX formatter with specific properties.- Parameters:
properties- template properties
-
-
Method Details
-
format
Convert an Object value into PPTX format.- Specified by:
formatin interfaceIFormatter- Overrides:
formatin classDefaultFormatter- Parameters:
value- converting value- Returns:
- object in default format.
-
createImage
Create a PPTX image string from givenImageobject.- Parameters:
image- anImageobject- Returns:
- The String in PPTX image format.
- Throws:
IOException- when IO error occurs
-
createImage
protected ITool.RetainedString createImage(Image image, float width, float height, int flag) throws IOException Create a PPTX image string from givenImageobject. PPTX always ignoreflagattribute. The image size always automatically fit to text box. And no rotation supports.- Parameters:
image- anImageobjectwidth- the target image widthheight- the target image heightflag- scaling image flag- Returns:
- The String in PPTX image format.
- Throws:
IOException- when IO error occurs
-
getPageSize
public float[] getPageSize()Calculation for total paper width and total paper height after minus margin of page.- Returns:
- float[] array of paper width and paper height
-
createBookmark
Create a PPTX bookmark string from givenBookmarkobject.- Parameters:
bookmark- anBookmarkobject- Returns:
- The String in PPTX bookmark format.
- Throws:
IOException- when IO error occurs
-
createLink
Create a PPTX link string from givenLinkobject.- Parameters:
link- anLinkobject- Returns:
- The String in PPTX link format.
- Throws:
IOException- when IO error occurs
-
createGridSpan
Create a PPTX gridspan (merge columns horizontally) string from givenGridSpanobject.- Parameters:
span- anGridSpanobject- Returns:
- The String in PPT for gridspan format.
-
createColumn
Increase new columns from givenColumnobject.- Parameters:
column- anColumnobject- Returns:
- The String of new columns
-
createGridRowSpan
Create a PPTX gridrowspan (merge columns vertically) string from givenGridRowSpanobject.- Parameters:
span- anGridRowSpanobject- Returns:
- The String in PPTX for gridrowspan format.
-