Package com.itextpdf.forms.form.element
Class Radio
- All Implemented Interfaces:
-
IFormField
,IAbstractElement
,IBlockElement
,IElement
,IPropertyContainer
Extension of the
FormField
class representing a radio button so that a RadioRenderer
is used instead of the default renderer for fields.
-
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 TypeMethodDescriptionprotected IRenderer
Creates new renderer instance.setChecked
(boolean checked) Sets the state of the radio button.Methods inherited from class com.itextpdf.forms.form.element.FormField
getDefaultProperty, getId, setHeight, setInteractive, setSize, 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 Details
-
Radio
Creates a newRadio
instance.- Parameters:
-
id
- the id.
-
Radio
Creates a newRadio
instance.- Parameters:
-
id
- the id. -
radioGroupName
- the name of the radio group the radio button belongs to. It has sense only in case this Radio element will not be rendered but Acroform field will be created instead.
-
-
Method Details
-
setChecked
Sets the state of the radio button.- Parameters:
-
checked
-true
if the radio button shall be checked,false
otherwise. By default, the radio button is unchecked. - Returns:
-
this same
Radio
button.
-
makeNewRenderer
Description copied from class:AbstractElement
Creates new renderer instance.- Specified by:
-
makeNewRenderer
in classAbstractElement<Radio>
- Returns:
-
new
IRenderer
-