java.lang.Objectcom.aspose.words.FormFieldCollection
public class FormFieldCollection
Example:
Document doc = new Document(getMyDir() + "FormFields.doc");
FormFieldCollection formFields = doc.getRange().getFormFields();
Property Getters/Setters Summary | ||
---|---|---|
int | getCount() | |
Returns the number of form fields in the collection. | ||
FormField | get(int index) | |
Returns a form field at the specified index. | ||
FormField | get(java.lang.String bookmarkName) | |
Returns a form field by bookmark name. |
Method Summary | ||
---|---|---|
void | clear() | |
Removes all form fields from this collection and from the document. | ||
java.util.Iterator | iterator() | |
Returns an enumerator object. | ||
void | remove(FormField formField) | |
Removes the specified form field from the document. | ||
void | remove(java.lang.String formField) | |
Removes a form field with the specified name. | ||
void | removeAt(int index) | |
Removes a form field at the specified index. |
Property Getters/Setters Detail |
---|
getCount | |
public int getCount() |
get | |
public FormField get(int index) |
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
index
- An index into the collection.get | |
public FormField get(java.lang.String bookmarkName) |
bookmarkName
- Case-insensitive bookmark name.Method Detail |
---|
clear | |
public void clear() throws java.lang.Exception |
iterator | |
public java.util.Iterator iterator() |
remove | |
public void remove(FormField formField) throws java.lang.Exception |
formField
- The formField to remove.remove | |
public void remove(java.lang.String formField) throws java.lang.Exception |
formField
- The case-insensitive name of the form field to remove.removeAt | |
public void removeAt(int index) throws java.lang.Exception |
index
- The zero-based index of the form field to remove.