iText 8.0.5 API
iText.Forms.Form.Element.AbstractSelectField Class Reference

An abstract class for fields that represents a control for selecting one or several of the provided options. More...

Inheritance diagram for iText.Forms.Form.Element.AbstractSelectField:
iText.Forms.Form.Element.FormField< iText.Forms.Form.Element.AbstractSelectField > iText.Forms.Form.Element.ComboBoxField iText.Forms.Form.Element.ListBoxField

Public Member Functions

virtual void  AddOption (IBlockElement optionElement)
  Add a container with options. More...
 
virtual void  AddOption (SelectFieldItem option)
  Add an option to the element. More...
 
virtual void  AddOption (SelectFieldItem option, bool selected)
  Add an option to the element. More...
 
virtual IList< SelectFieldItem GetItems ()
  Get a list of SelectFieldItem. More...
 
virtual int  OptionsCount ()
  Gets the total amount of options available. More...
 
virtual bool  HasOptions ()
  Checks if the element has any options. More...
 
virtual SelectFieldItem  GetOption (String value)
  Get an option SelectFieldItem by its string value. More...
 
virtual IList< IBlockElement GetOptions ()
  Gets a list of containers with option(s). More...
 
virtual bool  HasExportAndDisplayValues ()
  Checks if the field has options with export and display values. More...
 
- Public Member Functions inherited from iText.Forms.Form.Element.FormField< iText.Forms.Form.Element.AbstractSelectField >
virtual T  SetSize (float size)
  Sets the form field's width and height. More...
 
virtual IFormField  SetWidth (float width)
 
virtual IFormField  SetHeight (float height)
 
virtual IFormField  SetValue (String value)
 
virtual String  GetId ()
 
override T1  GetDefaultProperty< T1 > (int property)
 
virtual IFormField  SetInteractive (bool interactive)
 
abstract AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 

Package Functions

  AbstractSelectField (String id)
  Instantiates a new AbstractSelectField instance. More...
 

Package Attributes

IList< SelectFieldItem options = new List<SelectFieldItem>()
 
- Package Attributes inherited from iText.Forms.Form.Element.FormField< iText.Forms.Form.Element.AbstractSelectField >
DefaultAccessibilityProperties  tagProperties
  The tag properties. More...
 

Detailed Description

An abstract class for fields that represents a control for selecting one or several of the provided options.

Constructor & Destructor Documentation

◆ AbstractSelectField()

iText.Forms.Form.Element.AbstractSelectField.AbstractSelectField ( String  id )
inlinepackage

Instantiates a new AbstractSelectField instance.

Parameters
id the id of the field

Member Function Documentation

◆ AddOption() [1/3]

virtual void iText.Forms.Form.Element.AbstractSelectField.AddOption ( IBlockElement  optionElement )
inlinevirtual

Add a container with options.

Add a container with options. This might be a container for options group.

Parameters
optionElement a container with options

◆ AddOption() [2/3]

virtual void iText.Forms.Form.Element.AbstractSelectField.AddOption ( SelectFieldItem  option )
inlinevirtual

Add an option to the element.

Parameters
option a SelectFieldItem

Reimplemented in iText.Forms.Form.Element.ComboBoxField.

◆ AddOption() [3/3]

virtual void iText.Forms.Form.Element.AbstractSelectField.AddOption ( SelectFieldItem  option,
bool  selected 
)
inlinevirtual

Add an option to the element.

Parameters
option a SelectFieldItem
selected

true is the option if selected, false otherwise

◆ GetItems()

virtual IList<SelectFieldItem> iText.Forms.Form.Element.AbstractSelectField.GetItems ( )
inlinevirtual

Get a list of SelectFieldItem.

Returns
a list of options.

◆ GetOption()

virtual SelectFieldItem iText.Forms.Form.Element.AbstractSelectField.GetOption ( String  value )
inlinevirtual

Get an option SelectFieldItem by its string value.

Parameters
value string value to find an option by
Returns
a SelectFieldItem.

◆ GetOptions()

virtual IList<IBlockElement> iText.Forms.Form.Element.AbstractSelectField.GetOptions ( )
inlinevirtual

Gets a list of containers with option(s).

Gets a list of containers with option(s). Every container might be a container for options group.

Returns
a list of containers with options.

◆ HasExportAndDisplayValues()

virtual bool iText.Forms.Form.Element.AbstractSelectField.HasExportAndDisplayValues ( )
inlinevirtual

Checks if the field has options with export and display values.

Returns

true if the field has options with export and display values, false otherwise.

◆ HasOptions()

virtual bool iText.Forms.Form.Element.AbstractSelectField.HasOptions ( )
inlinevirtual

Checks if the element has any options.

Returns
true if the element has options, false otherwise.

◆ OptionsCount()

virtual int iText.Forms.Form.Element.AbstractSelectField.OptionsCount ( )
inlinevirtual

Gets the total amount of options available.

Returns
the number of options in the element.