Class ReportDefinitionImpl

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<Element>, DataTarget, ReportDefinition, ReportElement

    public class ReportDefinitionImpl
    extends Section
    implements ReportDefinition
    A report definition. This the working copy of the JFreeReport object. This object is not serializable, as it is used internally. This implementation is not intended to be known outside. Whatever you planned to do with it - dont do it!

    Its only pupose is to be used and manipulated in the report states, there is no reason to do it outside.

    Author:
    Thomas Morgner.
    See Also:
    Serialized Form
    • Method Detail

      • getQuery

        public String getQuery()
        Description copied from interface: ReportDefinition
        Returns the query name that should be used when processing the report.
        Specified by:
        getQuery in interface ReportDefinition
        Returns:
        the query string.
      • getNoDataBand

        public NoDataBand getNoDataBand()
        Returns the "no-data" band, which is displayed if there is no data available.
        Specified by:
        getNoDataBand in interface ReportDefinition
        Returns:
        The no-data band.
      • getGroupCount

        public int getGroupCount()
        Returns the number of groups in this report.

        Every report has at least one group defined.

        Specified by:
        getGroupCount in interface ReportDefinition
        Returns:
        the group count.
      • getGroup

        public Group getGroup​(int groupIndex)
        Returns the group at the specified index or null, if there is no such group.
        Specified by:
        getGroup in interface ReportDefinition
        Parameters:
        groupIndex - the group index.
        Returns:
        the requested group.
        Throws:
        IllegalArgumentException - if the count is negative.
        IndexOutOfBoundsException - if the count is greater than the number of defined groups.
      • clone

        public ReportDefinitionImpl clone()
        Creates and returns a copy of this object.
        Specified by:
        clone in interface DataTarget
        Overrides:
        clone in class Section
        Returns:
        a clone of this instance.
        Throws:
        CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
        See Also:
        Cloneable
      • derive

        public ReportDefinitionImpl derive​(boolean preserveElementInstanceIds)
        Description copied from class: Element
        Creates a deep copy of this element and regenerates all instance-ids.
        Overrides:
        derive in class Section
        Parameters:
        preserveElementInstanceIds - defines whether this call generates new instance-ids for the derived elements. Instance-IDs are used by the report processor to recognize reoccurring elements and must not changed within the report run. Outside of the report processors new instance ids should be generated at all times to separate instances and to make them uniquely identifiable.
        Returns:
        the copy of the element.
      • getPageDefinition

        public PageDefinition getPageDefinition()
        Description copied from interface: ReportDefinition
        Returns the page definition assigned to the report definition. The page definition defines the report area and how the report is subdivided by the child pages.
        Specified by:
        getPageDefinition in interface ReportDefinition
        Returns:
        the page definition.
      • getMasterReport

        public ReportDefinition getMasterReport()
        Description copied from class: Element
        Returns the master-report element. This will be a MasterReport while outside of the report processing. Inside the report processing (when called from a report-definition contained in a report-state), this will be a ReportDefinitionImpl.
        Overrides:
        getMasterReport in class Element
        Returns:
        the master report.
      • removeElement

        protected void removeElement​(Element element)
        Description copied from class: Section
        Removes an element from the section.
        Specified by:
        removeElement in class Section
        Parameters:
        element - the element to be section.
      • getElementCount

        public int getElementCount()
        Description copied from class: Section
        Returns the number of elements in this section.
        Specified by:
        getElementCount in class Section
        Returns:
        the number of elements of this section.
      • getElement

        public Element getElement​(int index)
        Description copied from class: Section
        Returns the element stored add the given index.
        Specified by:
        getElement in class Section
        Parameters:
        index - the element position within this section
        Returns:
        the element