Class CrossTabBody

java.lang.Object
com.inet.report.CrossTabBody
All Implemented Interfaces:
Serializable

public class CrossTabBody extends Object implements Serializable
This is the body of the CrossTab.
Since:
12.0
See Also:
  • Method Details

    • getCellCount

      public int getCellCount()
      Get the count of cells in the body. This should be row count times column count.
      Returns:
      the cell count
      Since:
      12.0
    • removeSummaryField

      public void removeSummaryField(int index) throws ReportException
      Removes the ith summary field in from the crosstab.
      Parameters:
      index - Index of the summary field.
      Throws:
      ReportException - if crosstab has no summary field or index is out of bounds.
      IllegalArgumentException - in case the index is negative.
      Since:
      12.0
    • moveSummaryField

      public void moveSummaryField(int from, int to)
      Move the position of a summary field
      Parameters:
      from - original position in the range from 0 to getSummaryFieldsCount() -1
      to - new position in the range from 0 to getSummaryFieldsCount() -1
      Throws:
      IllegalArgumentException - if a index is out of range
      Since:
      14.1
    • getSummaryField

      @Nonnull public SummaryField getSummaryField(int index)
      Returns the i-th summary fields of the crosstab.
      Parameters:
      index - The 0-based index of the required field.
      Returns:
      The i-th summary field.
      Since:
      12.0
    • getSummaryFieldsCount

      public int getSummaryFieldsCount()
      Returns the number of summary fields of the crosstab.
      Returns:
      The number of summary fields.
      Since:
      12.0
    • addSummaryField

      public SummaryField addSummaryField(@Nonnull Field field, int operation)
      Add a summary to the crosstab.
      Parameters:
      field - the that should be to sum.
      operation - the summary operation. Must be a valid constant from SummaryField
      Returns:
      a SummaryField to set additional information
      Since:
      12.0
    • getCell

      public CrossTabBodyCell getCell(int idx)
      Get the ith cell of the body. The order is undefined. You can use this method to iterate over all cells.
      Parameters:
      idx - the 0 based index.
      Returns:
      CrossTabBodyCell, never null
      Since:
      12.0
      See Also:
    • getCell

      @Nonnull public CrossTabBodyCell getCell(int rowIdx, int columnIdx)
      Get the cell that is related to the row header and column header.
      Parameters:
      rowIdx - the 0 based index of the rows.
      columnIdx - the 0 based index of the columns
      Returns:
      the cell, never null
      Throws:
      IllegalStateException - if the crosstab is corrupt and the cell can not be found.
      Since:
      12.0