Class ParaGraph

    • Constructor Detail

      • ParaGraph

        public ParaGraph()
    • Method Detail

      • content

        public java.util.List<Element> content​(WorkerContext ctx,
                                               Tag tag,
                                               java.lang.String content)
        Description copied from interface: TagProcessor
        This method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.
        Specified by:
        content in interface TagProcessor
        Overrides:
        content in class AbstractTagProcessor
        Parameters:
        ctx - the WorkerContext
        tag - the tag encountered
        content - the text content between the tags this TagProcessor is mapped to.
        Returns:
        the element to add to the currentContent list
      • getLastChild

        private Tag getLastChild​(Tag tag)
      • processParagraphItems

        protected void processParagraphItems​(WorkerContext ctx,
                                             Tag tag,
                                             java.util.List<Element> paragraphItems,
                                             java.util.List<Element> l)
      • addTabIntervalContent

        private void addTabIntervalContent​(WorkerContext ctx,
                                           Tag tag,
                                           java.util.List<Element> currentContent,
                                           Paragraph p,
                                           java.lang.String value)
        Applies the tab interval of the p tag on its TabbedChunk elements.
        The style "xfa-tab-count" of the TabbedChunk is multiplied with the tab interval of the p tag. This width is then added to a new TabbedChunk.
        Elements other than TabbedChunks are added directly to the given Paragraph p.
        Parameters:
        currentContent - containing the elements inside the p tag.
        p - paragraph to which the tabbed chunks will be added.
        value - the value of style "tab-interval".
      • addTabStopsContent

        private void addTabStopsContent​(java.util.List<Element> currentContent,
                                        Paragraph p,
                                        java.lang.String value)
        Applies the tab stops of the p tag on its TabbedChunk elements.
        Parameters:
        currentContent - containing the elements inside the p tag.
        p - paragraph to which the tabbed chunks will be added.
        value - the value of style "tab-stops".