public static void noBorderTable(final PdfPTable table) { table.getDefaultCell().setBorderColor(Color.WHITE); }
if ( color != null ) cell.setBorderColor( color );
if (row.getRowNum() == 0) { table_cell.setBackgroundColor(BaseColor.LIGHT_GRAY); table_cell.setBorderColor(BaseColor.BLACK);
if ( color != null ) cell.setBorderColor( color );
c1.setBorderWidth(1); c1.setPaddingBottom(10); c1.setBorderColor(celalBorderColor); table.addCell(c1); c1.setColspan(2); c1.setPaddingBottom(10); c1.setBorderColor(celalBorderColor); table.addCell(c1); try {
if ( color != null ) cell.setBorderColor( color );
private void addLogo(PdfPTable table, Font font, String imgSrc, int alignment, int absoluteSize) { Image img = null; try { img = Image.getInstance(pb.getFullWebContextPath() + AppUtils.getImgFolderURL() + File.separator + imgSrc); } catch (BadElementException | MalformedURLException e) { logger.error(EELFLoggerDelegate.errorLogger,"addLogo() failed ", e); img = null; } catch (IOException e) { logger.error(EELFLoggerDelegate.errorLogger,e.getMessage(), e); } if(img == null){ //log that the input file couldnt be loaded - } else{ //img.scaleAbsolute(absoluteSize, absoluteSize); img.scalePercent(absoluteSize, absoluteSize); PdfPCell cell = new PdfPCell(img); cell.setBorderColor(Color.WHITE); cell.setHorizontalAlignment(alignment); table.addCell(cell); } }
public void onStartPage(PdfWriter writer, Document document) { Font font = FontFactory.getFont(Globals.getFooterFontFamily(), Globals.getFooterFontSize(), Font.NORMAL, Color.BLACK); int howManyLogos = getHowManyLogos(); //No need to draw anything in the header if no logo was set in the report. if(howManyLogos == 0) return; float[] widths = fillWidthsArray(howManyLogos); PdfPTable foot = new PdfPTable(widths); if(AppUtils.isNotEmpty(pb.getLogo1Url()) && !pb.getLogo1Url().equalsIgnoreCase("<no logo>")) addLogo(foot, font, pb.getLogo1Url().substring(pb.getLogo1Url().indexOf("|") + 1).trim(), Cell.ALIGN_LEFT, pb.getLogo1Size() == null ? DEFAULT_LOGO_SIZE : pb.getLogo1Size()); PdfPCell spacingCell = new PdfPCell(); spacingCell.setBorderColor(Color.WHITE); foot.addCell(spacingCell); //Using logo1 size for now - use logo2 size if it is required to deal it separately. if(AppUtils.isNotEmpty(pb.getLogo2Url()) && !pb.getLogo2Url().equalsIgnoreCase("<no logo>")) addLogo(foot, font, pb.getLogo2Url().substring(pb.getLogo2Url().indexOf("|") + 1).trim(), Cell.ALIGN_RIGHT, pb.getLogo2Size() == null ? DEFAULT_LOGO_SIZE : pb.getLogo2Size()); foot.setTotalWidth(getPageWidth(document)); foot.writeSelectedRows(0, -1, 36, 600, writer.getDirectContent()); }
total.disableBorderSide(Rectangle.RIGHT); total.disableBorderSide(Rectangle.LEFT); total.setBorderColor(ColorUtils.getLineLightColor());
total.disableBorderSide(Rectangle.RIGHT); total.disableBorderSide(Rectangle.LEFT); total.setBorderColor(ColorUtils.getLineLightColor());
total.disableBorderSide(Rectangle.RIGHT); total.disableBorderSide(Rectangle.LEFT); total.setBorderColor(ColorUtils.getLineLightColor());
cell.setBorderColor( COLOR_CELLBORDER );
c.setPadding(0); c.setBorder(img.getBorder()); c.setBorderColor(img.getBorderColor()); c.setBorderWidth(img.getBorderWidth()); c.setBackgroundColor(img.getBackgroundColor());
c.setPadding(0); c.setBorder(img.getBorder()); c.setBorderColor(img.getBorderColor()); c.setBorderWidth(img.getBorderWidth()); c.setBackgroundColor(img.getBackgroundColor());
c.setPadding(0); c.setBorder(img.getBorder()); c.setBorderColor(img.getBorderColor()); c.setBorderWidth(img.getBorderWidth()); c.setBackgroundColor(img.getBackgroundColor());
private void printDashboard(final Project project, final Section section) throws DocumentException { PdfPTable dashboard = new PdfPTable(3); dashboard.getDefaultCell().setBorderColor(Color.WHITE); Font titleFont = new Font(Font.TIMES_ROMAN, 14, Font.BOLD, Color.BLACK); Font dataFont = new Font(Font.TIMES_ROMAN, 14, Font.BOLD, Color.GRAY); linesOfCode.getDefaultCell().setBorderColor(Color.WHITE); linesOfCode.addCell(new Phrase(getTextProperty("general.lines_of_code"), titleFont)); comments.getDefaultCell().setBorderColor(Color.WHITE); comments .addCell(new Phrase(getTextProperty("general.comments"), titleFont)); codeCoverage.getDefaultCell().setBorderColor(Color.WHITE); codeCoverage.addCell(new Phrase(getTextProperty("general.test_count"), titleFont)); complexity.getDefaultCell().setBorderColor(Color.WHITE); complexity.addCell(new Phrase(getTextProperty("general.complexity"), titleFont)); rulesCompliance.getDefaultCell().setBorderColor(Color.WHITE); rulesCompliance.addCell(new Phrase( getTextProperty("general.rules_compliance"), titleFont)); violations.getDefaultCell().setBorderColor(Color.WHITE); violations.addCell(new Phrase(getTextProperty("general.violations"), titleFont));
getTextProperty("general.static_analysis"), Style.UNDERLINED_FONT); PdfPTable staticAnalysisTable = new PdfPTable(3); staticAnalysisTable.getDefaultCell().setBorderColor(Color.WHITE);