List of usage examples for com.lowagie.text.pdf PdfPTable getHorizontalAlignment
public int getHorizontalAlignment()
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 w w. j ava 2s . co m*/ * The source PdfPTable * @since 2.1.3 */ private void importTable(PdfPTable table) { this.rows = new ArrayList<PatchRtfRow>(); this.tableWidthPercent = table.getWidthPercentage(); // this.tableWidthPercent = table.getWidth(); this.proportionalWidths = table.getAbsoluteWidths(); // this.proportionalWidths = table.getProportionalWidths(); this.cellPadding = (float) (table.spacingAfter() * TWIPS_FACTOR); // this.cellPadding = (float) (table.getPadding() * TWIPS_FACTOR); this.cellSpacing = (float) (table.spacingAfter() * 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.borders = new PatchRtfBorderGroup(this.document, PatchRtfBorder.ROW_BORDER, table.getBorder(), // table.getBorderWidth(), table.getBorderColor()); this.alignment = table.getHorizontalAlignment(); // this.alignment = table.getAlignment(); int i = 0; Iterator rowIterator = table.getRows().iterator(); // Iterator rowIterator = table.iterator(); while (rowIterator.hasNext()) { this.rows.add(new PatchRtfRow(this.document, this, (PdfPRow) rowIterator.next(), i)); i++; } for (i = 0; i < this.rows.size(); i++) { this.rows.get(i).handleCellSpanning(); this.rows.get(i).cleanRow(); } this.headerRows = table.getHeaderRows(); // this.headerRows = table.getLastHeaderRow(); this.cellsFitToPage = table.getKeepTogether(); // this.cellsFitToPage = table.isCellsFitPage(); this.tableFitToPage = table.getKeepTogether(); // this.tableFitToPage = table.isTableFitsPage(); // if(!Float.isNaN(table.getOffset())) { // this.offset = (int) (table.getOffset() * 2); // } // if(!Float.isNaN(table.getOffset())) { // this.offset = (int) (table.getOffset() * 2); // } }