Package com.aowagie.text.pdf.collection
Class PdfCollectionField
java.lang.Object
com.aowagie.text.pdf.PdfObject
com.aowagie.text.pdf.PdfDictionary
com.aowagie.text.pdf.collection.PdfCollectionField
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA possible type of collection field.protected intThe type of the PDF collection field.static final intA possible type of collection field.private static final intA possible type of collection field.Fields inherited from class com.aowagie.text.pdf.PdfDictionary
hashMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a PdfObject that can be used as the value of a Collection Item.booleanChecks if the type of the field is suitable for a Collection Item.voidsetEditable(boolean editable) Indication if the field value should be editable in the viewer.voidsetOrder(int i) The relative order of the field name.voidsetVisible(boolean visible) Sets the initial visibility of the field.Methods inherited from class com.aowagie.text.pdf.PdfDictionary
get, getAsArray, getAsDict, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, put, remove, size, toPdf, toStringMethods inherited from class com.aowagie.text.pdf.PdfObject
getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, type
-
Field Details
-
TEXT
private static final int TEXTA possible type of collection field.- See Also:
-
DATE
public static final int DATEA possible type of collection field.- See Also:
-
NUMBER
public static final int NUMBERA possible type of collection field.- See Also:
-
fieldType
protected int fieldTypeThe type of the PDF collection field.- Since:
- 2.1.2 (was called
typepreviously)
-
-
Constructor Details
-
PdfCollectionField
PdfCollectionField()
-
-
Method Details
-
setOrder
public void setOrder(int i) The relative order of the field name. Fields are sorted in ascending order.- Parameters:
i- a number indicating the order of the field
-
setVisible
public void setVisible(boolean visible) Sets the initial visibility of the field.- Parameters:
visible- the default is true (visible)
-
setEditable
public void setEditable(boolean editable) Indication if the field value should be editable in the viewer.- Parameters:
editable- the default is false (not editable)
-
isCollectionItem
public boolean isCollectionItem()Checks if the type of the field is suitable for a Collection Item. -
getValue
Returns a PdfObject that can be used as the value of a Collection Item.- Parameters:
v- value the value that has to be changed into a PdfObject (PdfString, PdfDate or PdfNumber)
-