Example usage for com.itextpdf.text.pdf PdfPTable setTableEvent

List of usage examples for com.itextpdf.text.pdf PdfPTable setTableEvent

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfPTable setTableEvent.

Prototype

public void setTableEvent(final PdfPTableEvent event) 

Source Link

Document

Sets the table event for this table.

Usage

From source file:com.vectorprint.report.itext.style.stylers.Zebra.java

License:Open Source License

private PdfPTable style(PdfPTable t) throws VectorPrintException {
    ZebraStripes zs = null;/*w ww. jav  a  2 s. c  om*/
    try {
        zs = (ZebraStripes) getValue(TABLEEVENTCLASS, Class.class).newInstance();
        zs.setAlternate(getAlternate());
    } catch (InstantiationException | IllegalAccessException ex) {
        throw new VectorPrintException(ex);
    }
    StylerFactoryHelper.SETTINGS_ANNOTATION_PROCESSOR.initSettings(zs, getSettings());
    zs.setLayerManager(layerManager);

    if (getOdd() != null) {
        zs.setOddColor(getOdd());
    }
    if (getEven() != null) {
        zs.setEvenColor(getEven());
    }
    t.setTableEvent(zs);
    return t;
}