Class Section

    • Constructor Detail

      • Section

        protected Section()
        Default Constructor.
    • Method Detail

      • getDefaultStyleSheet

        public ElementStyleSheet getDefaultStyleSheet()
        Creates the global stylesheet for this element type. The global stylesheet is an immutable stylesheet that provides reasonable default values for some of the style keys.

        The global default stylesheet is always the last stylesheet that will be queried for values.

        Specified by:
        getDefaultStyleSheet in interface ReportElement
        getDefaultStyleSheet in class Element
        the global stylesheet.
      • getElement

        public abstract Element getElement​(int index)
        Returns the element stored add the given index.
        index - the element position within this section
        the element
        IndexOutOfBoundsException - if the index is invalid.
      • getElementCount

        public abstract int getElementCount()
        Returns the number of elements in this section.
        the number of elements of this section.
      • unregisterParent

        protected boolean unregisterParent​(Element element)
        Unregisters the given element from its parent. If the element is already a direct child of this section, this operation does nothing and returns 'true' to indicate that all the work is already done.

        This is a helper function and not meant to be used by the grand public.

        element - the element to be unregistered from its current parent.
        true, if the element is a child of this section, false otherwise.
      • validateLooping

        protected void validateLooping​(Element element)
        Checks whether the element given is a parent of this section. Adding that element to the section would cause infinite loops later, so we prevent it early in the game.
        element - the element to be checked for loops.
      • setElementAt

        public abstract void setElementAt​(int position,
                                          Element element)
      • removeElement

        protected abstract void removeElement​(Element element)
        Removes an element from the section.
        element - the element to be section.
        NullPointerException - if the given element is null.
      • unregisterAsChild

        protected void unregisterAsChild​(Element element)
      • registerAsChild

        protected void registerAsChild​(Element element)
      • derive

        public Section derive​(boolean preserveElementInstanceIds)
        Description copied from class: Element
        Creates a deep copy of this element and regenerates all instance-ids.
        derive in class Element
        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.
        the copy of the element.
      • clone

        public Section clone()
        Description copied from class: Element
        Clones this Element, the datasource and the private stylesheet of this Element. The clone does no longer have a parent, as the old parent would not recognize that new object anymore.
        Specified by:
        clone in interface DataTarget
        clone in class Element
        a clone of this Element.