Ejemplo n.º 1
0
        /// <summary>Creates a renderer subtree with root in the current table element.</summary>
        /// <remarks>
        /// Creates a renderer subtree with root in the current table element.
        /// Compared to
        /// <see cref="GetRenderer()"/>
        /// , the renderer returned by this method should contain all the child
        /// renderers for children of the current element.
        /// </remarks>
        /// <returns>
        /// a
        /// <see cref="iText.Layout.Renderer.TableRenderer"/>
        /// subtree for this element
        /// </returns>
        public override IRenderer CreateRendererSubTree()
        {
            TableRenderer rendererRoot = (TableRenderer)GetRenderer();

            foreach (IElement child in childElements)
            {
                bool childShouldBeAdded = isComplete || CellBelongsToAnyRowGroup((Cell)child, lastAddedRowGroups);
                if (childShouldBeAdded)
                {
                    rendererRoot.AddChild(child.CreateRendererSubTree());
                }
            }
            return(rendererRoot);
        }