Package com.itextpdf.forms.form.element
Class CheckBox
- java.lang.Object
-
- com.itextpdf.commons.actions.sequence.AbstractIdentifiableElement
-
- com.itextpdf.layout.ElementPropertyContainer<T>
-
- com.itextpdf.layout.element.AbstractElement<T>
-
- com.itextpdf.forms.form.element.FormField<CheckBox>
-
- com.itextpdf.forms.form.element.CheckBox
-
- All Implemented Interfaces:
IFormField
,IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
,IAccessibleElement
public class CheckBox extends FormField<CheckBox>
Extension of theFormField
class representing a checkbox so that aCheckBoxRenderer
is used instead of the default renderer for fields.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOGGER
-
Fields inherited from class com.itextpdf.forms.form.element.FormField
tagProperties
-
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
-
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AccessibilityProperties
getAccessibilityProperties()
Gets theaccessibility properties
.protected IRenderer
makeNewRenderer()
Creates new renderer instance.CheckBox
setCheckBoxType(CheckBoxType checkBoxType)
Sets the icon of the checkbox.CheckBox
setChecked(boolean checked)
Sets the checked state of the checkbox.CheckBox
setPdfAConformanceLevel(PdfAConformanceLevel conformanceLevel)
Deprecated.CheckBox
setPdfConformanceLevel(IConformanceLevel conformanceLevel)
Sets the conformance level for the checkbox.CheckBox
setSize(float size)
Sets the size of the checkbox.-
Methods inherited from class com.itextpdf.forms.form.element.FormField
getDefaultProperty, getId, setHeight, setInteractive, setValue, 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, 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
-
-
-
-
Constructor Detail
-
CheckBox
public CheckBox(java.lang.String id)
Creates a newCheckBox
instance.- Parameters:
id
- the id
-
-
Method Detail
-
setChecked
public CheckBox setChecked(boolean checked)
Sets the checked state of the checkbox.- Parameters:
checked
- the checked state to set- Returns:
- this checkbox instance
-
setPdfAConformanceLevel
@Deprecated public CheckBox setPdfAConformanceLevel(PdfAConformanceLevel conformanceLevel)
Deprecated.Sets the PDF/A conformance level for the checkbox. This method is deprecated use setPdfConformanceLevel.- Parameters:
conformanceLevel
- The PDF/A conformance level to set.- Returns:
- This checkbox instance.
-
setPdfConformanceLevel
public CheckBox setPdfConformanceLevel(IConformanceLevel conformanceLevel)
Sets the conformance level for the checkbox.- Parameters:
conformanceLevel
- The PDF/A conformance level to set.- Returns:
- tThis checkbox instance.
-
setCheckBoxType
public CheckBox setCheckBoxType(CheckBoxType checkBoxType)
Sets the icon of the checkbox.- Parameters:
checkBoxType
- the type of the checkbox to set- Returns:
- this checkbox instance
-
setSize
public CheckBox setSize(float size)
Sets the size of the checkbox.
-
getAccessibilityProperties
public AccessibilityProperties getAccessibilityProperties()
Gets theaccessibility properties
. See alsoIAccessibleElement
.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
protected IRenderer makeNewRenderer()
Description copied from class:AbstractElement
Creates new renderer instance.- Specified by:
makeNewRenderer
in classAbstractElement<CheckBox>
- Returns:
- new
IRenderer
-
-