com.lowagie.text.pdf.collection

Class PdfCollectionField

public class PdfCollectionField extends PdfDictionary

Author: blowagie

Field Summary
static intCREATIONDATE
A possible type of collection field.
static intDATE
A possible type of collection field.
static intDESC
A possible type of collection field.
protected intfieldType
The type of the PDF collection field.
static intFILENAME
A possible type of collection field.
static intMODDATE
A possible type of collection field.
static intNUMBER
A possible type of collection field.
static intSIZE
A possible type of collection field.
static intTEXT
A possible type of collection field.
Constructor Summary
PdfCollectionField(String name, int type)
Creates a PdfCollectionField.
Method Summary
PdfObjectgetValue(String v)
Returns a PdfObject that can be used as the value of a Collection Item.
booleanisCollectionItem()
Checks 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.

Field Detail

CREATIONDATE

public static final int CREATIONDATE
A possible type of collection field.

DATE

public static final int DATE
A possible type of collection field.

DESC

public static final int DESC
A possible type of collection field.

fieldType

protected int fieldType
The type of the PDF collection field.

Since: 2.1.2 (was called type previously)

FILENAME

public static final int FILENAME
A possible type of collection field.

MODDATE

public static final int MODDATE
A possible type of collection field.

NUMBER

public static final int NUMBER
A possible type of collection field.

SIZE

public static final int SIZE
A possible type of collection field.

TEXT

public static final int TEXT
A possible type of collection field.

Constructor Detail

PdfCollectionField

public PdfCollectionField(String name, int type)
Creates a PdfCollectionField.

Parameters: name the field name type the field type

Method Detail

getValue

public PdfObject getValue(String v)
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)

isCollectionItem

public boolean isCollectionItem()
Checks if the type of the field is suitable for a Collection Item.

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)

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)