Example usage for com.lowagie.text Row getCell

List of usage examples for com.lowagie.text Row getCell

Introduction

In this page you can find the example usage for com.lowagie.text Row getCell.

Prototype

public Object getCell(int column) 

Source Link

Document

Gets a Cell or Table from a certain column.

Usage

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

License:Open Source License

/**
 * Imports a Row and copies all settings
 *
 * @param row//from  w  w w .j a  va  2  s.c o  m
 *          The Row to import
 */
private void importRow(Row row) {
    this.cells = new ArrayList<PatchRtfCell>();
    this.width = this.document.getDocumentHeader().getPageSetting().getPageWidth()
            - this.document.getDocumentHeader().getPageSetting().getMarginLeft()
            - this.document.getDocumentHeader().getPageSetting().getMarginRight();
    this.width = (int) (this.width * this.parentTable.getTableWidthPercent() / 100);

    int cellRight = 0;
    int cellWidth = 0;
    for (int i = 0; i < row.getColumns(); i++) {
        cellWidth = (int) (this.width * this.parentTable.getProportionalWidths()[i] / 100);
        cellRight = cellRight + cellWidth;

        Cell cell = (Cell) row.getCell(i);
        PatchRtfCell rtfCell = new PatchRtfCell(this.document, this, cell);
        rtfCell.setCellRight(cellRight);
        rtfCell.setCellWidth(cellWidth);
        this.cells.add(rtfCell);
    }
}