List of usage examples for com.itextpdf.text.pdf PdfPCell getPaddingBottom
public float getPaddingBottom()
From source file:be.rheynaerde.poolsheets.AbstractPoolSheet.java
License:Open Source License
protected PdfPCell getSolidCell() { if (configuration.getImage() == null) { PdfPCell solidCell = new PdfPCell(); solidCell.setBackgroundColor(getSolidCellColor()); solidCell.setFixedHeight(configuration.getSquareCellSize()); return solidCell; } else {//w ww . j a va2s. co m PdfPCell solidCell = new PdfPCell(configuration.getImage(), true); solidCell.setFixedHeight(configuration.getSquareCellSize()); solidCell.setPadding(solidCell.getPaddingBottom() * 2); return solidCell; } }
From source file:com.vectorprint.report.itext.style.stylers.AdvancedImpl.java
License:Open Source License
/** * An advanced styler may be added as event to a cell by {@link StyleHelper#style(java.lang.Object, java.lang.Object, java.util.Collection) } * when the element styled is a table and the {@link EVENTMODE} is ALL or CELL. This enables drawing near a cell. * Calls {@link #draw(com.itextpdf.text.Rectangle, java.lang.String) } with the rectangle of the cell and null as genericTag. When * {@link #USEPADDING} is true the rectangle is calculated taking cell padding into account. * * @see EVENTMODE#CELL/* ww w. jav a 2 s . com*/ * @param cell * @param position * @param canvases */ @Override public final void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) { try { tableForeground = isBg() ? canvases[PdfPTable.BASECANVAS] : canvases[PdfPTable.TEXTCANVAS]; Rectangle box = getValue(USEPADDING, Boolean.class) ? new Rectangle(position.getLeft() + cell.getPaddingLeft(), position.getBottom() + cell.getPaddingBottom(), position.getRight() - cell.getPaddingRight(), position.getTop() - cell.getPaddingTop()) : position; draw(box, null); tableForeground = null; } catch (VectorPrintException ex) { throw new VectorPrintRuntimeException(ex); } }