Class ParaGraph
java.lang.Object
com.itextpdf.tool.xml.html.AbstractTagProcessor
com.itextpdf.tool.xml.html.ParaGraph
- All Implemented Interfaces:
CssAppliersAware, TagProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddTabIntervalContent(WorkerContext ctx, Tag tag, List<Element> currentContent, Paragraph p, String value) Applies the tab interval of the p tag on itsTabbedChunkelements.private voidaddTabStopsContent(List<Element> currentContent, Paragraph p, String value) Applies the tab stops of the p tag on itsTabbedChunkelements.content(WorkerContext ctx, Tag tag, String content) This method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.end(WorkerContext ctx, Tag tag, List<Element> currentContent) Classes extending AbstractTagProcessor should override this method for actions that should be done inTagProcessor.endElement(WorkerContext, Tag, List).private TaggetLastChild(Tag tag) booleanDefaults to false.protected voidprocessListItems(WorkerContext ctx, Tag tag, List<ListItem> listItems, List<Element> l) protected voidprocessParagraphItems(WorkerContext ctx, Tag tag, List<Element> paragraphItems, List<Element> l) Methods inherited from class AbstractTagProcessor
createParagraph, currentContentToParagraph, currentContentToParagraph, doRtlIndentCorrections, endElement, getCssAppliers, getCSSResolver, getHtmlPipelineContext, getRunDirection, invertTextAlignForParagraph, invertTextAlignForParagraph, setCssAppliers, start, startElement, textContent, updateParagraphFontIfNeeded
-
Constructor Details
-
ParaGraph
public ParaGraph()
-
-
Method Details
-
content
Description copied from interface:TagProcessorThis method is called if there is text content encountered between the opening and closing tags this TagProcessor is mapped to.- Specified by:
contentin interfaceTagProcessor- Overrides:
contentin classAbstractTagProcessor- Parameters:
ctx- the WorkerContexttag- the tag encounteredcontent- the text content between the tags this TagProcessor is mapped to.- Returns:
- the element to add to the currentContent list
-
getLastChild
-
end
Description copied from class:AbstractTagProcessorClasses extending AbstractTagProcessor should override this method for actions that should be done inTagProcessor.endElement(WorkerContext, Tag, List). TheAbstractTagProcessor.endElement(WorkerContext, Tag, List)calls this method after or before doing certain stuff, (see it's description).- Overrides:
endin classAbstractTagProcessor- Parameters:
ctx- the WorkerContexttag- the tagcurrentContent- the content created from e.g. inner tags, inner content and not yet added to document.- Returns:
- a List containing iText Element objects
-
processParagraphItems
-
processListItems
-
addTabIntervalContent
private void addTabIntervalContent(WorkerContext ctx, Tag tag, List<Element> currentContent, Paragraph p, String value) Applies the tab interval of the p tag on itsTabbedChunkelements.
The style "xfa-tab-count" of theTabbedChunkis multiplied with the tab interval of the p tag. This width is then added to a newTabbedChunk. 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
Applies the tab stops of the p tag on itsTabbedChunkelements.- 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".
-
isStackOwner
public boolean isStackOwner()Description copied from class:AbstractTagProcessorDefaults to false.- Specified by:
isStackOwnerin interfaceTagProcessor- Overrides:
isStackOwnerin classAbstractTagProcessor- Returns:
- true if the tag implementation must keep it's own currentContent stack.
- See Also:
-