Java Code Examples for com.lowagie.text.Table#getPadding()
The following examples show how to use
com.lowagie.text.Table#getPadding() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RtfTable.java From itext2 with GNU Lesser General Public License v3.0 | 5 votes |
/** * Imports the rows and settings from the Table into this * RtfTable. * * @param table The source Table */ private void importTable(Table table) { this.rows = new ArrayList(); 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 RtfBorderGroup(this.document, RtfBorder.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 RtfRow(this.document, this, (Row) rowIterator.next(), i)); i++; } for(i = 0; i < this.rows.size(); i++) { ((RtfRow) this.rows.get(i)).handleCellSpanning(); ((RtfRow) 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); } }
Example 2
Source File: PatchRtfTable.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
/** * Imports the rows and settings from the Table into this PatchRtfTable. * * @param table * 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 ); } }