Class CrossTab

All Implemented Interfaces:
BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, com.inet.report.ReferenceHolder, Serializable, Cloneable

public class CrossTab extends Element implements com.inet.report.ReferenceHolder, HyperlinkProperties, BorderProperties
This class represents a cross table that has been or should be drawn in a report. A cross table is a report to summarize and visualize data in a compact form with rows and columns, so you can better compare data. Use this class to get or set properties. You can create and add a new cross table element with Section.addCrossTab(int, int, SummaryField) method in class Section. The last Argument of the method is the field the cross table needs at least.
This class is part of the RDC.
Since:
1.0
See Also:
  • Method Details

    • getDescriptionSection

      public CrossTabDescriptionSection getDescriptionSection()
      Gets the description section of the crosstab. This section can be used to add additional descriptions or decoration to the crosstab. The description section is located in the upper left corner of the crosstab.
      Returns:
      The description section of the crosstab
      Since:
      6.0
    • getColumns

      public CrossTabHeaderList getColumns()
      The top headers of the table.
      Returns:
      ever the same instance
      Since:
      12.0
    • getRows

      public CrossTabHeaderList getRows()
      The left headers of the table.
      Returns:
      ever the same instance
      Since:
      12.0
    • swapHeaders

      public void swapHeaders()
      Swap the column and row headers. The result is a rotated crosstab.
      Since:
      12.0
    • getOptions

      public CrossTabOptions getOptions()
      The properties of the table.
      Returns:
      ever the same instance
      Since:
      12.0
    • getBody

      public CrossTabBody getBody()
      The body of the table.
      Returns:
      ever the same instance
      Since:
      12.0
    • setWidth

      public void setWidth(int width)
      This element can not be resized. Invoking this method will have no effect. The size of this element depends on the width and height of its sub elements.
      Overrides:
      setWidth in class ReportComponent
      Parameters:
      width - Setting the width of the Crosstab has no effect.
      Since:
      6.0
    • setHeight

      public void setHeight(int height)
      This element can not be resized. Invoking this method will have no effect. The size of this element depends on the width and height of its sub elements.
      Overrides:
      setHeight in class ReportComponent
      Parameters:
      height - Setting the height of the Crosstab has no effect.
      Since:
      6.0
    • getCrossTabGridLineFormat

      public CrossTabGridLineFormat[] getCrossTabGridLineFormat()
      Returns the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
      and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
      and for the cells (vertical-, horizontal-lines, bottom-, right -border)
      which are 16 lines total.
      Returns:
      The array[16] of CrossTabGridLineFormat
      Since:
      6.0
    • setCrossTabGridLineFormat

      public void setCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines)
      Sets the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
      and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
      and for the cells (vertical-, horizontal-lines, bottom-, right -border)
      which are 16 lines total.
      Parameters:
      gridLines - The grid line format array obtained from #getCrossTabGridLineFormat().
      Throws:
      IllegalArgumentException - if gridLines include not clonable instances
      Since:
      6.0
    • getPropertyFormulas

      public List<FormulaField> getPropertyFormulas()
      Returns a list with all property formulas that are set for this report element. This includes property formulas for any type of sub-component but excludes formulas for any descendant ReportComponent of this one. To get the property formulas for descendant ReportComponent use ReportComponent.getSubComponents()
      Overrides:
      getPropertyFormulas in class Element
      Returns:
      List of property formulas
    • setReferences

      public final void setReferences()
      FOR INTERNAL USE ONLY
      Specified by:
      setReferences in interface com.inet.report.ReferenceHolder
      Overrides:
      setReferences in class Element
    • resetReferences

      public final void resetReferences()
      FOR INTERNAL USE ONLY
      Specified by:
      resetReferences in interface com.inet.report.ReferenceHolder
      Overrides:
      resetReferences in class ReportComponent
    • parseElement

      public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

      Specified by:
      parseElement in interface NodeParser
      Overrides:
      parseElement in class Element
      Parameters:
      group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
      tag - The XMLTag to be parsed
      atts - The set of attributes in the current XMLTag
      parserMap - The map of current Parser.
      Returns:
      The NodeParser sub-element if one needed to be created, or null if none was created.
      Throws:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
    • parseEndElement

      public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML

      Receive notification of the end of an XML tag.

      Specified by:
      parseEndElement in interface NodeParser
      Overrides:
      parseEndElement in class ReportComponent
      Parameters:
      group - XMLTag of the current node to be parsed, or null if there is no such current group.
      tag - The XMLTag to be parsed
      parserMap - The map of current Parser.
      Throws:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
    • getSubComponents

      public List<? extends ReportComponent> getSubComponents()
      Returns all ReportComponents that are descendants of this one. E.G. this will return all Element of a Section. But it's as well useful for CrossTabs or Text elements which have additional elements.
      Specified by:
      getSubComponents in class ReportComponent
      Returns:
      a list with all sub components which can be empty as well; will be null if the component has no descendants