public class Field extends WidgetAnnotation implements Iterable<WidgetAnnotation>, Cloneable
Base class for acro form fields.
Modifier and Type | Field and Description |
---|---|
static int |
_FileSelect
_FileSelect
|
static int |
_Password
_Password
|
_disableUpdateAppearance
Constructor and Description |
---|
Field(IDocument doc)
Creates field for use in Generator.
|
Modifier and Type | Method and Description |
---|---|
void |
add(WidgetAnnotation item) |
void |
clear() |
boolean |
contains(WidgetAnnotation item) |
void |
copyTo(Field[] array,
int index)
Copies subfields of this field into array starting from specified index.
|
void |
copyTo(WidgetAnnotation[] array,
int arrayIndex) |
void |
flatten()
Removes this field and place its value directly on the page.
|
WidgetAnnotation |
get_Item(int index)
Gets subfield contained in this field by index.
|
WidgetAnnotation |
get_Item(String name)
Gets subfield contained in this field by name of the subfield.
|
String |
getAlternateName()
Gets alternate name of the field (An alternate field name that shall be used in place of the
actual field name wherever the field shall be identified in the user interface).
|
int |
getAnnotationIndex()
Gets index of this anotation on the page.
|
String |
getMappingName()
Gets mapping name of the field that shall be used when exporting interactive form field data
from the document.
|
static double |
getMaxFontSize()
Maximal font size which can be used for field contents. -1 to don't check size.
|
int |
getPageIndex()
Gets index of page which contains this field.
|
String |
getPartialName()
Gets partial name of the field.
|
Rectangle |
getRect()
Gets the field rectangle.
|
Object |
getSyncRoot()
Synchronization object.
|
int |
getTabOrder()
Gets or sets tab order of the field.
|
String |
getValue()
Gets value of the field.
|
static boolean |
isFitIntoRectangle()
If true then font size will reduced to fit text to specified rectangle.
|
boolean |
isGroup()
Gets boolean value which indicates is this field non-terminal field i.e. group of fields.
|
boolean |
isReadOnly() |
boolean |
isSharedField()
Property for Generator support.
|
boolean |
isSynchronized()
Returns true if dictionary is synchronized.
|
Iterator<WidgetAnnotation> |
iterator()
Returns enumerator of contained fields.
|
boolean |
recalculate()
Recaculates all calculated fields on the form.
|
boolean |
remove(WidgetAnnotation item) |
void |
setAlternateName(String value)
Sets alternate name of the field (An alternate field name that shall be used in place of the
actual field name wherever the field shall be identified in the user interface).
|
void |
setAnnotationIndex(int value)
Sets index of this anotation on the page.
|
static void |
setFitIntoRectangle(boolean value)
If true then font size will reduced to fit text to specified rectangle.
|
void |
setMappingName(String value)
Sets mapping name of the field that shall be used when exporting interactive form field data
from the document.
|
static void |
setMaxFontSize(double value)
Maximal font size which can be used for field contents. -1 to don't check size.
|
void |
setPartialName(String value)
Sets partial name of the field.
|
void |
setPosition(Point point)
Set position of the field.
|
void |
setRect(Rectangle value)
Sets the field rectangle.
|
void |
setSharedField(boolean value)
Property for Generator support.
|
void |
setTabOrder(int value)
Gets or sets tab order of the field.
|
void |
setValue(String value)
Set value.
|
int |
size()
Gets number of subfields in this field.
|
void |
updateAppearances()
Update appearances value.
|
accept, getAnnotationActions, getAnnotationType, getDefaultAppearance, getExportable, getHighlighting, getOnActivated, getParent, getReadOnly, getRequired, setDefaultAppearance, setExportable, setHighlighting, setOnActivated, setReadOnly, setRequired
createAnnotation, getActiveState, getAlignment, getAppearance, getBorder, getCharacteristics, getColor, getContents, getEngineDict, getEngineObj, getFlags, getFullName, getHeight, getHorizontalAlignment_Annotation_New, getModified, getModifiedInternal, getName, getNormalAppearance, getPage, getPageIndex, getPdfActions, getRectangle, getStates, getTextHorizontalAlignment, getWidth, initialize, isUpdateAppearanceOnConvert, isUseFontSubset, setActiveState, setAlignment, setBorder, setColor, setContents, setFlags, setHeight, setHorizontalAlignment_Annotation_New, setModified, setModifiedInternal, setName, setStructParent, setTextHorizontalAlignment, setUpdateAppearanceOnConvert, setUseFontSubset, setWidth
deepClone, getHorizontalAlignment, getHyperlink, getMargin, getVerticalAlignment, getZIndex, isFirstParagraphInColumn, isInLineParagraph, isInNewPage, isKeptWithNext, setFirstParagraphInColumn, setHorizontalAlignment, setHyperlink, setInLineParagraph, setInNewPage, setKeptWithNext, setMargin, setVerticalAlignment, setZIndex
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final int _Password
public static final int _FileSelect
public Field(IDocument doc)
Creates field for use in Generator.
doc
- Document where field will be created.public String getPartialName()
Gets partial name of the field.
public void setPartialName(String value)
Sets partial name of the field.
value
- String valuepublic String getAlternateName()
Gets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface). Alternate name is used as field tooltip in Adobe Acrobat.
public void setAlternateName(String value)
Sets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface). Alternate name is used as field tooltip in Adobe Acrobat.
value
- String valuepublic String getMappingName()
Gets mapping name of the field that shall be used when exporting interactive form field data from the document.
public void setMappingName(String value)
Sets mapping name of the field that shall be used when exporting interactive form field data from the document.
value
- String valuepublic boolean recalculate()
Recaculates all calculated fields on the form.
public String getValue()
Gets value of the field.
public void setValue(String value)
Set value.
value
- String valuepublic boolean isSynchronized()
Returns true if dictionary is synchronized.
public int size()
Gets number of subfields in this field. (For example number of items in radio button field).
public Object getSyncRoot()
Synchronization object.
public boolean isGroup()
Gets boolean value which indicates is this field non-terminal field i.e. group of fields.
public void copyTo(Field[] array, int index)
Copies subfields of this field into array starting from specified index.
array
- Array where field must be copied.index
- Starting index where fields will be copied.public Iterator<WidgetAnnotation> iterator()
Returns enumerator of contained fields.
iterator
in interface Iterable<WidgetAnnotation>
public void flatten()
Removes this field and place its value directly on the page.
flatten
in class Annotation
public WidgetAnnotation get_Item(String name)
Gets subfield contained in this field by name of the subfield.
name
- Contained subfield name.public WidgetAnnotation get_Item(int index)
Gets subfield contained in this field by index.
index
- Index of the reuqested subfield.public void setPosition(Point point)
Set position of the field.
point
- Point where field should be positioned.public void updateAppearances()
Update appearances value.
public int getAnnotationIndex()
Gets index of this anotation on the page.
public void setAnnotationIndex(int value)
Sets index of this anotation on the page.
value
- int valuepublic int getPageIndex()
Gets index of page which contains this field.
getPageIndex
in class Annotation
public Rectangle getRect()
Gets the field rectangle.
getRect
in class Annotation
public void setRect(Rectangle value)
Sets the field rectangle.
setRect
in class Annotation
value
- the field rectangle.public boolean isSharedField()
Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page.
public void setSharedField(boolean value)
Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page.
value
- boolean valuepublic static boolean isFitIntoRectangle()
If true then font size will reduced to fit text to specified rectangle.
public static void setFitIntoRectangle(boolean value)
If true then font size will reduced to fit text to specified rectangle.
value
- boolean valuepublic static double getMaxFontSize()
Maximal font size which can be used for field contents. -1 to don't check size.
public static void setMaxFontSize(double value)
Maximal font size which can be used for field contents. -1 to don't check size.
value
- double valuepublic int getTabOrder()
Gets or sets tab order of the field.
public void setTabOrder(int value)
Gets or sets tab order of the field.
value
- int valuepublic void add(WidgetAnnotation item)
public void clear()
public boolean contains(WidgetAnnotation item)
public void copyTo(WidgetAnnotation[] array, int arrayIndex)
public boolean isReadOnly()
public boolean remove(WidgetAnnotation item)