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
Constructor | Description |
---|---|
RadioButtonField(Page page, Rectangle rect) | Sets radio button field |
RadioButtonField(Page page) | Constructor for RadiouttonField |
RadioButtonField(IDocument doc) | Constructor for RadioButtonField. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
page | Page | Page object |
rect | Rectangle | Rectangle object |
RadioButtonField(Page page)
public RadioButtonField(Page page)
Constructor for RadiouttonField
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Page where radio button will be placed. |
RadioButtonField(IDocument doc)
public RadioButtonField(IDocument doc)
Constructor for RadioButtonField.
Parameters:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document 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:
Parameter | Type | Description |
---|---|---|
value | int | BoxStyle 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:
Parameter | Type | Description |
---|---|---|
value | int | int 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
updateAppearances()
public void updateAppearances()
Update appearances value.
add(RadioButtonOptionField newItem)
public void add(RadioButtonOptionField newItem)
Adds new option field to RadioButton field
Parameters:
Parameter | Type | Description |
---|---|---|
newItem | RadioButtonOptionField | Item 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:
Parameter | Type | Description |
---|---|---|
optionName | java.lang.String | Name of new option. |
rect | Rectangle | New item rectangle. |
addOption(String optionName)
public void addOption(String optionName)
Add option to radion button.
Parameters:
Parameter | Type | Description |
---|---|---|
optionName | java.lang.String | Name 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:
Parameter | Type | Description |
---|---|---|
point | Point | Sets 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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |