use of com.faltenreich.diaguard.feature.export.job.pdf.view.MultilineCell in project Diaguard by Faltenreich.
the class PdfLog method getRow.
private List<Cell> getRow(PdfExportCache cache, String title, String subtitle, String description, int backgroundColor, int foregroundColor) {
List<Cell> entryRow = new ArrayList<>();
float width = cache.getPage().getWidth();
Cell titleCell = new CellBuilder(new Cell(cache.getFontNormal())).setWidth(PdfLog.TIME_WIDTH).setText(title).setBackgroundColor(backgroundColor).setForegroundColor(Color.gray).build();
entryRow.add(titleCell);
Cell subtitleCell = new CellBuilder(new Cell(cache.getFontNormal())).setWidth(getLabelWidth()).setText(subtitle).setBackgroundColor(backgroundColor).setForegroundColor(Color.gray).build();
entryRow.add(subtitleCell);
Cell descriptionCell = new CellBuilder(new MultilineCell(cache.getFontNormal())).setWidth(width - titleCell.getWidth() - subtitleCell.getWidth()).setText(description).setBackgroundColor(backgroundColor).setForegroundColor(foregroundColor).build();
entryRow.add(descriptionCell);
return entryRow;
}
Aggregations