|
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
public abstract class PDAcroFormNode
Abstract superclass to factor out commons between AcroForm and AcroForm field.
Nested Class Summary | |
---|---|
static class |
PDAcroFormNode.MetaClass
The meta class implementation |
Field Summary | |
---|---|
static COSName |
DK_DA
The name for the DefaultAppereance entry. |
static COSName |
DK_DR
The name for the default resources. |
static COSName |
DK_Encoding
The name for the Encoding. |
static COSName |
DK_Font
The name for the fonts. |
static COSName |
DK_Q
The name for the Quadding entry. |
static PDAcroFormNode.MetaClass |
META
The meta class instance |
Fields inherited from class de.intarsys.pdf.pd.PDObject |
---|
DK_Subtype, DK_Type |
Method Summary | |
---|---|
abstract void |
addField(PDAcroFormField field)
Insert a PDAcroFormField in the receiver node. |
static String |
canonicalize(String name)
Create a canonical form of the field name. |
List |
collectLeafFields()
The list of all final nodes (fields) within this node. |
abstract PDAcroForm |
getAcroForm()
The PDAcroForm for this node. |
PDAnnotation |
getAnnotation(int index)
Get an annotation from the tree beyond this identified by
index . |
List |
getAnnotations()
A list of all annotations in the tree beyond this . |
CSContent |
getDefaultAppearanceContent()
The CSContent fragment defining the default appearance to be used
for variable text fields. |
PDFont |
getDefaultAppearanceFont()
The font object defined by the default appearance. |
float[] |
getDefaultAppearanceFontColor()
The font color defined by the default appearance. |
COSName |
getDefaultAppearanceFontName()
The font name used by the default appearance to select a font from the resources. |
float |
getDefaultAppearanceFontSize()
The font size defined by the default appearance, |
PDAcroFormField |
getField(String path)
The sub-node identified by path . |
PDAcroFormField |
getField(String name,
boolean canonicalName)
The sub-node identified by path . |
int |
getQuadding()
The justification of variable text within the field. |
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed. |
abstract boolean |
removeField(PDAcroFormField field)
Remove a PDAcroFormField from the receiver. |
void |
setDefaultAppearanceContent(CSContent pContent)
Set the content stream fragment to be used as the default appearance with variable text fields. |
void |
setDefaultAppearanceFont(PDFont font)
Set the font to be used as the default font in variable text fields. |
void |
setDefaultAppearanceFontColor(float[] color)
Set the font color to be used as the default font color in variable text fields. |
void |
setDefaultAppearanceFontSize(float size)
Set the font size to be used as the default font size in variable text fields. |
void |
setQuadding(int quadding)
Set the justification of variable text within the field. |
Methods inherited from class de.intarsys.pdf.pd.PDObject |
---|
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, getGenericParent, setGenericParent, toString |
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_Encoding
public static final COSName DK_DR
public static final COSName DK_Font
public static final COSName DK_DA
public static final COSName DK_Q
public static final PDAcroFormNode.MetaClass META
Method Detail |
---|
public static String canonicalize(String name)
name
- The field name to be converted.
public abstract void addField(PDAcroFormField field)
PDAcroFormField
in the receiver node.
field
- The field to be inserted.public abstract boolean removeField(PDAcroFormField field)
PDAcroFormField
from the receiver.
field
- The field to remove.
true
if field
was removed.public abstract PDAcroForm getAcroForm()
PDAcroForm
for this node.
PDAcroForm
for this node.public PDAnnotation getAnnotation(int index)
this
identified by
index
.
this
identified
by index
.public List getAnnotations()
this
.
this
.public CSContent getDefaultAppearanceContent()
CSContent
fragment defining the default appearance to be used
for variable text fields.
CSContent
fragment defining the default appearance to
be used for variable text fields.public PDFont getDefaultAppearanceFont()
public float[] getDefaultAppearanceFontColor()
public COSName getDefaultAppearanceFontName()
public float getDefaultAppearanceFontSize()
public PDAcroFormField getField(String path)
path
. The path
may be a navigation path containing multiple segments separated by a ".",
each segment identifying a sub node in the node found so far.
The navigation starts at this and the first path segment is matched
against the node's children. Example:
AcroForm
|
+ Field1
|
+ Group1
|
+ FieldA
|
+ FieldB
When requesting the form itself, Field1 is addressed
form.getField("Field1");
FieldA can be looked up
form.getField("Group1.FieldA");
or
group = form.getField("Group1");
group.getField("FieldA");
path
- The navigation path to the field.
path
.public PDAcroFormField getField(String name, boolean canonicalName)
path
. The path
may be a navigation path containing multiple segments separated by a ".",
each segment identifying a sub node in the node found so far. If
canonicalName
is true
, the name will be
transformed to a canonical format before lookup.
name
- The navigation path to the field.canonicalName
- Flag if lookup uses canonical form.
path
public List collectLeafFields()
public int getQuadding()
public void invalidateCaches()
COSBasedObject
invalidateCaches
in class COSBasedObject
public void setDefaultAppearanceContent(CSContent pContent)
pContent
- The new default appearance content.public void setDefaultAppearanceFont(PDFont font)
font
- The font to be used as the default font in variable text
fields.public void setDefaultAppearanceFontColor(float[] color)
color
- The font color to be used as the default font color in
variable text fields.public void setDefaultAppearanceFontSize(float size)
size
- The font size to be used as the default font size in variable
text fields.public void setQuadding(int quadding)
quadding
- THe new quadding value
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |