RadioButtonField

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.WidgetAnnotation, com.aspose.pdf.Field, com.aspose.pdf.ChoiceField

public final class RadioButtonField extends ChoiceField

Class representing radio button field.

Constructors

ConstructorDescription
RadioButtonField(Page page, Rectangle rect)Sets radio button field
RadioButtonField(Page page)Constructor for RadiouttonField
RadioButtonField(IDocument doc)Constructor for RadioButtonField.

Methods

MethodDescription
getStyle()Style of field box.
setStyle(int value)Style of field box.
getSelected()Gets index of selected item.
setSelected(int value)Sets index of selected item.
getOptions()Gets collection of options of the radio button.
getNoToggleToOff()Get or sets the flag that allows the radiobutton to have no selected value.
setNoToggleToOff(boolean value)Get or sets the flag that allows the radiobutton to have no selected value.
updateAppearances()Update appearances value.
add(RadioButtonOptionField newItem)Adds new option field to RadioButton field
addOption(String optionName, Rectangle rect)Add to radio button option with specifed rectangle.
addOption(String optionName)Add option to radion button.
setPosition(Point point)Move all subitems of radio button to specified positins on the page.
getPageIndex()Gets index of page which contains this RadioButton field.
getValue()Gets value of field.
setValue(String value)Sets value of field.

RadioButtonField(Page page, Rectangle rect)

public RadioButtonField(Page page, Rectangle rect)

Sets radio button field

Parameters:

ParameterTypeDescription
pagePagePage object
rectRectangleRectangle object

RadioButtonField(Page page)

public RadioButtonField(Page page)

Constructor for RadiouttonField

Parameters:

ParameterTypeDescription
pagePagePage where radio button will be placed.

RadioButtonField(IDocument doc)

public RadioButtonField(IDocument doc)

Constructor for RadioButtonField.

Parameters:

ParameterTypeDescription
docIDocumentDocument where radio button will be created.

getStyle()

public int getStyle()

Style of field box.

Returns: int - BoxStyle value

setStyle(int value)

public void setStyle(int value)

Style of field box.

Parameters:

ParameterTypeDescription
valueintBoxStyle value

getSelected()

public int getSelected()

Gets index of selected item. Numbering of items is started from 1.

Returns: int - int value

setSelected(int value)

public void setSelected(int value)

Sets index of selected item. Numbering of items is started from 1.

Parameters:

ParameterTypeDescription
valueintint value

getOptions()

public OptionCollection getOptions()

Gets collection of options of the radio button.

Returns: OptionCollection - OptionCollection object

getNoToggleToOff()

public final boolean getNoToggleToOff()

Get or sets the flag that allows the radiobutton to have no selected value. If , exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If , clicking the selected button deselects it, leaving no button selected.


Some PDF readers (including Adobe Acrobat) may ignore the state of the flag.

Returns: boolean - boolean value

setNoToggleToOff(boolean value)

public final void setNoToggleToOff(boolean value)

Get or sets the flag that allows the radiobutton to have no selected value. If , exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If , clicking the selected button deselects it, leaving no button selected.


Some PDF readers (including Adobe Acrobat) may ignore the state of the flag.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

updateAppearances()

public void updateAppearances()

Update appearances value.

add(RadioButtonOptionField newItem)

public void add(RadioButtonOptionField newItem)

Adds new option field to RadioButton field

Parameters:

ParameterTypeDescription
newItemRadioButtonOptionFieldItem which should be added.

addOption(String optionName, Rectangle rect)

public void addOption(String optionName, Rectangle rect)

Add to radio button option with specifed rectangle.

Parameters:

ParameterTypeDescription
optionNamejava.lang.StringName of new option.
rectRectangleNew item rectangle.

addOption(String optionName)

public void addOption(String optionName)

Add option to radion button.

Parameters:

ParameterTypeDescription
optionNamejava.lang.StringName of the option which will be added.

setPosition(Point point)

public void setPosition(Point point)

Move all subitems of radio button to specified positins on the page.

Parameters:

ParameterTypeDescription
pointPointSets position of RadioButton field annotations.

getPageIndex()

public int getPageIndex()

Gets index of page which contains this RadioButton field.

Returns: int - int value

getValue()

public String getValue()

Gets value of field.

Returns: java.lang.String - String value

setValue(String value)

public void setValue(String value)

Sets value of field.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value