Class RowAutoHeightXlsxHint

java.lang.Object
io.jmix.reports.yarg.formatters.impl.xlsx.hints.RowAutoHeightXlsxHint
All Implemented Interfaces:
XlsxHint

public class RowAutoHeightXlsxHint extends Object implements XlsxHint
Recalculates row heights depending on the cell values and fonts.
  • Field Details

  • Constructor Details

    • RowAutoHeightXlsxHint

      public RowAutoHeightXlsxHint(Document document)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface XlsxHint
    • add

      public void add(org.xlsx4j.sml.Cell templateCell, org.xlsx4j.sml.Cell resultCell, BandData bandData, List<String> params)
      Specified by:
      add in interface XlsxHint
    • apply

      public void apply()
      Specified by:
      apply in interface XlsxHint
    • getColumnWidthInPixels

      @Nullable protected Integer getColumnWidthInPixels(CellReference cellReference, double defaultCharWidth, Map<Double,Integer> columnWidths)
    • getMergedCellWidthInPixels

      protected Integer getMergedCellWidthInPixels(Range range, double defaultCharWidth, Map<Double,Integer> columnWidths)
    • getMergedCells

      protected List<Range> getMergedCells()
    • calculateCellWidth

      protected int calculateCellWidth(int columnWidthInPixels, org.xlsx4j.sml.Cell resultCell)
    • getMergedCell

      @Nullable protected Range getMergedCell(CellReference cellReference, List<Range> mergedCells)
    • calculateCellHeight

      protected double calculateCellHeight(StyleSheet.Font font, String cellValue, int cellWidthInPixels)
    • getColumnWidthInPixels

      protected int getColumnWidthInPixels(double defaultCharCount)
      Calculates column width in pixels as a width of the string containing a provided count of defaultChar.
      Parameters:
      defaultCharCount - number of defaultChar that can be displayed in column.
      Returns:
      column width in pixels
    • calculateCharsCount

      protected double calculateCharsCount(double sourceColumnWidth, double defaultCharWidth)
    • getDefaultCharWidth

      protected double getDefaultCharWidth()
    • getDefaultCharsWidth

      protected double getDefaultCharsWidth(int count)
    • getIndentInPixels

      protected int getIndentInPixels(int indent)
    • isMaxHeight

      protected boolean isMaxHeight(Double rowHeight)
    • createAttributedString

      protected AttributedString createAttributedString(StyleSheet.Font font, String value)