org.eclnt.jsfserver.elements.util

## Class FIXGRIDPDFExporter

- java.lang.Object
- - org.eclnt.jsfserver.elements.util.FIXGRIDPDFExporter

- All Implemented Interfaces:
    java.io.Serializable, IFIXGRIDPdfExporter

      public class FIXGRIDPDFExporter
      extends java.lang.Object
      implements IFIXGRIDPdfExporter, java.io.Serializable

  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:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.awt.Color` | `COLOR_DARKROW`
    `static java.awt.Color` | `COLOR_FOOTERLINE`
    `static java.awt.Color` | `COLOR_HEADLINE`
    `static java.awt.Color` | `COLOR_LIGHTROW`
    `static Font` | `FONT_DATALINE`
    `static Font` | `FONT_FOOTERLINE`
    `static Font` | `FONT_HEADLINE`
    `static Font` | `FONT_TITLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FIXGRIDPDFExporter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `afterGrid(Document document, FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data)` Method for adding information to be printed behind the grid.
    `protected void` | `afterTitle(Document document, FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data)` Method for adding information to be printed behind the grid.
    `protected void` | `applyBackgroundColorStrToCell(java.lang.String colorString, PdfPCell cell, java.awt.Color nullColor)`
    `protected void` | `applyFontStrToParagraph(Paragraph p, java.lang.String fontStr)`
    `protected void` | `applyRowHeightToCell(java.lang.Float rowHeight, PdfPCell cell)`
    `protected void` | `applyTextColorStrToParagraph(java.lang.String textColorString, Paragraph p)`
    `protected void` | `beforeGrid(Document document, FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data)` Method for adding information to be printed in front of the grid.
    `protected void` | `beforeTitle(Document document, FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data)` Method for adding information to be printed in front of the title.
    `protected void` | `buildRow(java.util.List<ColumnInfo> columns, PdfPTable table, int dataRowIndex, java.util.List<java.lang.String> dataRow, java.awt.Color rowToggleColor)`
    `protected int` | `calculateColumnWidth(ColumnInfo ci)` Calculation of column width.
    `protected Document` | `createDocument(FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns)` Creation of iText document object.
    `protected Paragraph` | `createParagraph(java.lang.String text, Font font, FontSelector fontSelector)`
    `byte[]` | `exportGridToPdf(FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data, boolean selctedItemsOnly)` Main method for exporting.
    `protected java.lang.String` | `findAlignmentForDataCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findAlignmentForFooterCell(int footerRowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findAlignmentForHeaderCell(int headerRowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findBackgroundColorForDataCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findBackgroundColorForFooterCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findBackgroundColorForHeaderCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.Float` | `findExplicitFooterRowHeight(int rowIndex)`
    `protected java.lang.Float` | `findExplicitHeaderRowHeight(int rowIndex)`
    `protected java.lang.Float` | `findExplicitRowHeight(int dataRowIndex)`
    `protected java.lang.String` | `findFontForDataCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findFontForFooterCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findFontForHeaderCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findTextColorForDataCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findTextColorForFooterCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `protected java.lang.String` | `findTextColorForHeaderCell(int rowIndex, java.lang.String dataCellValue, ColumnInfo column)` Cell processing: Explicit possibility to override by an own implementation.
    `float` | `getColumnSizeFactor()`
    `java.lang.String` | `getGridTitle()`
    `void` | `initPageSize(float width, float height)` Explicit definition of page size.
    `protected java.lang.String` | `objectToString(java.lang.String s)`
    `protected void` | `printTitle(Document document, FIXGRIDBinding fixgrid, java.util.List<ColumnInfo> columns, java.util.List<java.util.List<java.lang.String>> data)`
    `void` | `setColorDarkRow(java.awt.Color value)`
    `void` | `setColorFooterline(java.awt.Color value)`
    `void` | `setColorHeadline(java.awt.Color value)`
    `void` | `setColorLightRow(java.awt.Color value)`
    `void` | `setColumnSizeFactor(float columnSizeFactor)` There is a calculation of column widths which is based in the width definition inside the FIXGRID component.
    `void` | `setExportInfoProvider(IFIXGRIDExportInfoProvider exportInfoProvider)` Optional call back interface which allows the exporter to get more information about individual data rows/cells.
    `void` | `setFontDataline(Font value)`
    `void` | `setFontFooterline(Font value)`
    `void` | `setFontHeadline(Font value)`
    `void` | `setFontselectorDataline(FontSelector value)`
    `void` | `setFontselectorFooterline(FontSelector value)`
    `void` | `setFontselectorHeadline(FontSelector value)`
    `void` | `setFontselectorTitle(FontSelector value)`
    `void` | `setFontTitle(Font value)`
    `void` | `setGridTitle(java.lang.String title)` Setting of title text that is printed before the grid.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FONT_TITLE

          public static Font FONT_TITLE

    - #### FONT_HEADLINE

          public static Font FONT_HEADLINE

    - #### FONT_FOOTERLINE

          public static Font FONT_FOOTERLINE

    - #### FONT_DATALINE

          public static Font FONT_DATALINE

    - #### COLOR_HEADLINE

          public static java.awt.Color COLOR_HEADLINE

    - #### COLOR_FOOTERLINE

          public static java.awt.Color COLOR_FOOTERLINE

    - #### COLOR_LIGHTROW

          public static java.awt.Color COLOR_LIGHTROW

    - #### COLOR_DARKROW

          public static java.awt.Color COLOR_DARKROW

  - ### Constructor Detail

    - #### FIXGRIDPDFExporter

          public FIXGRIDPDFExporter()

  - ### Method Detail

    - #### initPageSize

          public void initPageSize(float width,
                                   float height)

      Description copied from interface: `IFIXGRIDPdfExporter`
      Explicit definition of page size. If not called then DIN A4 will be used as page size.
      Specified by:
        `initPageSize` in interface `IFIXGRIDPdfExporter`

    - #### setFontTitle

          public void setFontTitle(Font value)

      Specified by:
        `setFontTitle` in interface `IFIXGRIDPdfExporter`

    - #### setFontHeadline

          public void setFontHeadline(Font value)

      Specified by:
        `setFontHeadline` in interface `IFIXGRIDPdfExporter`

    - #### setFontFooterline

          public void setFontFooterline(Font value)

      Specified by:
        `setFontFooterline` in interface `IFIXGRIDPdfExporter`

    - #### setFontDataline

          public void setFontDataline(Font value)

      Specified by:
        `setFontDataline` in interface `IFIXGRIDPdfExporter`

    - #### setColorHeadline

          public void setColorHeadline(java.awt.Color value)

    - #### setColorFooterline

          public void setColorFooterline(java.awt.Color value)

    - #### setColorLightRow

          public void setColorLightRow(java.awt.Color value)

    - #### setColorDarkRow

          public void setColorDarkRow(java.awt.Color value)

    - #### setFontselectorTitle

          public void setFontselectorTitle(FontSelector value)

      Specified by:
        `setFontselectorTitle` in interface `IFIXGRIDPdfExporter`

    - #### setFontselectorHeadline

          public void setFontselectorHeadline(FontSelector value)

      Specified by:
        `setFontselectorHeadline` in interface `IFIXGRIDPdfExporter`

    - #### setFontselectorFooterline

          public void setFontselectorFooterline(FontSelector value)

      Specified by:
        `setFontselectorFooterline` in interface `IFIXGRIDPdfExporter`

    - #### setFontselectorDataline

          public void setFontselectorDataline(FontSelector value)

      Specified by:
        `setFontselectorDataline` in interface `IFIXGRIDPdfExporter`

    - #### setGridTitle

          public void setGridTitle(java.lang.String title)

      Description copied from interface: `IFIXGRIDPdfExporter`
      Setting of title text that is printed before the grid.
      Specified by:
        `setGridTitle` in interface `IFIXGRIDPdfExporter`

    - #### getGridTitle

          public java.lang.String 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:
        `setColumnSizeFactor` in interface `IFIXGRIDPdfExporter`

    - #### getColumnSizeFactor

          public float getColumnSizeFactor()

      Specified by:
        `getColumnSizeFactor` in interface `IFIXGRIDPdfExporter`

    - #### setExportInfoProvider

          public void setExportInfoProvider(IFIXGRIDExportInfoProvider exportInfoProvider)

      Description copied from interface: `IFIXGRIDPdfExporter`
      Optional call back interface which allows the exporter to get more information about individual data rows/cells.
      Specified by:
        `setExportInfoProvider` in interface `IFIXGRIDPdfExporter`

    - #### exportGridToPdf

          public byte[] exportGridToPdf(FIXGRIDBinding fixgrid,
                                        java.util.List<ColumnInfo> columns,
                                        java.util.List<java.util.List<java.lang.String>> data,
                                        boolean selctedItemsOnly)

      Main method for exporting.
      Specified by:
        `exportGridToPdf` in interface `IFIXGRIDPdfExporter`

    - #### applyBackgroundColorStrToCell

          protected void applyBackgroundColorStrToCell(java.lang.String colorString,
                                                       PdfPCell cell,
                                                       java.awt.Color nullColor)

    - #### applyRowHeightToCell

          protected void applyRowHeightToCell(java.lang.Float rowHeight,
                                              PdfPCell cell)

    - #### applyFontStrToParagraph

          protected void applyFontStrToParagraph(Paragraph p,
                                                 java.lang.String fontStr)

    - #### buildRow

          protected void buildRow(java.util.List<ColumnInfo> columns,
                                  PdfPTable table,
                                  int dataRowIndex,
                                  java.util.List<java.lang.String> dataRow,
                                  java.awt.Color rowToggleColor)

    - #### applyTextColorStrToParagraph

          protected void applyTextColorStrToParagraph(java.lang.String textColorString,
                                                      Paragraph p)

    - #### findExplicitRowHeight

          protected java.lang.Float findExplicitRowHeight(int dataRowIndex)

    - #### findExplicitHeaderRowHeight

          protected java.lang.Float findExplicitHeaderRowHeight(int rowIndex)

    - #### findExplicitFooterRowHeight

          protected java.lang.Float findExplicitFooterRowHeight(int rowIndex)

    - #### findBackgroundColorForDataCell

          protected java.lang.String findBackgroundColorForDataCell(int rowIndex,
                                                                    java.lang.String dataCellValue,
                                                                    ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findBackgroundColorForHeaderCell

          protected java.lang.String findBackgroundColorForHeaderCell(int rowIndex,
                                                                      java.lang.String dataCellValue,
                                                                      ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findBackgroundColorForFooterCell

          protected java.lang.String findBackgroundColorForFooterCell(int rowIndex,
                                                                      java.lang.String dataCellValue,
                                                                      ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findAlignmentForDataCell

          protected java.lang.String findAlignmentForDataCell(int rowIndex,
                                                              java.lang.String dataCellValue,
                                                              ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findAlignmentForHeaderCell

          protected java.lang.String findAlignmentForHeaderCell(int headerRowIndex,
                                                                java.lang.String dataCellValue,
                                                                ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findAlignmentForFooterCell

          protected java.lang.String findAlignmentForFooterCell(int footerRowIndex,
                                                                java.lang.String dataCellValue,
                                                                ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findTextColorForDataCell

          protected java.lang.String findTextColorForDataCell(int rowIndex,
                                                              java.lang.String dataCellValue,
                                                              ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findTextColorForHeaderCell

          protected java.lang.String findTextColorForHeaderCell(int rowIndex,
                                                                java.lang.String dataCellValue,
                                                                ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findTextColorForFooterCell

          protected java.lang.String findTextColorForFooterCell(int rowIndex,
                                                                java.lang.String dataCellValue,
                                                                ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findFontForDataCell

          protected java.lang.String findFontForDataCell(int rowIndex,
                                                         java.lang.String dataCellValue,
                                                         ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findFontForHeaderCell

          protected java.lang.String findFontForHeaderCell(int rowIndex,
                                                           java.lang.String dataCellValue,
                                                           ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### findFontForFooterCell

          protected java.lang.String findFontForFooterCell(int rowIndex,
                                                           java.lang.String dataCellValue,
                                                           ColumnInfo column)

      Cell processing: Explicit possibility to override by an own implementation.

    - #### createDocument

          protected Document createDocument(FIXGRIDBinding fixgrid,
                                            java.util.List<ColumnInfo> columns)

      Creation of iText document object. Calculation of size of page according to column widths.

    - #### beforeTitle

          protected void beforeTitle(Document document,
                                     FIXGRIDBinding fixgrid,
                                     java.util.List<ColumnInfo> columns,
                                     java.util.List<java.util.List<java.lang.String>> data)

      Method for adding information to be printed in front of the title.

    - #### printTitle

          protected void printTitle(Document document,
                                    FIXGRIDBinding fixgrid,
                                    java.util.List<ColumnInfo> columns,
                                    java.util.List<java.util.List<java.lang.String>> data)

    - #### afterTitle

          protected void afterTitle(Document document,
                                    FIXGRIDBinding fixgrid,
                                    java.util.List<ColumnInfo> columns,
                                    java.util.List<java.util.List<java.lang.String>> data)

      Method for adding information to be printed behind the grid.

    - #### beforeGrid

          protected void beforeGrid(Document document,
                                    FIXGRIDBinding fixgrid,
                                    java.util.List<ColumnInfo> columns,
                                    java.util.List<java.util.List<java.lang.String>> data)

      Method for adding information to be printed in front of the grid.

    - #### afterGrid

          protected void afterGrid(Document document,
                                   FIXGRIDBinding fixgrid,
                                   java.util.List<ColumnInfo> columns,
                                   java.util.List<java.util.List<java.lang.String>> data)

      Method for adding information to be printed behind the grid.

    - #### calculateColumnWidth

          protected int calculateColumnWidth(ColumnInfo ci)

      Calculation of column width.

    - #### objectToString

          protected java.lang.String objectToString(java.lang.String s)

    - #### createParagraph

          protected Paragraph createParagraph(java.lang.String text,
                                              Font font,
                                              FontSelector fontSelector)

Copyright © CaptainCasa Gmbh. All Rights Reserved.