Package com.itextpdf.layout.element
Class Div
- All Implemented Interfaces:
-
IAbstractElement,IBlockElement,IElement,IPropertyContainer,IAccessibleElement
- Direct Known Subclasses:
-
GridContainer,ListItem,MulticolContainer
A
Div is a container object that defines a section in a document, which will have some shared layout properties. Like all BlockElement types, it will try to take up as much horizontal space as possible.
The concept is very similar to that of the div tag in HTML.
-
Field Summary
FieldsFields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, stylesFields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an area break to the div's contents.add(IBlockElement element) Adds any block element to the div's contents.Adds an image to the div's contents.Gets theaccessibility properties.protected IRendererCreates a new renderer instance.setFillAvailableArea(boolean fillArea) Defines whether theDivshould occupy all the space left in the available area in case it is the last element in this area.setFillAvailableAreaOnSplit(boolean fillAreaOnSplit) Defines whether theDivshould occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.Methods inherited from class com.itextpdf.layout.element.BlockElement
getDefaultProperty, getHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getWidth, isKeepTogether, isKeepWithNext, setHeight, setHeight, setKeepTogether, setKeepWithNext, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setNeutralRole, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddings, setPaddingTop, setRotationAngle, setRotationAngle, setSpacingRatio, setVerticalAlignment, setWidth, setWidthMethods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberMethods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalicMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildrenMethods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRendererMethods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Field Details
-
tagProperties
-
-
Constructor Details
-
Div
public Div()Creates a newDivinstance.
-
-
Method Details
-
add
Adds any block element to the div's contents.- Parameters:
-
element- aBlockElement - Returns:
- this Element
-
add
Adds an image to the div's contents.- Parameters:
-
element- anImage - Returns:
- this Element
-
add
Adds an area break to the div's contents.- Parameters:
-
areaBreak- anAreaBreak - Returns:
- this Element
-
getAccessibilityProperties
Description copied from interface:IAccessibleElementGets theaccessibility properties. See alsoIAccessibleElement.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
setFillAvailableArea
Defines whether theDivshould occupy all the space left in the available area in case it is the last element in this area.- Parameters:
-
fillArea- defines whether the available area should be filled - Returns:
-
this
Div
-
setFillAvailableAreaOnSplit
Defines whether theDivshould occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.- Parameters:
-
fillAreaOnSplit- defines whether the available area should be filled - Returns:
-
this
Div
-
makeNewRenderer
Description copied from class:AbstractElementCreates a new renderer instance.- Specified by:
-
makeNewRendererin classAbstractElement<Div> - Returns:
-
new
IRenderer
-