@Test public void shouldSetBackgroundPaddingAndColumnSpanInCategoryRowCells() throws Exception { RnrLineItem lineItem = make(a(defaultRnrLineItem)); PdfPCell cell = categoryRow(0, lineItem); assertThat(cell.getBackgroundColor(), is(HEADER_BACKGROUND)); assertThat(cell.getPaddingLeft(), is(CELL_PADDING)); assertThat(cell.getColspan(), is(0)); }
public static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem) { Chunk chunk = new Chunk(lineItem.getCategoryName(), FontFactory.getFont(FontFactory.HELVETICA_BOLD)); PdfPCell cell = new PdfPCell(new Phrase(chunk)); cell.setColspan(visibleColumnsSize); cell.setBackgroundColor(HEADER_BACKGROUND); cell.setPadding(CELL_PADDING); return cell; }
RequisitionCellFactory { public static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem) { Chunk chunk = new Chunk(lineItem.getCategoryName(), FontFactory.getFont(FontFactory.HELVETICA_BOLD)); PdfPCell cell = new PdfPCell(new Phrase(chunk)); cell.setColspan(visibleColumnsSize); cell.setBackgroundColor(HEADER_BACKGROUND); cell.setPadding(CELL_PADDING); return cell; } }
RequisitionCellFactory { public static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem) { Chunk chunk = new Chunk(lineItem.getCategoryName(), FontFactory.getFont(FontFactory.HELVETICA_BOLD)); PdfPCell cell = new PdfPCell(new Phrase(chunk)); cell.setColspan(visibleColumnsSize); cell.setBackgroundColor(HEADER_BACKGROUND); cell.setPadding(CELL_PADDING); return cell; }  }
RequisitionCellFactory { public static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem) { Chunk chunk = new Chunk(lineItem.getCategoryName(), FontFactory.getFont(FontFactory.HELVETICA_BOLD)); PdfPCell cell = new PdfPCell(new Phrase(chunk)); cell.setColspan(visibleColumnsSize); cell.setBackgroundColor(HEADER_BACKGROUND); cell.setPadding(CELL_PADDING); return cell; }  static PdfPCell numberCell(String value); static PdfPCell textCell(String value); static PdfPCell headingCell(String value); static List<PdfPCell> getCells(List<? extends Column> visibleColumns,
                                        LineItem lineItem,
                                        String currency); static PdfPCell imageCell(); static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem); }
RequisitionCellFactory { public static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem) { Chunk chunk = new Chunk(lineItem.getCategoryName(), FontFactory.getFont(FontFactory.HELVETICA_BOLD)); PdfPCell cell = new PdfPCell(new Phrase(chunk)); cell.setColspan(visibleColumnsSize); cell.setBackgroundColor(HEADER_BACKGROUND); cell.setPadding(CELL_PADDING); return cell; }  static PdfPCell numberCell(String value); static PdfPCell textCell(String value); static PdfPCell headingCell(String value); static List<PdfPCell> getCells(List<? extends Column> visibleColumns,
                                        LineItem lineItem,
                                        String currency); static PdfPCell imageCell(); static PdfPCell categoryRow(Integer visibleColumnsSize, LineItem lineItem); static final float CELL_PADDING; static final BaseColor HEADER_BACKGROUND; static final Font H2_FONT; static final int WIDTH_PERCENTAGE; static final Logger logger; }