Class DivTagWorker
java.lang.Object
com.itextpdf.html2pdf.attach.impl.tags.DivTagWorker
- All Implemented Interfaces:
-
IDisplayAware,ITagWorker
- Direct Known Subclasses:
-
ABlockTagWorker,BodyTagWorker,ButtonTagWorker,CaptionTagWorker,DisplayGridTagWorker,HrTagWorker,HTagWorker,OptGroupTagWorker,OptionTagWorker,PageMarginBoxWorker,PreTagWorker
TagWorker class for the
div element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.itextpdf.layout.element.MulticolContainerColumn container element. -
Constructor Summary
ConstructorsModifierConstructorDescriptionDivTagWorker(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context) Creates a newDivTagWorkerinstance.protectedDivTagWorker(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context, com.itextpdf.layout.element.Div container) Creates a newDivTagWorkerinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddBlockChild(com.itextpdf.layout.element.IElement element) Adds a child element to the div block.Gets the display value.com.itextpdf.layout.IPropertyContainerGets a processed object if it can be expressed as anIPropertyContainerinstance.protected voidPost-processes the hanging leaves of the waiting inline elements.booleanprocessContent(String content, ProcessorContext context) Placeholder for what needs to be done while the content of a tag is being processed.voidprocessEnd(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context) Placeholder for what needs to be done after the content of a tag has been processed.booleanprocessTagChild(ITagWorker childTagWorker, ProcessorContext context) Placeholder for what needs to be done when a child node is being processed.
-
Field Details
-
multicolContainer
protected com.itextpdf.layout.element.MulticolContainer multicolContainerColumn container element.
-
-
Constructor Details
-
DivTagWorker
public DivTagWorker(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context) Creates a newDivTagWorkerinstance.- Parameters:
-
element- the element -
context- the context
-
DivTagWorker
protected DivTagWorker(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context, com.itextpdf.layout.element.Div container) Creates a newDivTagWorkerinstance.- Parameters:
-
element- the element -
context- the context -
container- div element container
-
-
Method Details
-
processEnd
public void processEnd(com.itextpdf.styledxmlparser.node.IElementNode element, ProcessorContext context) Description copied from interface:ITagWorkerPlaceholder for what needs to be done after the content of a tag has been processed.- Specified by:
-
processEndin interfaceITagWorker - Parameters:
-
element- the element node -
context- the processor context
-
processContent
Description copied from interface:ITagWorkerPlaceholder for what needs to be done while the content of a tag is being processed.- Specified by:
-
processContentin interfaceITagWorker - Parameters:
-
content- the content of a node -
context- the processor context - Returns:
- true, if content was successfully processed, otherwise false.
-
processTagChild
Description copied from interface:ITagWorkerPlaceholder for what needs to be done when a child node is being processed.- Specified by:
-
processTagChildin interfaceITagWorker - Parameters:
-
childTagWorker- the tag worker of the child node -
context- the processor context - Returns:
- true, if child was successfully processed, otherwise false.
-
getElementResult
public com.itextpdf.layout.IPropertyContainer getElementResult()Description copied from interface:ITagWorkerGets a processed object if it can be expressed as anIPropertyContainerinstance.- Specified by:
-
getElementResultin interfaceITagWorker - Returns:
-
the same object on every call. Might return null either if result is not yet produced or if this particular tag worker doesn't produce result in a form of
IPropertyContainer.
-
getDisplay
Description copied from interface:IDisplayAwareGets the display value.- Specified by:
-
getDisplayin interfaceIDisplayAware - Returns:
- the display value
-
addBlockChild
protected boolean addBlockChild(com.itextpdf.layout.element.IElement element) Adds a child element to the div block.- Parameters:
-
element- the element - Returns:
- true, if successful
-
postProcessInlineGroup
protected void postProcessInlineGroup()Post-processes the hanging leaves of the waiting inline elements.
-