Package com.itextpdf.layout.element
Class Div
- All Implemented Interfaces:
-
IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
,IAccessibleElement
- Direct Known Subclasses:
-
ListItem
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
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
Constructor Summary
-
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 IRenderer
Creates new renderer instance.setFillAvailableArea
(boolean fillArea) Defines whether theDiv
should occupy all the space left in the available area in case it is the last element in this area.setFillAvailableAreaOnSplit
(boolean fillAreaOnSplit) Defines whether theDiv
should 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, setWidth
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBold, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setItalic, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildren
Methods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRenderer
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Field Details
-
tagProperties
-
-
Constructor Details
-
Div
public Div()
-
-
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:IAccessibleElement
Gets theaccessibility properties
. See alsoIAccessibleElement
.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
setFillAvailableArea
Defines whether theDiv
should 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 theDiv
should 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:AbstractElement
Creates new renderer instance.- Specified by:
-
makeNewRenderer
in classAbstractElement<Div>
- Returns:
-
new
IRenderer
-