// --- CREATE TITLE ---------------------------------------------------------------------------- protected PdfPCell createLabel(String msg, int fontsize, int colspan, int style) { cell = new PdfPCell( new Paragraph(msg, FontFactory.getFont(FontFactory.HELVETICA, fontsize, style))); cell.setColspan(colspan); cell.setBorder(PdfPCell.NO_BORDER); cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); cell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER); return cell; }
// --- CREATE TITLE ---------------------------------------------------------------------------- protected PdfPCell createTitle(String msg, int colspan) { cell = new PdfPCell( new Paragraph(msg, FontFactory.getFont(FontFactory.HELVETICA, 10, Font.UNDERLINE))); cell.setColspan(colspan); cell.setBorder(PdfPCell.NO_BORDER); cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); cell.setHorizontalAlignment(PdfPCell.ALIGN_CENTER); return cell; }
// --- CREATE NUMBER VALUE CELL ---------------------------------------------------------------- protected PdfPCell createNumberCell(String value, int colspan) { cell = new PdfPCell( new Paragraph(value, FontFactory.getFont(FontFactory.HELVETICA, 7, Font.NORMAL))); cell.setColspan(colspan); cell.setBorder(PdfPCell.BOX); cell.setBorderColor(innerBorderColor); cell.setVerticalAlignment(PdfPCell.ALIGN_TOP); cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT); return cell; }
// --- CREATE BORDERLESS CELL ------------------------------------------------------------------ protected PdfPCell createBorderlessCell(String value, int height, int colspan) { cell = new PdfPCell( new Paragraph(value, FontFactory.getFont(FontFactory.HELVETICA, 7, Font.NORMAL))); cell.setPaddingTop(height); // cell.setColspan(colspan); cell.setBorder(PdfPCell.NO_BORDER); cell.setVerticalAlignment(PdfPCell.ALIGN_TOP); cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT); return cell; }
// --- CREATE PADDED VALUE CELL ---------------------------------------------------------------- protected PdfPCell createPaddedValueCell(String value, int colspan) { cell = new PdfPCell( new Paragraph(value, FontFactory.getFont(FontFactory.HELVETICA, 7, Font.NORMAL))); cell.setColspan(colspan); cell.setBorder(PdfPCell.BOX); cell.setBorderColor(innerBorderColor); cell.setVerticalAlignment(PdfPCell.ALIGN_TOP); cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT); cell.setPaddingRight(5); // difference return cell; }
// --- CREATE UNDERLINED CELL ------------------------------------------------------------------ protected PdfPCell createUnderlinedCell(String value, int colspan) { cell = new PdfPCell( new Paragraph( value, FontFactory.getFont(FontFactory.HELVETICA, 7, Font.UNDERLINE))); // underlined cell.setColspan(colspan); cell.setBorder(PdfPCell.NO_BORDER); cell.setVerticalAlignment(PdfPCell.ALIGN_TOP); cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT); return cell; }
// --- CREATE ITEMNAME CELL -------------------------------------------------------------------- protected PdfPCell createItemNameCell(String itemName, int colspan) { cell = new PdfPCell( new Paragraph( itemName, FontFactory.getFont(FontFactory.HELVETICA, 7, Font.NORMAL))); // no uppercase cell.setColspan(colspan); cell.setBorder(PdfPCell.BOX); cell.setBorderColor(innerBorderColor); cell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT); return cell; }