Package com.itextpdf.forms.form.element
Class Radio
- java.lang.Object
-
- All Implemented Interfaces:
IFormField,IAbstractElement,IBlockElement,IElement,IPropertyContainer,IAccessibleElement
public class Radio extends FormField<Radio>
Extension of theFormFieldclass representing a radio button so that aRadioRendereris used instead of the default renderer for fields.
-
-
Field Summary
-
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 Modifier and Type Method Description AccessibilityPropertiesgetAccessibilityProperties()Gets theaccessibility properties.<T1> T1getProperty(int property)Gets the property from this entity.protected IRenderermakeNewRenderer()Creates a new renderer instance.RadiosetChecked(boolean checked)Sets the state of the radio button.-
Methods inherited from class com.itextpdf.forms.form.element.FormField
getDefaultProperty, getId, setAlternativeDescription, setHeight, setInteractive, setSize, setValue, setWidth
-
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
-
Methods 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, simulateItalic
-
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, hasOwnProperty, hasProperty, setProperty
-
-
-
-
Constructor Detail
-
Radio
public Radio(java.lang.String id)
Creates a newRadioinstance.- Parameters:
id- the id.
-
Radio
public Radio(java.lang.String id, java.lang.String radioGroupName)Creates a newRadioinstance.- 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 Detail
-
setChecked
public Radio setChecked(boolean checked)
Sets the state of the radio button.- Parameters:
checked-trueif the radio button shall be checked,falseotherwise. By default, the radio button is unchecked.- Returns:
- this same
Radiobutton.
-
getProperty
public <T1> T1 getProperty(int property)
Gets the property from this entity. Compared toIPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance- Specified by:
getPropertyin interfaceIPropertyContainer- Overrides:
getPropertyin classAbstractElement<Radio>- Type Parameters:
T1- the return type associated with the property- Parameters:
property- the property to be retrieved- Returns:
- the value of the given property.
nullwill be returned if the property value was not found
-
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:AbstractElementCreates a new renderer instance.- Specified by:
makeNewRendererin classAbstractElement<Radio>- Returns:
- new
IRenderer
-
-