Class RootElement<T extends IPropertyContainer>

    • Field Detail

      • immediateFlush

        protected boolean immediateFlush
      • childElements

        protected java.util.List<IElement> childElements
      • defaultFont

        protected PdfFont defaultFont
      • defaultFontProvider

        protected FontProvider defaultFontProvider
    • Constructor Detail

      • RootElement

        public RootElement()
    • Method Detail

      • add

        public T add​(IBlockElement element)
        Adds an element to the root. The element is immediately placed in the contents.
        Parameters:
        element - an element with spacial margins, tabbing, and alignment
        Returns:
        this element
        See Also:
        BlockElement
      • add

        public T add​(Image image)
        Adds an image to the root. The element is immediately placed in the contents.
        Parameters:
        image - a graphical image element
        Returns:
        this element
        See Also:
        Image
      • setFontProvider

        public void setFontProvider​(FontProvider fontProvider)
        Sets FontProvider. Note, font provider is inherited property.
        Parameters:
        fontProvider - instance of FontProvider.
      • getOwnProperty

        public <T1> T1 getOwnProperty​(int property)
        Description copied from interface: IPropertyContainer
        Gets own property from this entity. The property must have been set earlier to this entity. If the property is not found, null will be returned.
        Specified by:
        getOwnProperty in interface IPropertyContainer
        Overrides:
        getOwnProperty in class ElementPropertyContainer<T extends IPropertyContainer>
        Type Parameters:
        T1 - the return type associated with the property
        Parameters:
        property - the property to be retrieved
        Returns:
        the value of the given own property. null will be returned if the property value was not found
      • showTextAligned

        public T showTextAligned​(java.lang.String text,
                                 float x,
                                 float y,
                                 TextAlignment textAlign)
        Convenience method to write a text aligned about the specified point
        Parameters:
        text - text to be placed to the page
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        Returns:
        this object
      • showTextAligned

        public T showTextAligned​(java.lang.String text,
                                 float x,
                                 float y,
                                 TextAlignment textAlign,
                                 float angle)
        Convenience method to write a text aligned about the specified point
        Parameters:
        text - text to be placed to the page
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        angle - the angle of rotation applied to the text, in radians
        Returns:
        this object
      • showTextAligned

        public T showTextAligned​(java.lang.String text,
                                 float x,
                                 float y,
                                 TextAlignment textAlign,
                                 VerticalAlignment vertAlign,
                                 float angle)
        Convenience method to write a text aligned about the specified point
        Parameters:
        text - text to be placed to the page
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        vertAlign - vertical alignment about the specified point
        angle - the angle of rotation applied to the text, in radians
        Returns:
        this object
      • showTextAlignedKerned

        public T showTextAlignedKerned​(java.lang.String text,
                                       float x,
                                       float y,
                                       TextAlignment textAlign,
                                       VerticalAlignment vertAlign,
                                       float radAngle)
        Convenience method to write a kerned text aligned about the specified point
        Parameters:
        text - text to be placed to the page
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        vertAlign - vertical alignment about the specified point
        radAngle - the angle of rotation applied to the text, in radians
        Returns:
        this object
      • showTextAligned

        public T showTextAligned​(Paragraph p,
                                 float x,
                                 float y,
                                 TextAlignment textAlign)
        Convenience method to write a text aligned about the specified point
        Parameters:
        p - paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        Returns:
        this object
      • showTextAligned

        public T showTextAligned​(Paragraph p,
                                 float x,
                                 float y,
                                 TextAlignment textAlign,
                                 VerticalAlignment vertAlign)
        Convenience method to write a text aligned about the specified point
        Parameters:
        p - paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        textAlign - horizontal alignment about the specified point
        vertAlign - vertical alignment about the specified point
        Returns:
        this object
      • showTextAligned

        public T showTextAligned​(Paragraph p,
                                 float x,
                                 float y,
                                 int pageNumber,
                                 TextAlignment textAlign,
                                 VerticalAlignment vertAlign,
                                 float radAngle)
        Convenience method to write a text aligned about the specified point
        Parameters:
        p - paragraph of text to be placed to the page. By default it has no leading and is written in single line. Set width to write multiline text.
        x - the point about which the text will be aligned and rotated
        y - the point about which the text will be aligned and rotated
        pageNumber - the page number to write the text
        textAlign - horizontal alignment about the specified point
        vertAlign - vertical alignment about the specified point
        radAngle - the angle of rotation applied to the text, in radians
        Returns:
        this object
      • ensureRootRendererNotNull

        protected abstract RootRenderer ensureRootRendererNotNull()
      • createAndAddRendererSubTree

        protected void createAndAddRendererSubTree​(IElement element)
      • addElement

        private T addElement​(IElement element)
      • traverseAndCallIso

        private static void traverseAndCallIso​(PdfDocument pdfDocument,
                                               IRenderer renderer)