Example usage for com.lowagie.text Table getBorder

List of usage examples for com.lowagie.text Table getBorder

Introduction

In this page you can find the example usage for com.lowagie.text Table getBorder.

Prototype

public int getBorder() 

Source Link

Document

Returns the exact type of the border.

Usage

From source file:org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.itext.PatchRtfTable.java

License:Open Source License

/**
 * Imports the rows and settings from the Table into this PatchRtfTable.
 *
 * @param table/*  w ww .  ja  v a2s. c om*/
 *          The source Table
 */
private void importTable(Table table) {
    this.rows = new ArrayList<PatchRtfRow>();
    this.tableWidthPercent = table.getWidth();
    this.proportionalWidths = table.getProportionalWidths();
    this.cellPadding = (float) (table.getPadding() * TWIPS_FACTOR);
    this.cellSpacing = (float) (table.getSpacing() * TWIPS_FACTOR);
    this.borders = new PatchRtfBorderGroup(this.document, PatchRtfBorder.ROW_BORDER, table.getBorder(),
            table.getBorderWidth(), table.getBorderColor());
    this.alignment = table.getAlignment();

    int i = 0;
    Iterator rowIterator = table.iterator();
    while (rowIterator.hasNext()) {
        this.rows.add(new PatchRtfRow(this.document, this, (Row) rowIterator.next(), i));
        // avoid out of memory exception
        rowIterator.remove();
        i++;
    }
    for (i = 0; i < this.rows.size(); i++) {
        this.rows.get(i).handleCellSpanning();
        this.rows.get(i).cleanRow();
    }
    this.headerRows = table.getLastHeaderRow();
    this.cellsFitToPage = table.isCellsFitPage();
    this.tableFitToPage = table.isTableFitsPage();
    if (!Float.isNaN(table.getOffset())) {
        this.offset = (int) (table.getOffset() * 2);
    }
}