|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfAnnot
com.gnostice.pdfone.PdfProAnnot
com.gnostice.pdfone.PdfFormField
com.gnostice.pdfone.PdfFormTextField
This class represents a text box form field.
// Create a PDF page PdfPage page = new PdfPage(); // Create a text box form field PdfFormTextField tf1 = new PdfFormTextField( new PdfRect(300, 100, 100, 20), "tf_name", PdfFormField.FLAG_REQUIRED, Color.BLACK, Color.YELLOW); tf1.setBorderColor(Color.BLACK); tf1.setValue("Enter name here"); // Add the form field to the page page.addFormField(tf1); page.writeText("Enter name", 225, 105);
Field Summary | |
static int |
FLAG_COMB
Flag specifying that viewer applications will divide the text field into a number of boxes , each of
which will accept only one character entered by the user. |
static int |
FLAG_FILESELECT
Flag specifying whether contents of the file whose pathname has been entered by the user in the text field will be submitted as the value of the field when the form is submitted. |
static int |
FLAG_MULTILINE
Flag specifying that viewer applications will be able to display multi-line text for the text field. |
static int |
FLAG_NO_SCROLL
Flag specifying that viewer applications will not display vertical scrollbars (for multi-line text) or horizontal scrollbars (for single-line text) when the value entered by the user on the text field goes beyond what can be accommodated within the width of the field. |
static int |
FLAG_PASSWORD
Flag specifying that viewer applications will masks characters entered by the user in the text field with asterisks or bullets. |
static int |
FLAG_RICH_TEXT
Flag specifying that viewer applications will display a rich text string for this text field. |
Constructor Summary | |
PdfFormTextField(PdfRect rect)
Constructs a new text field with specified bounding box. |
|
PdfFormTextField(PdfRect r,
String name)
Constructs a new text field with specified bounding box and name. |
|
PdfFormTextField(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified bounding box, name, border color, and background color. |
|
PdfFormTextField(PdfRect r,
String name,
int fieldFlags)
Constructs a new text field with specified bounding box, name, and flags. |
|
PdfFormTextField(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified bounding box, name, flags, border color, and background color. |
|
PdfFormTextField(PdfRect r,
String name,
String alternateName,
String mappingName)
Constructs a new text field with specified bounding box, name, alternate name, and mapping name. |
|
PdfFormTextField(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified bounding box, name, alternate name, mapping name, border color, and background color. |
|
PdfFormTextField(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a new text field with specified bounding box, name, alternate name, mapping name, and flags. |
|
PdfFormTextField(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified bounding box, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormTextField(String name)
Constructs a new text field with specified name. |
|
PdfFormTextField(String name,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified name, border color, and background color. |
|
PdfFormTextField(String name,
int fieldFlags)
Constructs a new text field with specified name and flags. |
|
PdfFormTextField(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified name, flags, border color, and background color. |
|
PdfFormTextField(String name,
String alternateName,
String mappingName)
Constructs a new text field with specified name, alternate name, and mapping name. |
|
PdfFormTextField(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified name, alternate name, mapping name, border color, and background color. |
|
PdfFormTextField(String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a new text field with specified name, alternate name, mapping name, and flags. |
|
PdfFormTextField(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a new text field with specified name, alternate name, mapping name, flags, border color, and background color. |
Method Summary | |
Object |
clone()
|
int |
getAlignment()
Returns how text is aligned inside the text field. |
int |
getMaxlen()
Return maximum number of characters that the user can enter in the text field on a viewer application. |
String |
getValue()
Returns value that is displayed by the text field on a viewer application. |
boolean |
isAutoAdjustTextHeight()
Returns whether the font size of text inside the field will be adjusted by the viewer application in real time so that the text entered by the users will be fully accommodated inside the field without any cropping. |
boolean |
isComb()
Returns whether the FLAG_COMB flag has been set for
this text field. |
boolean |
isFileSelect()
Returns whether the FLAG_FILESELECT flag has been set
for this text field. |
boolean |
isMultiline()
Returns whether the FLAG_MULTILINE flag has been set
for this text field. |
boolean |
isNoScroll()
Returns whether the FLAG_NO_SCROLL flag has been set
for this text field. |
boolean |
isPasswordField()
Returns whether the FLAG_PASSWORD flag has been set
for this text field. |
boolean |
isRichText()
Returns whether the FLAG_RICH_TEXT flag has been set
for this text field. |
void |
setAlignment(int alignment)
Specifies how text needs to be aligned inside the text field. |
void |
setAsFileSelectField(boolean fileSelect)
Specifies whether the FLAG_FILESELECT flag needs to be
set for this text field. |
void |
setAsPasswordField(boolean passwordField)
Specifies whether the FLAG_PASSWORD flag needs to be
set for this text field. |
void |
setAutoAdjustTextHeight(boolean autoAdjustFieldTextHeight)
Specifies whether the font size of text inside the field needs to be adjusted by the viewer application in real time so that the text entered by the users will be fully accommodated inside the field without any cropping. |
void |
setComb(boolean comb)
Specifies whether the FLAG_COMB flag needs to be set
for this text field. |
void |
setMaxlen(int maxlen)
Return maximum number of characters that the user needs to be allowed to enter in the text field on a viewer application. |
void |
setMultiline(boolean multiline)
Specifies whether the FLAG_MULTILINE flag needs to be
set for this text field. |
void |
setNoScroll(boolean noScroll)
Specifies whether the FLAG_NO_SCROLL flag needs to be
set for this text field. |
void |
setRichText(boolean richText)
Specifies whether the FLAG_RICH_TEXT flag needs to be
set for this text field. |
void |
setValue(String value)
Specifies value that needs to be displayed by the text field on a viewer application. |
Methods inherited from class com.gnostice.pdfone.PdfAnnot |
delete, getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, hashCode, isDeleted, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FLAG_MULTILINE
public static final int FLAG_PASSWORD
public static final int FLAG_FILESELECT
public static final int FLAG_NO_SCROLL
public static final int FLAG_COMB
number of boxes
, each of
which will accept only one character entered by the user. This
flag is useful only if FLAG_MULTILINE
,
FLAG_PASSWORD
, and FLAG_FILESELECT
are not
set and the
maximum length of the text field
has
been specified. If user input is required only in one row, then
the FLAG_NO_SCROLL
needs to be set.
public static final int FLAG_RICH_TEXT
Constructor Detail |
public PdfFormTextField(String name, int fieldFlags)
name
- name of the text field in the documentfieldFlags
- text field flagsPdfFormField
public PdfFormTextField(String name, String alternateName, String mappingName, int fieldFlags)
name
- name for the text field in the documentalternateName
- alternate name for the text fieldmappingName
- mapping name for the text fieldfieldFlags
- text field flagsPdfFormField
public PdfFormTextField(String name, String alternateName, String mappingName)
name
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentPdfFormField
public PdfFormTextField(String name)
name
- name for the text field in the documentPdfFormField
public PdfFormTextField(PdfRect rect)
rect
- bounding box of the text fieldpublic PdfFormTextField(PdfRect r, String name, int fieldFlags)
r
- bounding box of the text fieldname
- name for the text field in the documentfieldFlags
- text field flagsPdfFormField
public PdfFormTextField(PdfRect r, String name)
r
- bounding box of the text fieldname
- name for the text field in the documentPdfFormField
public PdfFormTextField(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags)
r
- bounding box of the text fieldname
- name for the text field in the documentalternateName
- alternate name for the text fieldmappingName
- mapping name for the text fieldfieldFlags
- text field flagsPdfFormField
public PdfFormTextField(PdfRect r, String name, String alternateName, String mappingName)
r
- bounding box of the text fieldname
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentPdfFormField
public PdfFormTextField(String name, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the text field in the documentfieldFlags
- text field flagsborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormTextField(String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentfieldFlags
- text field flagsborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormTextField(String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
name
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormTextField(String name, Color borderColor, Color backgroundColor)
name
- name for the text field in the documentborderColor
- border color for the text fieldbackgroundColor
- background color for the text fieldpublic PdfFormTextField(PdfRect r, String name, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the text fieldname
- name for the text field in the documentfieldFlags
- text field flagsborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormTextField(PdfRect r, String name, Color borderColor, Color backgroundColor)
r
- bounding box of the text fieldname
- name for the text field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldpublic PdfFormTextField(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the text fieldname
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentfieldFlags
- text field flagsborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormTextField(PdfRect r, String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
r
- bounding box of the text fieldname
- name for the text field in the documentalternateName
- alternate name for the text field in the documentmappingName
- mapping name for the text field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
Method Detail |
public Object clone()
clone
in class PdfFormField
public boolean isMultiline()
FLAG_MULTILINE
flag has been set
for this text field.
FLAG_MULTILINE
flag has been set
for this text fieldsetMultiline(boolean)
public void setMultiline(boolean multiline)
FLAG_MULTILINE
flag needs to be
set for this text field.
multiline
- whether the FLAG_MULTILINE
flag needs to be
setisMultiline()
public boolean isPasswordField()
FLAG_PASSWORD
flag has been set
for this text field.
FLAG_PASSWORD
flag has been setsetAsPasswordField(boolean)
public void setAsPasswordField(boolean passwordField)
FLAG_PASSWORD
flag needs to be
set for this text field.
passwordField
- whether the FLAG_PASSWORD
flag needs to be
setisPasswordField()
public boolean isFileSelect()
FLAG_FILESELECT
flag has been set
for this text field.
FLAG_FILESELECT
flag has been setsetAsFileSelectField(boolean)
public void setAsFileSelectField(boolean fileSelect)
FLAG_FILESELECT
flag needs to be
set for this text field.
fileSelect
- whether the FLAG_FILESELECT
flag needs to
be set for this text fieldisFileSelect()
public boolean isNoScroll()
FLAG_NO_SCROLL
flag has been set
for this text field.
FLAG_NO_SCROLL
flag has been setsetNoScroll(boolean)
public void setNoScroll(boolean noScroll)
FLAG_NO_SCROLL
flag needs to be
set for this text field.
noScroll
- whether the FLAG_NO_SCROLL
flag needs to be
setisNoScroll()
public boolean isComb()
FLAG_COMB
flag has been set for
this text field.
FLAG_COMB
flag has been setsetComb(boolean)
public void setComb(boolean comb)
FLAG_COMB
flag needs to be set
for this text field.
comb
- whether the FLAG_COMB
flag needs to be set
for this text field.isComb()
public boolean isRichText()
FLAG_RICH_TEXT
flag has been set
for this text field.
FLAG_RICH_TEXT
flag has been setsetRichText(boolean)
public void setRichText(boolean richText)
FLAG_RICH_TEXT
flag needs to be
set for this text field.
richText
- whether the FLAG_RICH_TEXT
flag needs to be
setisRichText()
public boolean isAutoAdjustTextHeight()
setAutoAdjustTextHeight(boolean)
public void setAutoAdjustTextHeight(boolean autoAdjustFieldTextHeight)
autoAdjustFieldTextHeight
- whether viewer application needs to adjust the font
size of the value displayed in the text fieldisAutoAdjustTextHeight()
public int getAlignment()
constant
specifying how text is
aligned inside the text fieldpublic void setAlignment(int alignment)
alignment
- constant
how text needs to be
aligned inside the text fieldpublic int getMaxlen()
FLAG_COMB
public void setMaxlen(int maxlen)
maxlen
- maximum number of characters that the user needs to
be allowed to enter in the text field on a viewer
applicationFLAG_COMB
public String getValue()
getValue
in class PdfFormField
setValue(String)
public void setValue(String value)
setValue
in class PdfFormField
value
- that needs to be displayed by the text field on a
viewer applicationgetValue()
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |