Package com.lowagie.text.pdf
Class AcroFields.Item
- java.lang.Object
-
- com.lowagie.text.pdf.AcroFields.Item
-
- Enclosing class:
- AcroFields
public static class AcroFields.Item extends Object
The field representations for retrieval and modification.
-
-
Field Summary
Fields Modifier and Type Field Description ArrayList<PdfDictionary>mergedDeprecated.(will remove ' public ' in the future)ArrayList<Integer>pageDeprecated.(will remove ' public ' in the future)ArrayList<Integer>tabOrderDeprecated.(will remove ' public ' in the future)ArrayList<PdfDictionary>valuesDeprecated.(will remove ' public ' in the future)ArrayList<PdfIndirectReference>widgetRefsDeprecated.(will remove ' public ' in the future)ArrayList<PdfDictionary>widgetsDeprecated.(will remove ' public ' in the future)static intWRITE_MERGEDwriteToAllconstant.static intWRITE_VALUEwriteToAllandmarkUsedconstant.static intWRITE_WIDGETwriteToAllandmarkUsedconstant.
-
Constructor Summary
Constructors Constructor Description Item(PdfIndirectReference ref)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfIndirectReferencegetFieldReference()Returns the indirect reference of the field itselfPdfDictionarygetMerged(int idx)Retrieve the merged dictionary for the given instance.IntegergetPage(int idx)Retrieve the page number of the given instanceIntegergetTabOrder(int idx)Gets the tabOrder.PdfDictionarygetValue(int idx)Retrieve the value dictionary of the given instancePdfDictionarygetWidget(int idx)Retrieve the widget dictionary of the given instancePdfIndirectReferencegetWidgetRef(int idx)Retrieve the reference to the given instancevoidmarkUsed(AcroFields parentFields, int writeFlags)Mark all the item dictionaries used matching the given flagsvoidremove(int killIdx)Remove the given instance from this item.intsize()Preferred method of determining the number of instances of a given field.voidwriteToAll(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 thewriteFlagssetting
-
-
-
Field Detail
-
WRITE_MERGED
public static final int WRITE_MERGED
writeToAllconstant.- Since:
- 2.1.5
- See Also:
- Constant Field Values
-
WRITE_WIDGET
public static final int WRITE_WIDGET
writeToAllandmarkUsedconstant.- Since:
- 2.1.5
- See Also:
- Constant Field Values
-
WRITE_VALUE
public static final int WRITE_VALUE
writeToAllandmarkUsedconstant.- Since:
- 2.1.5
- See Also:
- Constant Field Values
-
values
public ArrayList<PdfDictionary> values
Deprecated.(will remove ' public ' in the future)An array ofPdfDictionarywhere the value tag /V is present.
-
widgets
public ArrayList<PdfDictionary> widgets
Deprecated.(will remove ' public ' in the future)An array ofPdfDictionarywith the widgets.
-
widgetRefs
public ArrayList<PdfIndirectReference> widgetRefs
Deprecated.(will remove ' public ' in the future)An array ofPdfDictionarywith the widget references.
-
merged
public ArrayList<PdfDictionary> merged
Deprecated.(will remove ' public ' in the future)An array ofPdfDictionarywith all the field and widget tags merged.
-
page
public ArrayList<Integer> page
Deprecated.(will remove ' public ' in the future)An array ofIntegerwith the page numbers where the widgets are displayed.
-
-
Constructor Detail
-
Item
public Item(PdfIndirectReference ref)
-
-
Method Detail
-
writeToAll
public 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 thewriteFlagssetting- 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
public void markUsed(AcroFields parentFields, int writeFlags)
Mark all the item dictionaries used matching the given flags- Parameters:
writeFlags- WRITE_MERGED is ignoredparentFields- parent fields- 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
public PdfDictionary getValue(int idx)
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
-
getWidget
public PdfDictionary getWidget(int idx)
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
-
getWidgetRef
public PdfIndirectReference getWidgetRef(int idx)
Retrieve the reference to the given instance- Parameters:
idx- instance index- Returns:
- reference to the given field instance
- Since:
- 2.1.5
-
getMerged
public PdfDictionary getMerged(int idx)
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
-
getPage
public Integer getPage(int idx)
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
-
getTabOrder
public Integer getTabOrder(int idx)
Gets the tabOrder.- Parameters:
idx- index- Returns:
- tab index of the given field instance
- Since:
- 2.1.5
-
getFieldReference
public PdfIndirectReference getFieldReference()
Returns the indirect reference of the field itself- Returns:
- PdfIndirectReferenceof the field
-
-