Class DataTablePDFExporter
- java.lang.Object
-
- org.primefaces.component.export.Exporter<T>
-
- org.primefaces.component.export.TableExporter<DataTable>
-
- 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 void
addColumnFacets(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
protected boolean
addColumnGroup(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
protected com.lowagie.text.pdf.PdfPCell
addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, String value, int rowSpan, int colSpan)
protected void
addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, javax.faces.component.UIComponent component)
protected void
addColumnValue(DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, List<javax.faces.component.UIComponent> components, com.lowagie.text.Font font, UIColumn column)
protected void
addEmptyLine(com.lowagie.text.Paragraph paragraph, int number)
protected void
addTableFacets(javax.faces.context.FacesContext context, DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, DataTableExporter.ColumnType columnType)
protected void
applyCellOptions(ExporterOptions options)
protected com.lowagie.text.pdf.PdfPCell
applyColumnAlignments(UIColumn column, com.lowagie.text.pdf.PdfPCell cell)
protected void
applyFacetOptions(ExporterOptions options)
protected void
applyFont(String fontName, String encoding)
protected com.lowagie.text.pdf.PdfPCell
createCell(UIColumn column, com.lowagie.text.Phrase phrase)
protected com.lowagie.text.Document
createDocument()
protected void
doExport(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration exportConfiguration, int index)
Export datatableprotected void
exportCells(DataTable table, Object document)
protected com.lowagie.text.pdf.PdfPTable
exportTable(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration config)
protected int
getColumnsCount(DataTable table)
String
getContentType()
Content-type (MIME-type) excluding charset.protected com.lowagie.text.Document
getDocument()
String
getFileExtension()
File-extension of the exported file including a leading dot.protected void
postExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)
protected void
preExport(javax.faces.context.FacesContext context, ExportConfiguration exportConfiguration)
protected void
setFontStyle(com.lowagie.text.Font cellFont, String cellFontStyle)
-
Methods inherited from class org.primefaces.component.datatable.export.DataTableExporter
export, exportAll, exportColumnByFunction, exportPageOnly, exportRow, exportRow, exportSelectionOnly, getOutputStream, hasColumnFooter, postRowExport, preRowExport
-
Methods inherited from class org.primefaces.component.export.TableExporter
exportColumn, getExportableColumns
-
Methods inherited from class org.primefaces.component.export.Exporter
exportValue
-
-
-
-
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:
preExport
in classDataTableExporter
- Throws:
IOException
-
doExport
protected void doExport(javax.faces.context.FacesContext context, DataTable table, ExportConfiguration exportConfiguration, int index) throws IOException
Description copied from class:DataTableExporter
Export datatable- Specified by:
doExport
in 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:
postExport
in classDataTableExporter
- Throws:
IOException
-
getContentType
public String getContentType()
Description copied from class:Exporter
Content-type (MIME-type) excluding charset. (eg 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')- Specified by:
getContentType
in classExporter<DataTable>
-
getFileExtension
public String getFileExtension()
Description copied from class:Exporter
File-extension of the exported file including a leading dot. (eg '.xlsx')- Specified by:
getFileExtension
in classExporter<DataTable>
-
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:
exportCells
in 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)
-
-