19 package org.sleuthkit.autopsy.datasourcesummary.uiutils;
21 import java.util.Collections;
22 import java.util.List;
23 import java.util.Optional;
24 import org.apache.poi.ss.usermodel.Row;
25 import org.apache.poi.ss.usermodel.Sheet;
133 Row row = sheet.createRow(rowStart);
134 ExcelExport.createCell(env, row, colStart, item, Optional.empty());
135 return new ItemDimensions(rowStart, colStart, rowStart, colStart);
171 Row row = sheet.createRow(rowStart);
172 ExcelExport.createCell(env, row, colStart, key, Optional.of(env.getHeaderStyle()));
173 ExcelExport.createCell(env, row, colStart + 1, value, Optional.empty());
174 return new ItemDimensions(rowStart, colStart, rowStart, colStart + 1);
194 private final List<? extends ExcelItemExportable>
children;
210 int curRow = rowStart + 1;
211 int maxCol = colStart;
213 if (export == null) {
217 ItemDimensions thisItemDim = export.write(sheet, curRow, colStart + DEFAULT_INDENT, env);
219 maxCol = Math.max(thisItemDim.
getColEnd(), maxCol);
222 return new ItemDimensions(rowStart, colStart, curRow - 1, maxCol);
227 private final List<ExcelItemExportable>
exports;
237 this.exports = exports == null ? Collections.emptyList() :
exports;
250 if (export == null) {
254 ItemDimensions dimensions = export.write(sheet, rowStart, 0, env);
256 maxCol = Math.max(maxCol, dimensions.
getColEnd());
260 for (
int i = 0; i <= maxCol; i++) {
261 sheet.autoSizeColumn(i);