/** * This method creates a report group for the error message on the report * * @throws DocumentException */ private void generateErrorColumnHeaders() throws DocumentException { try { int headerwidths[] = { 60 }; Table aTable = new Table(1, 1); // 2 columns, 1 rows. aTable.setAutoFillEmptyCells(true); aTable.setPadding(3); aTable.setWidths(headerwidths); aTable.setWidth(100); Cell cell; Font font = FontFactory.getFont(FontFactory.HELVETICA, 9, Font.NORMAL); cell = new Cell(new Phrase("Error(s)", font)); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); cell.setGrayFill(0.9f); aTable.addCell(cell); this.document.add(aTable); } catch (Exception e) { throw new RuntimeException("DepreciationReport.generateErrorColumnHeaders() - Error: " + e.getMessage()); } }
/** * This method creates the headers for the report statistics */ private void generateColumnHeaders() { try { int headerwidths[] = { 40, 15 }; Table aTable = new Table(2, 1); // 2 columns, 1 rows. aTable.setAutoFillEmptyCells(true); aTable.setPadding(3); aTable.setWidths(headerwidths); aTable.setWidth(100); Cell cell; Font font = FontFactory.getFont(FontFactory.HELVETICA, 9, Font.NORMAL); cell = new Cell(new Phrase(SpringContext.getBean(KualiConfigurationService.class).getPropertyString(CamsKeyConstants.Depreciation.MSG_REPORT_DEPRECIATION_HEADING1), font)); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); cell.setGrayFill(0.9f); aTable.addCell(cell); cell = new Cell(new Phrase(SpringContext.getBean(KualiConfigurationService.class).getPropertyString(CamsKeyConstants.Depreciation.MSG_REPORT_DEPRECIATION_HEADING2), font)); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); cell.setGrayFill(0.9f); aTable.addCell(cell); this.document.add(aTable); } catch (Exception e) { throw new RuntimeException("DepreciationReport.generateColumnHeaders() - Error: " + e.getMessage()); } }
aTable.setAutoFillEmptyCells(true); aTable.setPadding(3); aTable.setWidths(columnwidths);
throw new BadElementException("No error, just an old style table"); setAutoFillEmptyCells(true); complete(); PdfPTable pdfptable = new PdfPTable(widths);
throw new BadElementException(MessageLocalization.getComposedMessage("no.error.just.an.old.style.table")); setAutoFillEmptyCells(true); complete(); PdfPTable pdfptable = new PdfPTable(widths);
throw new BadElementException(MessageLocalization.getComposedMessage("no.error.just.an.old.style.table")); setAutoFillEmptyCells(true); complete(); PdfPTable pdfptable = new PdfPTable(widths);
final int rowCount = contentProducer.getRowCount(); table = new Table( columnCount, rowCount ); table.setAutoFillEmptyCells( false ); table.setWidth( 100 ); // span the full page..