private void writeRequest(CounterRequestContext context, PdfPCell cell, int margin) throws DocumentException, IOException { final Paragraph paragraph = new Paragraph( getDefaultCell().getLeading() + cellFont.getSize()); paragraph.setIndentationLeft(margin); if (context.getParentCounter().getIconName() != null) { paragraph.add(new Chunk(getImage(context.getParentCounter().getIconName()), 0, -1)); } paragraph.add(new Phrase(context.getCompleteRequestName(), cellFont)); cell.addElement(paragraph); }
final PdfPCell cell = new PdfPCell(); final Paragraph paragraph = new Paragraph( getDefaultCell().getLeading() + cellFont.getSize()); paragraph.add(new Chunk( getImage(
private void writeRequest(CounterRequest childRequest, float executionsByRequest, boolean allChildHitsDisplayed) throws IOException, DocumentException { final PdfPCell defaultCell = getDefaultCell(); defaultCell.setHorizontalAlignment(Element.ALIGN_LEFT); final Paragraph paragraph = new Paragraph(defaultCell.getLeading() + cellFont.getSize()); if (executionsByRequest != -1) { paragraph.setIndentationLeft(5); } final Counter parentCounter = getCounterByRequestId(childRequest); if (parentCounter != null && parentCounter.getIconName() != null) { paragraph.add(new Chunk(getSmallImage(parentCounter.getIconName()), 0, -1)); } paragraph.add(new Phrase(childRequest.getName(), cellFont)); final PdfPCell requestCell = new PdfPCell(); requestCell.addElement(paragraph); requestCell.setGrayFill(defaultCell.getGrayFill()); requestCell.setPaddingTop(defaultCell.getPaddingTop()); addCell(requestCell); defaultCell.setHorizontalAlignment(Element.ALIGN_RIGHT); if (executionsByRequest != -1) { addCell(nbExecutionsFormat.format(executionsByRequest)); } else { final boolean hasChildren = !request.getChildRequestsExecutionsByRequestId().isEmpty(); if (hasChildren) { addCell(""); } } writeRequestValues(childRequest, allChildHitsDisplayed); }
private void writeRequest(CounterRequestContext context, PdfPCell cell, int margin) throws DocumentException, IOException { final Paragraph paragraph = new Paragraph( getDefaultCell().getLeading() + cellFont.getSize()); paragraph.setIndentationLeft(margin); if (context.getParentCounter().getIconName() != null) { paragraph.add(new Chunk(getImage(context.getParentCounter().getIconName()), 0, -1)); } paragraph.add(new Phrase(context.getCompleteRequestName(), cellFont)); cell.addElement(paragraph); }
final PdfPCell cell = new PdfPCell(); final Paragraph paragraph = new Paragraph( getDefaultCell().getLeading() + cellFont.getSize()); paragraph.add(new Chunk( getImage(
private void writeRequest(CounterRequest childRequest, float executionsByRequest, boolean allChildHitsDisplayed) throws IOException, DocumentException { final PdfPCell defaultCell = getDefaultCell(); defaultCell.setHorizontalAlignment(Element.ALIGN_LEFT); final Paragraph paragraph = new Paragraph(defaultCell.getLeading() + cellFont.getSize()); if (executionsByRequest != -1) { paragraph.setIndentationLeft(5); } final Counter parentCounter = getCounterByRequestId(childRequest); if (parentCounter != null && parentCounter.getIconName() != null) { paragraph.add(new Chunk(getSmallImage(parentCounter.getIconName()), 0, -1)); } paragraph.add(new Phrase(childRequest.getName(), cellFont)); final PdfPCell requestCell = new PdfPCell(); requestCell.addElement(paragraph); requestCell.setGrayFill(defaultCell.getGrayFill()); requestCell.setPaddingTop(defaultCell.getPaddingTop()); addCell(requestCell); defaultCell.setHorizontalAlignment(Element.ALIGN_RIGHT); if (executionsByRequest != -1) { addCell(nbExecutionsFormat.format(executionsByRequest)); } else { final boolean hasChildren = !request.getChildRequestsExecutionsByRequestId().isEmpty(); if (hasChildren) { addCell(""); } } writeRequestValues(childRequest, allChildHitsDisplayed); }