Class RowAutoHeightXlsxHint
java.lang.Object
io.jmix.reports.yarg.formatters.impl.xlsx.hints.RowAutoHeightXlsxHint
- All Implemented Interfaces:
- XlsxHint
Recalculates row heights depending on the cell values and fonts.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<RowAutoHeightXlsxHint.CellDataObject>protected static final intprotected static final Stringprotected Documentprotected FontRenderContextprotected static final org.slf4j.Loggerprotected static final doubleMax value of the row height in Excel (in points).
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(org.xlsx4j.sml.Cell templateCell, org.xlsx4j.sml.Cell resultCell, BandData bandData, List<String> params) voidapply()protected doublecalculateCellHeight(StyleSheet.Font font, String cellValue, int cellWidthInPixels) protected intcalculateCellWidth(int columnWidthInPixels, org.xlsx4j.sml.Cell resultCell) protected doublecalculateCharsCount(double sourceColumnWidth, double defaultCharWidth) protected AttributedStringcreateAttributedString(StyleSheet.Font font, String value) protected intgetColumnWidthInPixels(double defaultCharCount) Calculates column width in pixels as a width of the string containing a provided count ofdefaultChar.protected IntegergetColumnWidthInPixels(CellReference cellReference, double defaultCharWidth, Map<Double, Integer> columnWidths) protected doublegetDefaultCharsWidth(int count) protected doubleprotected intgetIndentInPixels(int indent) protected RangegetMergedCell(CellReference cellReference, List<Range> mergedCells) protected IntegergetMergedCellWidthInPixels(Range range, double defaultCharWidth, Map<Double, Integer> columnWidths) getName()protected booleanisMaxHeight(Double rowHeight) 
- 
Field Details- 
logprotected static final org.slf4j.Logger log
- 
MAX_ROW_HEIGHTprotected static final double MAX_ROW_HEIGHTMax value of the row height in Excel (in points).- See Also:
 
- 
defaultChar- See Also:
 
- 
DEFAULT_FONT_SIZEprotected static final int DEFAULT_FONT_SIZE- See Also:
 
- 
document
- 
fontRenderContext
- 
data
 
- 
- 
Constructor Details- 
RowAutoHeightXlsxHint
 
- 
- 
Method Details- 
getName
- 
add
- 
applypublic void apply()
- 
getColumnWidthInPixels@Nullable protected Integer getColumnWidthInPixels(CellReference cellReference, double defaultCharWidth, Map<Double, Integer> columnWidths) 
- 
getMergedCellWidthInPixels
- 
getMergedCells
- 
calculateCellWidthprotected int calculateCellWidth(int columnWidthInPixels, org.xlsx4j.sml.Cell resultCell) 
- 
getMergedCell
- 
calculateCellHeight
- 
getColumnWidthInPixelsprotected int getColumnWidthInPixels(double defaultCharCount) Calculates column width in pixels as a width of the string containing a provided count ofdefaultChar.- Parameters:
- defaultCharCount- number of- defaultCharthat can be displayed in column.
- Returns:
- column width in pixels
 
- 
calculateCharsCountprotected double calculateCharsCount(double sourceColumnWidth, double defaultCharWidth) 
- 
getDefaultCharWidthprotected double getDefaultCharWidth()
- 
getDefaultCharsWidthprotected double getDefaultCharsWidth(int count) 
- 
getIndentInPixelsprotected int getIndentInPixels(int indent) 
- 
isMaxHeight
- 
createAttributedString
 
-