Class Radio

All Implemented Interfaces:
IFormField, IAbstractElement, IBlockElement, IElement, IPropertyContainer, IAccessibleElement

public class Radio extends FormField<Radio>
Extension of the FormField class representing a radio button so that a RadioRenderer is used instead of the default renderer for fields.
  • Constructor Details

    • Radio

      public Radio (String id)
      Creates a new Radio instance.
      Parameters:
      id - the id.
    • Radio

      public Radio (String id, String radioGroupName)
      Creates a new Radio 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

      public Radio setChecked (boolean checked)
      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.
    • getProperty

      public  T1 getProperty (int property)
      Gets the property from this entity. Compared to IPropertyContainer.getOwnProperty(int), this method can check parent's properties, styles, etc, depending on the origin of the instance
      Specified by:
      getProperty in interface IPropertyContainer
      Overrides:
      getProperty in class AbstractElement<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. null will be returned if the property value was not found
    • getAccessibilityProperties

      public AccessibilityProperties getAccessibilityProperties()
      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 class AbstractElement<Radio>
      Returns:
      new IRenderer