Class Region

  • All Implemented Interfaces:
    NodeParser, com.inet.report.ReferenceHolder, java.io.Serializable
    Direct Known Subclasses:
    Area, Section

    public abstract class Region
    extends ReportComponent
    The Region class is the super class of Area and Section. It describes a logical region in the report.
    Since:
    10.0
    See Also:
    Serialized Form
    • Field Detail

      • PAGE_HEADER

        public static final int PAGE_HEADER
        Identifier for page header area or section.
        See Also:
        Constant Field Values
      • PAGE_FOOTER

        public static final int PAGE_FOOTER
        Identifier for page footer area or section.
        See Also:
        Constant Field Values
      • REPORT_HEADER

        public static final int REPORT_HEADER
        Identifier for report header area or section.
        See Also:
        Constant Field Values
      • REPORT_FOOTER

        public static final int REPORT_FOOTER
        Identifier for report footer area or section.
        See Also:
        Constant Field Values
      • GROUP_HEADER

        public static final int GROUP_HEADER
        Identifier for group header area or section.
        See Also:
        Constant Field Values
      • GROUP_FOOTER

        public static final int GROUP_FOOTER
        Identifier for group footer area or section.
        See Also:
        Constant Field Values
      • DETAIL

        public static final int DETAIL
        Identifier for detail area or section.
        See Also:
        Constant Field Values
    • Method Detail

      • setNewPageBefore

        public void setNewPageBefore​(boolean newValue)
        Sets the value of the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
        Parameters:
        newValue - The new value of the property 'new page before'.
        Since:
        10.0
      • isNewPageBefore

        public boolean isNewPageBefore()
        Returns the value of the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
        Returns:
        The current value of the property 'new page before'.
        Since:
        7.0
      • setNewPageBeforeFormula

        public void setNewPageBeforeFormula​(FormulaField newFormula)
        Sets the formula for the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
        Parameters:
        newFormula - The new formula for the property 'new page before'.
        Since:
        10.0
      • getNewPageBeforeFormula

        public FormulaField getNewPageBeforeFormula()
        Returns the formula for the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
        Returns:
        FormulaField The formula for the property 'new page before'.
        Since:
        10.0
      • setNewPageAfter

        public void setNewPageAfter​(boolean newValue)
        Sets the value of the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
        Parameters:
        newValue - The new value of the property 'new page after'.
        Since:
        10.0
      • isNewPageAfter

        public boolean isNewPageAfter()
        Returns the value of the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
        Returns:
        The current value of the property 'new page after'.
        Since:
        7.0
      • setNewPageAfterFormula

        public void setNewPageAfterFormula​(FormulaField newFormula)
        Sets the formula for the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
        Parameters:
        newFormula - The new formula for the property 'new page after'.
        Since:
        10.0
      • getNewPageAfterFormula

        public FormulaField getNewPageAfterFormula()
        Returns the formula for the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
        Returns:
        FormulaField The formula for the property 'new page after'.
        Since:
        10.0
      • isAtBottomOfPage

        public boolean isAtBottomOfPage()
        Gets the 'print at bottom of page' property. If this property is set each element in group will be printed at bottom of page only.
        Returns:
        The current value of the 'print at bottom of page' property.
        Since:
        7.0
      • setAtBottomOfPage

        public void setAtBottomOfPage​(boolean atBottomOfPage)
        Sets the 'print at bottom of page' property. If this property is set each element in group will be printed at bottom of page only.
        Parameters:
        atBottomOfPage - The value of the property 'print at bottom of page.
        Since:
        10.0
      • setAtBottomOfPageFormula

        public void setAtBottomOfPageFormula​(FormulaField newFormula)
        Sets the formula for the property 'print at bottom of page'. If this property is set each element in group will be printed at bottom of page only.
        Parameters:
        newFormula - The new formula for the property 'print at bottom of page'.
        Since:
        10.0
      • getAtBottomOfPageFormula

        public FormulaField getAtBottomOfPageFormula()
        Gets the formula for the property 'print at bottom of page'. If this property is set each element in group will be printed at bottom of page only.
        Returns:
        The current formula for the property 'print at bottom of page'.
        Since:
        10.0
      • isResetPageNumber

        public boolean isResetPageNumber()
        Gets the 'reset page number' property. If this property is enabled the page number of the next page will reset to 1 after each group.
        Returns:
        The current value of the 'reset page number' property.
        Since:
        7.0
      • setResetPageNumber

        public void setResetPageNumber​(boolean resetPageNumber)
        Sets the 'reset page number' property. If this property is enabled the page number of the next page will reset to 1 after each group.
        Parameters:
        resetPageNumber - The value of the property 'reset page number'.
        Since:
        10.0
      • setResetPageNumberFormula

        public void setResetPageNumberFormula​(FormulaField newFormula)
        Sets the formula for the property 'reset page number'. If this property is enabled the page number of the next page will reset to 1 after each group.
        Parameters:
        newFormula - The new formula for the property 'reset page number'.
        Since:
        10.0
      • getResetPageNumberFormula

        public FormulaField getResetPageNumberFormula()
        Gets the formula for the property 'reset page number'. If this property is enabled the page number of the next page will reset to 1 after each group.
        Returns:
        The current formula for the property 'reset page number'.
        Since:
        10.0
      • setSuppressOnDrillDown

        public void setSuppressOnDrillDown​(boolean newValue)
        Sets the value of the property 'suppressOnDrillDown'. Set this property if you want the Section to be suppress in drill-down only.
        Parameters:
        newValue - The new value of the property 'drillDown'.
        Since:
        10.0
      • isSuppressOnDrillDown

        public boolean isSuppressOnDrillDown()
        Returns the value of the property 'drillDown'. Use this property if you want the Section to be suppress in drill-down only.
        Returns:
        The value of the property 'drillDown'
        Since:
        7.0
      • setSuppressOnDrillDownFormula

        public void setSuppressOnDrillDownFormula​(FormulaField newFormula)
        Sets the value of the formula 'suppressOnDrillDown'. Set this property if you want the Section to be suppress in drill-down only.
        Parameters:
        newFormula - The new value of the formula 'drillDown'.
        Since:
        10.0
      • getTypeAsString

        public java.lang.String getTypeAsString()
        FOR INTERNAL USE ONLY
        Returns:
        the area type as string.
        Since:
        6.1
      • isHeader

        public boolean isHeader()
        Return whether this Area is a header area or not.
        Returns:
        true if this area is a header area, else false.
        Since:
        10.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 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 ReportComponent
        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.