Class CrossTabHeader

  • All Implemented Interfaces:
    NodeParser, java.io.Serializable

    public class CrossTabHeader
    extends java.lang.Object
    implements NodeParser, java.io.Serializable
    A single CrossTab header. There are headers for rows (left) and columns (top).
    Since:
    12.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBackColor()
      Returns the background color of the header as ABGR, i.e. 0x000000FF for red.
      FormulaField getBackColorFormula()
      Returns the formula of the background color of the header as ABGR, i.e. 0x000000FF for red.
      Field getField()
      The field of the grouping.
      FieldElement getFieldElement()
      Returns the field element of this row.
      Group getGroup()
      Returns the group object of this row.
      int getHeight()
      Position of this header, is used from designer.
      boolean getSuppressGroupLabel()
      Returns whether group labels should be suppressed (true) or not (false).
      FormulaField getSuppressGroupLabelFormula()
      Returns the formula for the property 'suppress group labels'.
      boolean getSuppressTotal()
      Returns whether total of this header should be suppressed true or not (false).
      FormulaField getSuppressTotalFormula()
      Returns the formula for the property 'suppress total'.
      Text getText()
      Returns the text element of this row.
      int getWidth()
      Position of this header, is used from designer.
      int getX()
      Position of this header, is used from designer.
      int getY()
      Position of this header, is used from designer.
      boolean isDOMParser()
      FOR INTERNAL USE ONLY Internal method for reading report XML
      boolean isRow()
      If this header is currently a row header or a column header.
      void parseDOM​(org.w3c.dom.Node node, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      NodeParser parseElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, org.xml.sax.Attributes atts, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseEndElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseText​(java.lang.String text, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void setBackColor​(int backColor)
      Sets the background color of the header.
      You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
      More information about the usage of colors in RDC can be found in the RDC documentation.
      void setBackColorFormula​(FormulaField backColorFormula)
      Sets the formula of the background color of the header.
      You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
      More information about the usage of colors in RDC can be found in the RDC documentation.
      void setField​(Field field)
      Set the field of grouping.
      void setSuppressGroupLabel​(boolean suppressGroupLabel)
      Sets whether group labels should be suppressed (true) or not (false).
      void setSuppressGroupLabelFormula​(FormulaField newFormula)
      Sets the formula for the property 'suppress group labels'.
      void setSuppressTotal​(boolean suppressTotal)
      Sets whether sub total should be suppressed (true) or not (false).
      void setSuppressTotalFormula​(FormulaField newFormula)
      Sets the formula for the property 'suppress sub totals'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isRow

        public boolean isRow()
        If this header is currently a row header or a column header.
        Returns:
        true, if it is a row header.
        Since:
        12.0
      • getX

        public int getX()
        Position of this header, is used from designer.
        Returns:
        the x position
        Since:
        12.0
      • getY

        public int getY()
        Position of this header, is used from designer.
        Returns:
        the y position
        Since:
        12.0
      • getWidth

        public int getWidth()
        Position of this header, is used from designer.
        Returns:
        the width
        Since:
        12.0
      • getHeight

        public int getHeight()
        Position of this header, is used from designer.
        Returns:
        the height
        Since:
        12.0
      • getSuppressTotal

        public boolean getSuppressTotal()
        Returns whether total of this header should be suppressed true or not (false).
        Returns:
        True if the sub total is suppressed or not.
        Since:
        12.0
        See Also:
        setSuppressTotal(boolean)
      • getSuppressTotalFormula

        @Nullable
        public FormulaField getSuppressTotalFormula()
        Returns the formula for the property 'suppress total'. If this property is enabled total of this header will not be printed.
        Returns:
        The FormulaField of suppress sub total formula.
        Since:
        12.0
      • setSuppressTotal

        public void setSuppressTotal​(boolean suppressTotal)
        Sets whether sub total should be suppressed (true) or not (false).
        Parameters:
        suppressTotal - True if sub total should be suppressed else false.
        Since:
        12.0
      • setSuppressTotalFormula

        public void setSuppressTotalFormula​(FormulaField newFormula)
        Sets the formula for the property 'suppress sub totals'. If this property is enabled group label of the row will not be printed.
        Parameters:
        newFormula - The new formula for the property 'suppress sub totals'.
        Since:
        12.0
      • setSuppressGroupLabel

        public void setSuppressGroupLabel​(boolean suppressGroupLabel)
        Sets whether group labels should be suppressed (true) or not (false).
        Parameters:
        suppressGroupLabel - True if group label should be suppressed else false.
        Since:
        12.0
      • setSuppressGroupLabelFormula

        public void setSuppressGroupLabelFormula​(FormulaField newFormula)
        Sets the formula for the property 'suppress group labels'. If this property is enabled group label of the row will not be printed.
        Parameters:
        newFormula - The new formula for the property 'suppress group labels'.
        Since:
        12.0
      • getSuppressGroupLabel

        public boolean getSuppressGroupLabel()
        Returns whether group labels should be suppressed (true) or not (false).
        Returns:
        boolean True if the group labels is suppressed or not.
        Since:
        12.0
        See Also:
        CrossTabRow.setSuppressGroupLabel(boolean)
      • getSuppressGroupLabelFormula

        @Nullable
        public FormulaField getSuppressGroupLabelFormula()
        Returns the formula for the property 'suppress group labels'. If this property is enabled group label of the row will not be printed.
        Returns:
        The formulaField of Suppress Group Label Formula.
        Since:
        12.0
      • getGroup

        @Nullable
        public Group getGroup()
        Returns the group object of this row. The group will be null if this row is a total row. Set the group options of this row with the returned group object, i.e. the customize group name options and sort options.
        Returns:
        Group The group object of this row
        Since:
        12.0
        See Also:
        Group
      • getField

        @Nullable
        public Field getField()
        The field of the grouping.
        Returns:
        the field
        Since:
        12.0
      • setField

        public void setField​(Field field)
        Set the field of grouping.
        Parameters:
        field - the new field, can not be null
        Since:
        12.0
      • getText

        public Text getText()
        Returns the text element of this row. This text will displayed als total text of this row. You can use this methode to set your own total text.
        Returns:
        Total text of this row.
        Since:
        12.0
        See Also:
        Text
      • getFieldElement

        @Nullable
        public FieldElement getFieldElement()
        Returns the field element of this row. You can use this method to format the fieldelement of this row.
        Returns:
        FieldElement of this row.
        Since:
        12.0
      • setBackColor

        public void setBackColor​(int backColor)
        Sets the background color of the header.
        You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
        More information about the usage of colors in RDC can be found in the RDC documentation.
        Parameters:
        backColor - the new ABGR value of the grand total background color.
        Since:
        12.0
        See Also:
        ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)
      • getBackColor

        public int getBackColor()
        Returns the background color of the header as ABGR, i.e. 0x000000FF for red.
        Returns:
        ABGR value of the grand total row background color or -1 if cross table contains no rows.
        Since:
        12.0
        See Also:
        setBackColor(int), ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)
      • setBackColorFormula

        public void setBackColorFormula​(FormulaField backColorFormula)
        Sets the formula of the background color of the header.
        You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
        More information about the usage of colors in RDC can be found in the RDC documentation.
        Parameters:
        backColorFormula - the new ABGR value of the grand total background color.
        Since:
        12.0
        See Also:
        ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)
      • getBackColorFormula

        @Nullable
        public FormulaField getBackColorFormula()
        Returns the formula of the background color of the header as ABGR, i.e. 0x000000FF for red.
        Returns:
        ABGR value of the grand total row background color or -1 if cross table contains no rows.
        Since:
        12.0
        See Also:
        ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)
      • isDOMParser

        public boolean isDOMParser()
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Returns whether this node is to be read via a DOM parser.

        Specified by:
        isDOMParser in interface NodeParser
        Returns:
        true if this node is to be read via a DOM parser, false otherwise.
        Since:
        12.0
      • parseDOM

        public void parseDOM​(org.w3c.dom.Node node,
                             java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                      throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses the node.

        Specified by:
        parseDOM in interface NodeParser
        Parameters:
        node - the node
        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.
        Since:
        12.0
      • parseElement

        public NodeParser parseElement​(com.inet.report.parser.XMLTag group,
                                       java.lang.String tag,
                                       org.xml.sax.Attributes atts,
                                       java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                                throws FatalParserException
        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
        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.
        Since:
        12.0
      • parseEndElement

        public void parseEndElement​(com.inet.report.parser.XMLTag group,
                                    java.lang.String tag,
                                    java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                             throws FatalParserException
        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
        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.
        Since:
        12.0
      • parseText

        public void parseText​(java.lang.String text,
                              java.util.Map<java.lang.String,​java.lang.Object> parserMap)
        FOR INTERNAL USE ONLY Internal method for reading report XML

        This method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)

        Specified by:
        parseText in interface NodeParser
        Parameters:
        text - text encountered and to be stored
        parserMap - The map of current Parser.
        Since:
        12.0