Package com.lowagie.text.pdf
Class AcroFields.Item
java.lang.Object
com.lowagie.text.pdf.AcroFields.Item
- Enclosing class:
AcroFields
The field representations for retrieval and modification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PdfIndirectReference
The indirect reference of the item itself(package private) ArrayList
<PdfDictionary> An array ofPdfDictionary
with all the field and widget tags merged.An array ofInteger
with the page numbers where the widgets are displayed.An array ofInteger
with the tab order of the field in the page.(package private) ArrayList
<PdfDictionary> An array ofPdfDictionary
where the value tag /V is present.(package private) ArrayList
<PdfIndirectReference> An array ofPdfDictionary
with the widget references.(package private) ArrayList
<PdfDictionary> An array ofPdfDictionary
with the widgets.static final int
writeToAll
constant.static final int
writeToAll
andmarkUsed
constant.static final int
writeToAll
andmarkUsed
constant. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addMerged
(PdfDictionary mergeDict) Adds a merged dictionary to this Item.(package private) void
addPage
(int pg) Adds a page to the current Item.(package private) void
addTabOrder
(int order) Adds a tab order value to this Item.(package private) void
addValue
(PdfDictionary value) Add a value dict to this Item(package private) void
addWidget
(PdfDictionary widget) Add a widget dict to this Item(package private) void
addWidgetRef
(PdfIndirectReference widgRef) Add a widget ref to this Item(package private) void
forcePage
(int idx, int pg) forces a page value into the Item.Returns the indirect reference of the field itselfgetMerged
(int idx) Retrieve the merged dictionary for the given instance.getPage
(int idx) Retrieve the page number of the given instancegetTabOrder
(int idx) Gets the tabOrder.getValue
(int idx) Retrieve the value dictionary of the given instancegetWidget
(int idx) Retrieve the widget dictionary of the given instancegetWidgetRef
(int idx) Retrieve the reference to the given instancevoid
markUsed
(AcroFields parentFields, int writeFlags) Mark all the item dictionaries used matching the given flagsvoid
remove
(int killIdx) Remove the given instance from this item.int
size()
Preferred method of determining the number of instances of a given field.void
writeToAll
(PdfName key, PdfObject value, int writeFlags) This function writes the given key/value pair to all the instances of merged, widget, and/or value, depending on thewriteFlags
setting
-
Field Details
-
WRITE_MERGED
public static final int WRITE_MERGEDwriteToAll
constant.- Since:
- 2.1.5
- See Also:
-
WRITE_WIDGET
public static final int WRITE_WIDGETwriteToAll
andmarkUsed
constant.- Since:
- 2.1.5
- See Also:
-
WRITE_VALUE
public static final int WRITE_VALUEwriteToAll
andmarkUsed
constant.- Since:
- 2.1.5
- See Also:
-
values
ArrayList<PdfDictionary> valuesAn array ofPdfDictionary
where the value tag /V is present. -
widgets
ArrayList<PdfDictionary> widgetsAn array ofPdfDictionary
with the widgets. -
widgetRefs
ArrayList<PdfIndirectReference> widgetRefsAn array ofPdfDictionary
with the widget references. -
merged
ArrayList<PdfDictionary> mergedAn array ofPdfDictionary
with all the field and widget tags merged. -
page
An array ofInteger
with the page numbers where the widgets are displayed. -
tabOrder
An array ofInteger
with the tab order of the field in the page. -
fieldReference
The indirect reference of the item itself
-
-
Constructor Details
-
Item
-
-
Method Details
-
writeToAll
This function writes the given key/value pair to all the instances of merged, widget, and/or value, depending on thewriteFlags
setting- Parameters:
key
- you'll never guess what this is for.value
- if value is null, the key will be removedwriteFlags
- ORed together WRITE_* flags- Since:
- 2.1.5
-
markUsed
Mark all the item dictionaries used matching the given flags- Parameters:
parentFields
- parent fieldswriteFlags
- WRITE_MERGED is ignored- Since:
- 2.1.5
-
size
public int size()Preferred method of determining the number of instances of a given field.- Returns:
- number of instances
- Since:
- 2.1.5
-
remove
public void remove(int killIdx) Remove the given instance from this item. It is possible to remove all instances using this function.- Since:
- 2.1.5
-
getValue
Retrieve the value dictionary of the given instance- Parameters:
idx
- instance index- Returns:
- dictionary storing this instance's value. It may be shared across instances.
- Since:
- 2.1.5
-
addValue
Add a value dict to this Item- Parameters:
value
- new value dictionary- Since:
- 2.1.5
-
getWidget
Retrieve the widget dictionary of the given instance- Parameters:
idx
- instance index- Returns:
- The dictionary found in the appropriate page's Annot array.
- Since:
- 2.1.5
-
addWidget
Add a widget dict to this Item- Since:
- 2.1.5
-
getWidgetRef
Retrieve the reference to the given instance- Parameters:
idx
- instance index- Returns:
- reference to the given field instance
- Since:
- 2.1.5
-
addWidgetRef
Add a widget ref to this Item- Since:
- 2.1.5
-
getMerged
Retrieve the merged dictionary for the given instance. The merged dictionary contains all the keys present in parent fields, though they may have been overwritten (or modified?) by children. Example: a merged radio field dict will contain /V- Parameters:
idx
- instance index- Returns:
- the merged dictionary for the given instance
- Since:
- 2.1.5
-
addMerged
Adds a merged dictionary to this Item.- Since:
- 2.1.5
-
getPage
Retrieve the page number of the given instance- Parameters:
idx
- index- Returns:
- remember, pages are "1-indexed", not "0-indexed" like field instances.
- Since:
- 2.1.5
-
addPage
void addPage(int pg) Adds a page to the current Item.- Since:
- 2.1.5
-
forcePage
void forcePage(int idx, int pg) forces a page value into the Item.- Since:
- 2.1.5
-
getTabOrder
Gets the tabOrder.- Parameters:
idx
- index- Returns:
- tab index of the given field instance
- Since:
- 2.1.5
-
addTabOrder
void addTabOrder(int order) Adds a tab order value to this Item.- Parameters:
order
- order for the tab- Since:
- 2.1.5
-
getFieldReference
Returns the indirect reference of the field itself- Returns:
- PdfIndirectReferenceof the field
-