|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSBasedObject
de.intarsys.pdf.pd.PDObject
de.intarsys.pdf.pd.PDAcroFormNode
de.intarsys.pdf.pd.PDAcroFormField
public abstract class PDAcroFormField
Abstract superclass for the different field types in an AcroForm.
Nested Class Summary | |
---|---|
static class |
PDAcroFormField.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static Set |
ACROFORMFIELD_ACTION_TRIGGERS
supported additional action triggers |
static int |
ALIGNMENT_CENTER
alignment constant: 1: Centered |
static int |
ALIGNMENT_LEFT
alignment constant: 0: Left-justified |
static int |
ALIGNMENT_RIGHT
alignment constant: 2: Right-justified |
static COSName |
CN_FT_Btn
Field type Button |
static COSName |
CN_FT_Ch
Field type Choice |
static COSName |
CN_FT_Sig
Field type Signature |
static COSName |
CN_FT_Tx
Field type Text |
static COSName |
DK_DS
The name for the DefaultStyle entry. |
static COSName |
DK_DV
The key for the DefaultValue entry. |
static COSName |
DK_Ff
The name of the FieldFlags entry. |
static COSName |
DK_FT
The name for field types entry. |
static COSName |
DK_Kids
The name for the childrens entry. |
static COSName |
DK_MaxLen
The name for the MaximumLength entry. |
static COSName |
DK_Parent
The name for the parent entry. |
static COSName |
DK_RV
The name for RichTextString value entry. |
static COSName |
DK_T
The name for the partial field name entry, also called the local name. |
static COSName |
DK_TM
The name for the mapping entry. |
static COSName |
DK_TU
The name for the AlternateFieldName entry. |
static COSName |
DK_V
The name for the fields value entry. |
static PDAcroFormField.MetaClass |
META
The meta class instance |
Fields inherited from class de.intarsys.pdf.pd.PDAcroFormNode |
---|
DK_DA, DK_DR, DK_Encoding, DK_Font, DK_Q |
Fields inherited from class de.intarsys.pdf.pd.PDObject |
---|
DK_Subtype, DK_Type |
Fields inherited from interface de.intarsys.pdf.pd.IAdditionalActionSupport |
---|
DK_AA |
Method Summary | |
---|---|
void |
addAnnotation(PDWidgetAnnotation annot)
Insert a new PDAnnotation object for the form field. |
void |
addField(PDAcroFormField field)
Insert a PDAcroFormField in the receiver node. |
int |
basicGetFieldFlags()
Get the integer representing the field flags. |
void |
basicSetFieldFlags(int newFlags)
Assign the integer representing the field flags. |
PDAcroFormField |
copy()
Copy the receiver. |
COSObject |
cosGetDefaultValue()
Tries to return a valid /DV entry: returns its own /DV entry, if it is not null returns the /DV entry of its logical root, if it is not null returns the first /DV entry found of the logical roots kids null if nothing was found |
abstract COSName |
cosGetExpectedFieldType()
The AcroForm field type expected for this. |
COSName |
cosGetFieldType()
The real AcroForm field type of this. |
COSObject |
cosGetValue()
Tries to return a valid /V entry: returns its own /V entry, if it is not null returns the /V entry of its logical root, if it is not null returns the first /V entry found of the logical roots kids null if nothing was found |
COSObject |
cosSetValue(COSObject newValue)
Sets the /V entry in this node and removes all /V entries in child nodes. |
void |
dispose(boolean disposeEmptyAncestors)
Deprecated. |
PDAcroForm |
getAcroForm()
The PDAcroForm for this node. |
PDAdditionalActions |
getAdditionalActions()
|
String |
getAlternateFieldName()
The fields alternate name. |
PDAnnotation |
getAnyAnnotation()
Deprecated. |
String |
getDefaultValueString()
The value from cosGetDefaultValue() converted to a String |
AcroFormFieldFlags |
getFieldFlags()
The flags associated with the form field. |
List |
getGenericChildren()
Get a collection of PDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields). |
PDObject |
getGenericParent()
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields). |
List |
getKids()
The child nodes of this (named after the /Kids key in the defining COSDictionary ); |
String |
getLocalName()
The local name for this node. |
String |
getLocalName(boolean canonical)
The local name for this node. |
PDAcroFormNode |
getLogicalParent()
The logical parent node of this PDAcroFormField. |
PDAcroFormField |
getLogicalRoot()
The logical root node of this PDAcroFormField. |
Integer |
getMaxLen()
The maximum length for this field or null if not defined. |
PDAcroFormField |
getParent()
The parent node of this. |
String |
getQualifiedName()
A fully qualified name for this. |
String |
getQualifiedName(boolean canonical)
A fully qualified name for this. |
Set |
getSupportedTriggerEvents()
|
String |
getValueString()
The value from cosGetValue() converted to a String |
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed. |
boolean |
isAlignmentCenter()
true if variable text in this is centered. |
boolean |
isAlignmentLeft()
true if variable text in this is left aligned. |
boolean |
isAlignmentRight()
true if variable text in this is right aligned. |
boolean |
isAnnotation()
Returns true when the field is an annotation |
boolean |
isComb()
Convenience to access "comb" flag. |
boolean |
isDoNotScroll()
Convenience to access "DoNotScroll" flag. |
boolean |
isMultiline()
Convenience to access "Multiline" flag. |
boolean |
isNoExport()
Convenience to access "NoExport" flag. |
boolean |
isReadOnly()
Convenience to access "ReadOnly" flag. |
boolean |
isTypeBtn()
Return true if this is a field of type "Btn". |
boolean |
isTypeCh()
Return true if this is a field of type "Ch". |
boolean |
isTypeSig()
Return true if this is a field of type "Sig". |
boolean |
isTypeTx()
Return true if this is a text field. |
boolean |
removeField(PDAcroFormField field)
Remove a PDAcroFormField from the receiver. |
void |
reset()
Reset this to its default value. |
void |
setAdditionalActions(PDAdditionalActions actions)
|
void |
setAlignmentCenter()
Make variable text centered. |
void |
setAlignmentLeft()
Make variable text left aligned. |
void |
setAlignmentRight()
Make variable text right aligned. |
void |
setAlternateFieldName(String newAlternateFieldName)
Asssign a alternate field name. |
void |
setComb(boolean f)
Convenience method to access "Comb" flag. |
void |
setDefaultValue(String value)
Assign a new default value. |
void |
setDoNotScroll(boolean f)
Convenience method to access "DoNotScroll" flag. |
void |
setLocalName(String newLocalName)
Assign a new local name. |
void |
setMaxLength(Integer newMaxLength)
Set the maximum length for this field. |
void |
setMultiline(boolean f)
Convenience method to access "Multiline" flag. |
void |
setNoExport(boolean f)
Convenience method to access "NoExport" flag. |
void |
setReadOnly(boolean f)
Convenience method to access "ReadOnly" flag. |
void |
setValueString(String value)
Set the value of this. |
void |
setValueStrings(List values)
Set the value of this to a List of String objects. |
String |
toString()
|
Methods inherited from class de.intarsys.pdf.pd.PDObject |
---|
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, setGenericParent |
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject |
---|
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final COSName DK_FT
public static final COSName CN_FT_Btn
public static final COSName CN_FT_Tx
public static final COSName CN_FT_Ch
public static final COSName CN_FT_Sig
public static final COSName DK_Parent
public static final COSName DK_Kids
public static final COSName DK_T
public static final COSName DK_TU
public static final COSName DK_TM
public static final COSName DK_Ff
For a list of possible flags:
AcroFormFieldFlags
public static final COSName DK_V
public static final COSName DK_DV
public static final int ALIGNMENT_LEFT
public static final int ALIGNMENT_CENTER
public static final int ALIGNMENT_RIGHT
public static final COSName DK_DS
public static final COSName DK_RV
public static final Set ACROFORMFIELD_ACTION_TRIGGERS
public static final PDAcroFormField.MetaClass META
public static final COSName DK_MaxLen
Method Detail |
---|
public void addAnnotation(PDWidgetAnnotation annot)
PDAnnotation
object for the form field. The
annotation represents the visual component displaying the logical form
field. A form field can be represented by more than one annotation.
annot
- The PDAnnotation
to add to the field.public void addField(PDAcroFormField field)
PDAcroFormNode
PDAcroFormField
in the receiver node.
addField
in class PDAcroFormNode
field
- The field to be inserted.public int basicGetFieldFlags()
public void basicSetFieldFlags(int newFlags)
newFlags
- The new flagspublic PDAcroFormField copy()
The copy made does NOT contain any children information.
public COSObject cosGetDefaultValue()
public abstract COSName cosGetExpectedFieldType()
public COSName cosGetFieldType()
public COSObject cosGetValue()
public COSObject cosSetValue(COSObject newValue)
newValue
-
public void dispose(boolean disposeEmptyAncestors)
disposeEmptyAncestors
- public PDAcroForm getAcroForm()
PDAcroFormNode
PDAcroForm
for this node.
getAcroForm
in class PDAcroFormNode
PDAcroForm
for this node.public PDAdditionalActions getAdditionalActions()
getAdditionalActions
in interface IAdditionalActionSupport
public String getAlternateFieldName()
public PDAnnotation getAnyAnnotation()
public AcroFormFieldFlags getFieldFlags()
public List getGenericChildren()
PDObject
PDObject
children if the receiver is a node
in a hierarchical structure (like page nodes or form fields).
This enables the generic implementation of inherited field values and so on.
A concrete PDObject implementation supporting inheritance should implement this method.
getGenericChildren
in class PDObject
PDObject
children if the receiver is a
node in a hierarchical structure .public PDObject getGenericParent()
PDObject
A concrete PDObject implementation supporting inheritance should implement this method.
getGenericParent
in class PDObject
public List getKids()
COSDictionary
);
public String getLocalName()
COSDictionary
.
public String getLocalName(boolean canonical)
COSDictionary
. The name
is transformed to canonical form if canonical
is true.
canonical
- Flag if the name shoul be in canonical form.
public PDAcroFormNode getLogicalParent()
The logical parent is the next node up the parent hierarchy that has a different qualified name, this means it is a node that does not designate the same logical field as the receiver.
public PDAcroFormField getLogicalRoot()
The logical root is the last node up the parent hierarchy that has the name qualified name, this means the topmost node that designates the same logical field as the receiver.
public Integer getMaxLen()
null
if not defined.
null
if not
defined.public PDAcroFormField getParent()
AcroForm fields are arranged in a hierarchical structure, beginning with
the root AcroForm. Fields under the AcroForm return null
as their parent.
public String getQualifiedName()
The name of a acro form field is the concatenation of every node's name in the hierarchy, separated with '.'.
public String getQualifiedName(boolean canonical)
The name of a acro form field is the concatenation of every node's name in the hierarchy, separated with '.'.
canonical
- Flag if the name is in canonical format
public Set getSupportedTriggerEvents()
getSupportedTriggerEvents
in interface IAdditionalActionSupport
public String getValueString()
public String getDefaultValueString()
public void invalidateCaches()
COSBasedObject
invalidateCaches
in class PDAcroFormNode
public boolean isAlignmentCenter()
true
if variable text in this is centered.
true
if variable text in this is centered.public boolean isAlignmentLeft()
true
if variable text in this is left aligned.
true
if variable text in this is left aligned.public boolean isAlignmentRight()
true
if variable text in this is right aligned.
true
if variable text in this is right aligned.public boolean isAnnotation()
public boolean isComb()
public boolean isDoNotScroll()
public boolean isMultiline()
public boolean isNoExport()
public boolean isReadOnly()
public boolean isTypeBtn()
"Btn" means this is a button style object.
public boolean isTypeCh()
"Ch" means this is a choice object.
public boolean isTypeSig()
"Sig" means this is a text style object.
public boolean isTypeTx()
"Tx" means this is a text style object.
public boolean removeField(PDAcroFormField field)
PDAcroFormNode
PDAcroFormField
from the receiver.
removeField
in class PDAcroFormNode
field
- The field to remove.
true
if field
was removed.public void reset()
public void setAdditionalActions(PDAdditionalActions actions)
setAdditionalActions
in interface IAdditionalActionSupport
public void setAlignmentCenter()
public void setAlignmentLeft()
public void setAlignmentRight()
public void setAlternateFieldName(String newAlternateFieldName)
newAlternateFieldName
- The new alternate field namepublic void setComb(boolean f)
public void setDefaultValue(String value)
value
- The new default value.public void setDoNotScroll(boolean f)
public void setLocalName(String newLocalName)
newLocalName
- The new local namepublic void setMaxLength(Integer newMaxLength)
newMaxLength
- The new maximum lengthpublic void setMultiline(boolean f)
public void setNoExport(boolean f)
public void setReadOnly(boolean f)
public void setValueString(String value)
value
- The new value of this, represented by a String
.public void setValueStrings(List values)
List
of String
objects.
values
- The new value.public String toString()
toString
in class PDObject
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |