Class DataTablePDFExporter
- java.lang.Object
-
- org.primefaces.component.datatable.export.DataTableExporter
-
- org.primefaces.component.datatable.export.DataTablePDFExporter
-
public class DataTablePDFExporter extends DataTableExporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.primefaces.component.datatable.export.DataTableExporter
DataTableExporter.ColumnType
-
-
Constructor Summary
Constructors Constructor Description DataTablePDFExporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddColumnFacets(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)protected booleanaddColumnGroup(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)protected com.lowagie.text.pdf.PdfPCelladdColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, String value, int rowSpan, int colSpan)protected voidaddColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, javax.faces.component.UIComponent component)protected voidaddColumnValue(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, List<javax.faces.component.UIComponent> components, com.lowagie.text.Font font, UIColumn column)protected voidaddEmptyLine(com.lowagie.text.Paragraph paragraph, int number)protected voidaddTableFacets(javax.faces.context.FacesContext context, DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)protected voidapplyCellOptions(ExporterOptions options)protected com.lowagie.text.pdf.PdfPCellapplyColumnAlignments(UIColumn column, com.lowagie.text.pdf.PdfPCell cell)protected voidapplyFacetOptions(ExporterOptions options)protected voidapplyFont(String fontName, String encoding)protected com.lowagie.text.pdf.PdfPCellcreateCell(UIColumn column, com.lowagie.text.Phrase phrase)protected com.lowagie.text.DocumentcreateDocument()protected voiddoExport(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration exportConfiguration, int index)Export datatableprotected voidexportCells(DataTable table, Object document)protected com.lowagie.text.pdf.PdfPTableexportTable(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration config)protected intgetColumnsCount(DataTable table)StringgetContentType()Content-type (MIME-type) excluding charset.protected com.lowagie.text.DocumentgetDocument()StringgetFileExtension()File-extension of the exported file including a leading dot.protected voidpostExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)protected voidpreExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)protected voidsetFontStyle(com.lowagie.text.Font cellFont, String cellFontStyle)-
Methods inherited from class org.primefaces.component.datatable.export.DataTableExporter
export, exportAll, exportColumnByFunction, exportPageOnly, exportRow, exportRow, exportSelectionOnly, exportValue, getColumnsToExport, getOutputStream, hasColumnFooter, postRowExport, preRowExport
-
-
-
-
Method Detail
-
createDocument
protected com.lowagie.text.Document createDocument()
-
getDocument
protected com.lowagie.text.Document getDocument()
-
preExport
protected void preExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration) throws IOException- Overrides:
preExportin classDataTableExporter- Throws:
IOException
-
doExport
protected void doExport(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration exportConfiguration, int index) throws IOExceptionDescription copied from class:DataTableExporterExport datatable- Specified by:
doExportin classDataTableExporter- Parameters:
context- faces contexttable- datatable to exportexportConfiguration- export configurationindex- datatable current index during export process- Throws:
IOException
-
postExport
protected void postExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration) throws IOException- Overrides:
postExportin classDataTableExporter- Throws:
IOException
-
getContentType
public String getContentType()
Description copied from interface:ExporterContent-type (MIME-type) excluding charset. (eg 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
-
getFileExtension
public String getFileExtension()
Description copied from interface:ExporterFile-extension of the exported file including a leading dot. (eg '.xlsx')
-
exportTable
protected com.lowagie.text.pdf.PdfPTable exportTable(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration config)
-
addTableFacets
protected void addTableFacets(javax.faces.context.FacesContext context, DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
-
exportCells
protected void exportCells(DataTable table, Object document)
- Specified by:
exportCellsin classDataTableExporter
-
addColumnFacets
protected void addColumnFacets(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
-
addColumnGroup
protected boolean addColumnGroup(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
-
addColumnValue
protected void addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, javax.faces.component.UIComponent component)
-
addColumnValue
protected com.lowagie.text.pdf.PdfPCell addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, String value, int rowSpan, int colSpan)
-
addColumnValue
protected void addColumnValue(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, List<javax.faces.component.UIComponent> components, com.lowagie.text.Font font, UIColumn column)
-
getColumnsCount
protected int getColumnsCount(DataTable table)
-
addEmptyLine
protected void addEmptyLine(com.lowagie.text.Paragraph paragraph, int number)
-
applyFacetOptions
protected void applyFacetOptions(ExporterOptions options)
-
applyCellOptions
protected void applyCellOptions(ExporterOptions options)
-
setFontStyle
protected void setFontStyle(com.lowagie.text.Font cellFont, String cellFontStyle)
-
createCell
protected com.lowagie.text.pdf.PdfPCell createCell(UIColumn column, com.lowagie.text.Phrase phrase)
-
applyColumnAlignments
protected com.lowagie.text.pdf.PdfPCell applyColumnAlignments(UIColumn column, com.lowagie.text.pdf.PdfPCell cell)
-
-