FormField
Overview
FormField is a class in Aspose.Words FOSS for Java.
Inherits from: SpecialChar, IRunAttrSource.
Represents a single form field.
Edition status of its 103 listed members (a property and its accessor methods are listed separately, overloads once): 103 not yet exercised by a verified example.
This class declares 70 methods for FormField objects in Java programs.
Available methods include: accept, deepClone, getAncestor, getCalculateOnExit, getCheckBoxSize, getChecked, getCustomNodeId, getDefault, getDocument, getDropDownItems, getDropDownSelectedIndex, getEnabled, and 54 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: calculateOnExit, checkBoxExactSize, checkBoxSize, checked, composite, customNodeId, and 31 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
nodeType | int | Read | Returns FormField. |
name | String | Read/Write | Gets or sets the form field name. |
type | int | Read | Gets the type. |
result | String | Read/Write | Gets or sets a string that represents the result of this form field. |
statusText | String | Read/Write | Returns or sets the text that’s displayed in the status bar when a form field has the focus. |
ownStatus | boolean | Read/Write | Specifies the source of the text that’s displayed in the status bar when a form field has the focus. |
helpText | String | Read/Write | Returns or sets the text that’s displayed in a message box when the form field has the focus and the user presses F1. |
ownHelp | boolean | Read/Write | Specifies the source of the text that’s displayed in a message box when a form field has the focus and the user presses F1. |
calculateOnExit | boolean | Read/Write | True if references to the specified form field are automatically updated whenever the field is exited. |
entryMacro | String | Read/Write | Returns or sets an entry macro name for the form field. |
exitMacro | String | Read/Write | Returns or sets an exit macro name for the form field. |
enabled | boolean | Read/Write | True if a form field is enabled. |
textInputFormat | String | Read/Write | Returns or sets the text formatting for a text form field. |
textInputType | int | Read/Write | Gets or sets the type of a text form field. |
textInputDefault | String | Read/Write | Gets or sets the default string or a calculation expression of a text form field. |
maxLength | int | Read/Write | Maximum length for the text field. |
dropDownItems | DropDownItemCollection | Read | Provides access to the items of a dropdown form field. |
dropDownSelectedIndex | int | Read/Write | Gets or sets the index specifying the currently selected item in a dropdown form field. |
checked | boolean | Read/Write | Gets or sets the checked status of the check box form field. |
default | boolean | Read/Write | Gets or sets the default value of the check box form field. |
checkBoxExactSize | boolean | Read/Write | Gets or sets the boolean value that indicates whether the size of the textbox is automatic or specified explicitly. |
checkBoxSize | double | Read/Write | Gets or sets the size of the checkbox in points. |
text | String | Read | Gets the special character that this node represents. |
parentParagraph | Paragraph | Read | Retrieves the parent Paragraph of this node. |
font | Font | Read | Provides access to the font formatting of this object. |
insertRevision | boolean | Read | Gets the insert revision. |
deleteRevision | boolean | Read | Gets the delete revision. |
moveFromRevision | boolean | Read | Gets the move from revision. |
moveToRevision | boolean | Read | Gets the move to revision. |
formatRevision | boolean | Read | Gets the format revision. |
parentNode | CompositeNode | Read | Gets the immediate parent of this node. |
document | DocumentBase | Read | Gets the document to which this node belongs. |
previousSibling | Node | Read | Gets the node immediately preceding this node. |
nextSibling | Node | Read | Gets the node immediately following this node. |
composite | boolean | Read | Returns true if this node can contain other nodes. |
range | Range | Read | Returns a Range object that represents the portion of a document that is contained in this node. |
customNodeId | int | Read/Write | Specifies custom node identifier. |
Methods
| Signature | Description |
|---|---|
accept(visitor: DocumentVisitor) → boolean | Accepts a visitor. |
removeField() | Removes the complete form field, not just the form field special character. |
setTextInputValue(newValue: Object) | Applies the text format specified in TextInputFormat and stores the value in Result. |
getNodeType() → int | Returns FormField. |
getName() → String | Gets or sets the form field name. |
setName(value: String) | Sets the name value. |
getType() → int | Returns the type. |
getResult() → String | Gets or sets a string that represents the result of this form field. |
setResult(value: String) | Sets the result value. |
getStatusText() → String | Returns or sets the text that’s displayed in the status bar when a form field has the focus. |
setStatusText(value: String) | Sets the status text value. |
getOwnStatus() → boolean | Specifies the source of the text that’s displayed in the status bar when a form field has the focus. |
setOwnStatus(value: boolean) | Sets the own status value. |
getHelpText() → String | Returns or sets the text that’s displayed in a message box when the form field has the focus and the user presses F1. |
setHelpText(value: String) | Sets the help text value. |
getOwnHelp() → boolean | Specifies the source of the text that’s displayed in a message box when a form field has the focus and the user presses F1. |
setOwnHelp(value: boolean) | Sets the own help value. |
getCalculateOnExit() → boolean | True if references to the specified form field are automatically updated whenever the field is exited. |
setCalculateOnExit(value: boolean) | Sets the calculate on exit value. |
getEntryMacro() → String | Returns or sets an entry macro name for the form field. |
setEntryMacro(value: String) | Sets the entry macro value. |
getExitMacro() → String | Returns or sets an exit macro name for the form field. |
setExitMacro(value: String) | Sets the exit macro value. |
getEnabled() → boolean | True if a form field is enabled. |
setEnabled(value: boolean) | Sets the enabled value. |
getTextInputFormat() → String | Returns or sets the text formatting for a text form field. |
setTextInputFormat(value: String) | Sets the text input format value. |
getTextInputType() → int | Gets or sets the type of a text form field. |
setTextInputType(value: int) | Sets the text input type value. |
getTextInputDefault() → String | Gets or sets the default string or a calculation expression of a text form field. |
setTextInputDefault(value: String) | Sets the text input default value. |
getMaxLength() → int | Maximum length for the text field. |
setMaxLength(value: int) | Sets the max length value. |
getDropDownItems() → DropDownItemCollection | Provides access to the items of a dropdown form field. |
getDropDownSelectedIndex() → int | Gets or sets the index specifying the currently selected item in a dropdown form field. |
setDropDownSelectedIndex(value: int) | Sets the drop down selected index value. |
getChecked() → boolean | Gets or sets the checked status of the check box form field. |
setChecked(value: boolean) | Sets the checked value. |
getDefault() → boolean | Gets or sets the default value of the check box form field. |
setDefault(value: boolean) | Sets the default value. |
isCheckBoxExactSize() → boolean | Gets or sets the boolean value that indicates whether the size of the textbox is automatic or specified explicitly. |
isCheckBoxExactSize(value: boolean) | Calls isCheckBoxExactSize(value) on this FormField instance. |
getCheckBoxSize() → double | Gets or sets the size of the checkbox in points. |
setCheckBoxSize(value: double) | Sets the check box size value. |
getText() → String | Gets the special character that this node represents. |
getParentParagraph() → Paragraph | Retrieves the parent Paragraph of this node. |
getFont() → Font | Provides access to the font formatting of this object. |
isInsertRevision() → boolean | Returns true if insert revision is set. |
isDeleteRevision() → boolean | Returns true if delete revision is set. |
isMoveFromRevision() → boolean | Returns true if move from revision is set. |
isMoveToRevision() → boolean | Returns true if move to revision is set. |
isFormatRevision() → boolean | Returns true if format revision is set. |
getParentNode() → CompositeNode | Gets the immediate parent of this node. |
getDocument() → DocumentBase | Gets the document to which this node belongs. |
getPreviousSibling() → Node | Gets the node immediately preceding this node. |
getNextSibling() → Node | Gets the node immediately following this node. |
isComposite() → boolean | Returns true if this node can contain other nodes. |
getRange() → Range | Returns a Range object that represents the portion of a document that is contained in this node. |
deepClone(isCloneChildren: boolean) → Node | Calls deepClone(isCloneChildren) on this FormField instance. |
getAncestor(ancestorType: Class) → CompositeNode | Gets the first ancestor of the specified object type. |
getAncestor(ancestorType: int) → CompositeNode | Gets the first ancestor of the specified NodeType. |
remove() | Removes itself from the parent. |
nextPreOrder(rootNode: Node) → Node | Gets next node according to the pre-order tree traversal algorithm. |
previousPreOrder(rootNode: Node) → Node | Gets the previous node according to the pre-order tree traversal algorithm. |
toString(saveFormat: int) → String | Exports the content of the node into a string in the specified format. |
toString(saveOptions: SaveOptions) → String | Exports the content of the node into a string using the specified save options. |
nodeTypeToString(nodeType: int) → String | A utility method that converts a node type enum value into a user friendly string. |
getCustomNodeId() → int | Specifies custom node identifier. |
setCustomNodeId(value: int) | Sets the custom node id value. |
toString() → String | Calls toString on this FormField instance. |