Class CrosstabCellBody

    • Constructor Detail

      • CrosstabCellBody

        public CrosstabCellBody()
    • Method Detail

      • getHeader

        public DetailsHeader getHeader()
        Returns the group header.

        The group header is a report band that contains elements that should be printed at the start of a group.

        Returns:
        the group header.
      • setHeader

        public void setHeader​(DetailsHeader header)
        Sets the header for the group.
        Parameters:
        header - the header (null not permitted).
        Throws:
        NullPointerException - if the given header is null
      • addElement

        public void addElement​(CrosstabCell element)
        Adds a report element to the band.
        Parameters:
        element - the element that should be added
        Throws:
        NullPointerException - if the given element is null
        IllegalArgumentException - if the position is invalid, either negative or greater than the number of elements in this band or if the given element is a parent of this element.
      • addElement

        public void addElement​(int position,
                               CrosstabCell element)
        Adds a report element to the band. The element will be inserted at the specified position.
        Parameters:
        position - the position where to insert the element
        element - the element that should be added
        Throws:
        NullPointerException - if the given element is null
        IllegalArgumentException - if the position is invalid, either negative or greater than the number of elements in this band or if the given element is a parent of this element.
      • findElement

        public CrosstabCell findElement​(String rowKeys,
                                        String colKeys)
        Returns the matching crosstab-cell for the given key set. When searching a detail cell, give an empty set. When searching for a column-summary cell, give the column group field. Same for row-summary-cells. For total cells, give both the column and row field.
        Parameters:
        rowKeys - the known row-keys for the lookup.
        colKeys - the known col-keys for the lookup.
        Returns:
        the first element with the specified name, or null if there is no such element.
        Throws:
        NullPointerException - if the given name is null.
      • removeElement

        public void removeElement​(Element e)
        Removes an element from the band.
        Specified by:
        removeElement in class Section
        Parameters:
        e - the element to be removed.
        Throws:
        NullPointerException - if the given element is null.
      • clear

        public void clear()
      • getElementCount

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

        public Element getElement​(int index)
        Returns the element stored add the given index.
        Specified by:
        getElement in class Section
        Parameters:
        index - the element position within this band
        Returns:
        the element
        Throws:
        IndexOutOfBoundsException - if the index is invalid.
      • toString

        public String toString()
        Returns a string representation of the band, useful mainly for debugging purposes.
        Overrides:
        toString in class Element
        Returns:
        a string representation of this band.
      • clone

        public CrosstabCellBody clone()
        Clones this band and all elements contained in this band. After the cloning the band is no longer connected to a report definition.
        Specified by:
        clone in interface DataTarget
        Overrides:
        clone in class Section
        Returns:
        the clone of this band.
      • derive

        public CrosstabCellBody derive​(boolean preserveElementInstanceIds)
        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.