CheckboxField
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.WidgetAnnotation, com.aspose.pdf.Field
public class CheckboxField extends Field
Class representing checkbox field
Constructors
Constructor | Description |
---|---|
CheckboxField(Page page, Rectangle rect) | Constructor for CheckboxField class. |
CheckboxField(IDocument doc, Rectangle rect) | Constructor for CheckboxField class. |
CheckboxField() | Create instance of CheckboxField. |
CheckboxField(IDocument doc) | Constructor to use with Generator. |
Methods
Method | Description |
---|---|
getAllowedStates() | Returns list of allowed states. |
getOnState() | Returns name of state which is “Checked” state of checkbox. |
getStyle() | Gets style of check box. |
setStyle(int value) | Sets style of check box. |
getActiveState() | Gets current annotation appearance state. |
setActiveState(String value) | Sets current annotation appearance state. |
getChecked() | Gets state of check box. |
setChecked(boolean value) | Sets state of check box. |
getNormalCaption() | Gets normal caption of the field. |
getValue() | Gets value of check box field. |
setValue(String value) | Sets value of check box field. |
deepClone() | Clone the checkbox. |
getExportValue() | Gets or sets export value of CheckBox field. |
setExportValue(String value) | Gets or sets export value of CheckBox field. |
addOption(String optionName) | Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time. |
addOption(String optionName, Rectangle rect) | Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time. |
addOption(String optionName, int page, Rectangle rect) | Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time. |
CheckboxField(Page page, Rectangle rect)
public CheckboxField(Page page, Rectangle rect)
Constructor for CheckboxField class.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Page where check box will be placed. |
rect | Rectangle | Position and size of the check box. |
CheckboxField(IDocument doc, Rectangle rect)
public CheckboxField(IDocument doc, Rectangle rect)
Constructor for CheckboxField class.
Parameters:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document where will be new field created. |
rect | Rectangle | Rectangle where new field will be created. |
CheckboxField()
public CheckboxField()
Create instance of CheckboxField.
CheckboxField(IDocument doc)
public CheckboxField(IDocument doc)
Constructor to use with Generator.
Parameters:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document where field will be created. |
getAllowedStates()
public List<String> getAllowedStates()
Returns list of allowed states.
Returns: java.util.List<java.lang.String> - list of String value
getOnState()
public String getOnState()
Returns name of state which is “Checked” state of checkbox. This is “Yes” if presents or any other value other then “Off” and “No”;
Returns: java.lang.String - String value
getStyle()
public int getStyle()
Gets style of check box.
Returns: int - style of check box.
setStyle(int value)
public void setStyle(int value)
Sets style of check box.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | BoxStyle of check box. |
getActiveState()
public String getActiveState()
Gets current annotation appearance state.
Returns: java.lang.String - String value
setActiveState(String value)
public void setActiveState(String value)
Sets current annotation appearance state.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
getChecked()
public boolean getChecked()
Gets state of check box.
Returns: boolean - boolean value
setChecked(boolean value)
public void setChecked(boolean value)
Sets state of check box.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getNormalCaption()
public String getNormalCaption()
Gets normal caption of the field.
Returns: java.lang.String - String value
getValue()
public String getValue()
Gets value of check box field.
Returns: java.lang.String - String value
setValue(String value)
public void setValue(String value)
Sets value of check box field.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
deepClone()
public Object deepClone()
Clone the checkbox.
Returns: java.lang.Object - The cloned object
getExportValue()
public final String getExportValue()
Gets or sets export value of CheckBox field.
Returns: java.lang.String - String value
setExportValue(String value)
public final void setExportValue(String value)
Gets or sets export value of CheckBox field.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
addOption(String optionName)
public final void addOption(String optionName)
Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time. The new checkbox is added to the bottom of the group.
Parameters:
Parameter | Type | Description |
---|---|---|
optionName | java.lang.String | Value of the option represented by added checkbox. |
addOption(String optionName, Rectangle rect)
public final void addOption(String optionName, Rectangle rect)
Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time.
Parameters:
Parameter | Type | Description |
---|---|---|
optionName | java.lang.String | Value of the option represented by added checkbox. |
rect | Rectangle | Rectangle of the added checkbox. |
addOption(String optionName, int page, Rectangle rect)
public final void addOption(String optionName, int page, Rectangle rect)
Adds new checkbox into a checkbox group, in which at most one of the checkboxes may be checked at any time.
Parameters:
Parameter | Type | Description |
---|---|---|
optionName | java.lang.String | Value of the option represented by added checkbox. |
page | int | Number of the page where the added checkbox should be placed. |
rect | Rectangle | Rectangle of the added checkbox on the page. |