Class FIXGRIDPDFExporter
java.lang.Object
org.eclnt.jsfserver.elements.util.FIXGRIDPDFExporter
- All Implemented Interfaces:
Serializable,IFIXGRIDPdfExporter
Export of grid content into PDF. The grid's exporter creates an instance
of this class and calls it via the
exportGridToPdf(FIXGRIDBinding, List, List, boolean) method.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterGrid(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed behind the grid.protected voidafterTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed behind the grid.protected voidapplyBackgroundColorStrToCell(String colorString, com.lowagie.text.pdf.PdfPCell cell, Color nullColor) protected voidapplyFontStrToParagraph(com.lowagie.text.Paragraph p, String fontStr) protected voidapplyRowHeightToCell(Float rowHeight, com.lowagie.text.pdf.PdfPCell cell) protected voidapplyTextColorStrToParagraph(String textColorString, com.lowagie.text.Paragraph p) protected voidbeforeGrid(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed in front of the grid.protected voidbeforeTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed in front of the title.protected voidbuildRow(List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, com.lowagie.text.pdf.PdfPTable table, int dataRowIndex, List<String> dataRow, Color rowToggleColor) protected intcalculateColumnWidth(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) Calculation of column width.protected com.lowagie.text.DocumentcreateDocument(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns) Creation of iText document object.protected com.lowagie.text.ParagraphcreateParagraph(String text, com.lowagie.text.Font font, com.lowagie.text.pdf.FontSelector fontSelector) byte[]exportGridToPdf(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data, boolean selctedItemsOnly) Main method for exporting.protected StringfindAlignmentForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindAlignmentForFooterCell(int footerRowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindAlignmentForHeaderCell(int headerRowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindBackgroundColorForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindBackgroundColorForFooterCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindBackgroundColorForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected FloatfindExplicitFooterRowHeight(int rowIndex) protected FloatfindExplicitHeaderRowHeight(int rowIndex) protected FloatfindExplicitRowHeight(int dataRowIndex) protected StringfindFontForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindFontForFooterCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindFontForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindTextColorForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindTextColorForFooterCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.protected StringfindTextColorForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation.floatvoidinitPageSize(float width, float height) Explicit definition of page size.protected Stringprotected voidprintTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) voidsetColorDarkRow(Color value) voidsetColorFooterline(Color value) voidsetColorHeadline(Color value) voidsetColorLightRow(Color value) voidsetColumnSizeFactor(float columnSizeFactor) There is a calculation of column widths which is based in the width definition inside the FIXGRID component.voidsetExportInfoProvider(IFIXGRIDExportInfoProvider exportInfoProvider) Optional call back interface which allows the exporter to get more information about individual data rows/cells.voidsetFontDataline(com.lowagie.text.Font value) voidsetFontFooterline(com.lowagie.text.Font value) voidsetFontHeadline(com.lowagie.text.Font value) voidsetFontselectorDataline(com.lowagie.text.pdf.FontSelector value) voidsetFontselectorFooterline(com.lowagie.text.pdf.FontSelector value) voidsetFontselectorHeadline(com.lowagie.text.pdf.FontSelector value) voidsetFontselectorTitle(com.lowagie.text.pdf.FontSelector value) voidsetFontTitle(com.lowagie.text.Font value) voidsetGridTitle(String title) Setting of title text that is printed before the grid.
-
Field Details
-
FONT_TITLE
public static com.lowagie.text.Font FONT_TITLE -
FONT_HEADLINE
public static com.lowagie.text.Font FONT_HEADLINE -
FONT_FOOTERLINE
public static com.lowagie.text.Font FONT_FOOTERLINE -
FONT_DATALINE
public static com.lowagie.text.Font FONT_DATALINE -
COLOR_HEADLINE
-
COLOR_FOOTERLINE
-
COLOR_LIGHTROW
-
COLOR_DARKROW
-
-
Constructor Details
-
FIXGRIDPDFExporter
public FIXGRIDPDFExporter()
-
-
Method Details
-
initPageSize
public void initPageSize(float width, float height) Description copied from interface:IFIXGRIDPdfExporterExplicit definition of page size. If not called then DIN A4 will be used as page size.- Specified by:
initPageSizein interfaceIFIXGRIDPdfExporter
-
setFontTitle
public void setFontTitle(com.lowagie.text.Font value) - Specified by:
setFontTitlein interfaceIFIXGRIDPdfExporter
-
setFontHeadline
public void setFontHeadline(com.lowagie.text.Font value) - Specified by:
setFontHeadlinein interfaceIFIXGRIDPdfExporter
-
setFontDataline
public void setFontDataline(com.lowagie.text.Font value) - Specified by:
setFontDatalinein interfaceIFIXGRIDPdfExporter
-
setColorHeadline
-
setColorLightRow
-
setColorDarkRow
-
setFontselectorTitle
public void setFontselectorTitle(com.lowagie.text.pdf.FontSelector value) - Specified by:
setFontselectorTitlein interfaceIFIXGRIDPdfExporter
-
setFontselectorHeadline
public void setFontselectorHeadline(com.lowagie.text.pdf.FontSelector value) - Specified by:
setFontselectorHeadlinein interfaceIFIXGRIDPdfExporter
-
setFontselectorDataline
public void setFontselectorDataline(com.lowagie.text.pdf.FontSelector value) - Specified by:
setFontselectorDatalinein interfaceIFIXGRIDPdfExporter
-
setGridTitle
Description copied from interface:IFIXGRIDPdfExporterSetting of title text that is printed before the grid.- Specified by:
setGridTitlein interfaceIFIXGRIDPdfExporter
-
getGridTitle
-
setColumnSizeFactor
public void setColumnSizeFactor(float columnSizeFactor) There is a calculation of column widths which is based in the width definition inside the FIXGRID component. You can influence this calculation by assigning a factor. The calculated width is multiplied with the factor after calculation. The default value of the factor is 1f representing "100%".- Specified by:
setColumnSizeFactorin interfaceIFIXGRIDPdfExporter
-
getColumnSizeFactor
public float getColumnSizeFactor()- Specified by:
getColumnSizeFactorin interfaceIFIXGRIDPdfExporter
-
setExportInfoProvider
Description copied from interface:IFIXGRIDPdfExporterOptional call back interface which allows the exporter to get more information about individual data rows/cells.- Specified by:
setExportInfoProviderin interfaceIFIXGRIDPdfExporter
-
exportGridToPdf
public byte[] exportGridToPdf(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data, boolean selctedItemsOnly) Main method for exporting.- Specified by:
exportGridToPdfin interfaceIFIXGRIDPdfExporter
-
applyBackgroundColorStrToCell
-
applyRowHeightToCell
-
applyFontStrToParagraph
-
buildRow
-
applyTextColorStrToParagraph
-
findExplicitRowHeight
-
findExplicitHeaderRowHeight
-
findBackgroundColorForDataCell
protected String findBackgroundColorForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findBackgroundColorForHeaderCell
protected String findBackgroundColorForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findAlignmentForDataCell
protected String findAlignmentForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findAlignmentForHeaderCell
protected String findAlignmentForHeaderCell(int headerRowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findTextColorForDataCell
protected String findTextColorForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findTextColorForHeaderCell
protected String findTextColorForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findFontForDataCell
protected String findFontForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
findFontForHeaderCell
protected String findFontForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) Cell processing: Explicit possibility to override by an own implementation. -
createDocument
protected com.lowagie.text.Document createDocument(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns) Creation of iText document object. Calculation of size of page according to column widths. -
beforeTitle
protected void beforeTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed in front of the title. -
printTitle
protected void printTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) -
afterTitle
protected void afterTitle(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed behind the grid. -
beforeGrid
protected void beforeGrid(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed in front of the grid. -
afterGrid
protected void afterGrid(com.lowagie.text.Document document, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) Method for adding information to be printed behind the grid. -
calculateColumnWidth
protected int calculateColumnWidth(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) Calculation of column width. -
objectToString
-
createParagraph
protected com.lowagie.text.Paragraph createParagraph(String text, com.lowagie.text.Font font, com.lowagie.text.pdf.FontSelector fontSelector)
-