|
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.PdfFormButtonField
com.gnostice.pdfone.PdfFormCheckBox
This class represents a check box form field. Viewer applications allow users to select or deselect a check box form field. When the check box is selected, it is supposed to be in an on state. When it is selected, the field is supposed to be in an off state. When the form is submitted, a check box in an onstate submits its name as the value. If the check box is not selected, then the field's value will be "off" and it will not be among the fields that are submitted by the users.
A set of check box form fields can be added to an
PdfFormField
object of type
PdfFormField.TYPE_CHECKGROUP
.
// Create a PDF page PdfPage page = new PdfPage(); // Create a check box PdfFormCheckBox cb1 = new PdfFormCheckBox( new PdfRect(200, 100, 10, 10), "isMarried"); cb1.setBorderColor(Color.BLACK); cb1.setState(PdfFormField.BUTTON_STATE_OFF); // Create another check box PdfFormCheckBox cb2 = new PdfFormCheckBox( new PdfRect(200, 120, 10, 10), "isEmployed"); cb2.setBorderColor(Color.BLACK); cb2.setState(PdfFormField.BUTTON_STATE_OFF); // Add the check box form fields to the page page.addFormField(cb1); page.addFormField(cb2); page.writeText("Married", 220, 98); page.writeText("Employed", 220, 118);
Field Summary | |
static int |
SCALE_ALWAYS
Constant specifying that the viewer application should always scale the icon within the bounding box of the push button. |
static int |
SCALE_NEVER
Constant specifying that the viewer application should never scale the icon within the bounding box of the push button. |
static int |
SCALE_TYPE_ANAMORPHIC
Constant for specifying scaling the icon within the bounding box of a push button without maintaining the aspect ratio (width-height ratio). |
static int |
SCALE_TYPE_PROPORTIONAL
Constant for specifying scaling the icon within the bounding box of a push button while maintaining the aspect ratio (width-height ratio). |
static int |
SCALE_WHEN_ICON_IS_BIGGER
Constant specifying that the viewer application should scale the icon within the bounding box of the push button when the icon is bigger than the bounding box. |
static int |
SCALE_WHEN_ICON_IS_SMALLER
Constant specifying that the viewer application should scale the icon within the bounding box of the push button when the icon is smaller than the bounding box. |
Constructor Summary | |
PdfFormCheckBox(PdfRect rect)
Constructs a check box with specified location. |
|
PdfFormCheckBox(PdfRect r,
String name)
Constructs a check box with specified location and name. |
|
PdfFormCheckBox(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, border color, and background color. |
|
PdfFormCheckBox(PdfRect r,
String name,
int fieldFlags)
Constructs a check box with specified location, name, and flags. |
|
PdfFormCheckBox(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormCheckBox(PdfRect r,
String name,
String alternateName,
String mappingName)
Constructs a check box with specified location, name, alternate name, and mapping name. |
|
PdfFormCheckBox(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, alternate name, mapping name, border color, and background color. |
|
PdfFormCheckBox(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a check box with specified location, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormCheckBox(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormCheckBox(String name)
Constructs a check box with specified name. |
|
PdfFormCheckBox(String name,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormCheckBox(String name,
int fieldFlags)
Constructs a check box form field with specified name and flags. |
|
PdfFormCheckBox(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified name, flags, border color, and background color. |
|
PdfFormCheckBox(String name,
String alternateName,
String mappingName)
Constructs a check box with specified name, alternate name, and mapping name. |
|
PdfFormCheckBox(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified location, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormCheckBox(String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a check box with specified name, alternate name, mapping name, and flags. |
|
PdfFormCheckBox(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a check box with specified name, alternate name, mapping name, flags, border color, and background color. |
Method Summary | |
void |
addDownAppearance(PdfAppearanceStream ap,
int state)
Adds an appearance stream for specified button state of the form field that the viewer applications should use when the user presses the mouse pointer over the field. |
void |
addNormalAppearance(PdfAppearanceStream ap,
int state)
Adds an appearance stream for specified button state of the form field that the viewer applications should use when the user is not interacting with the field. |
void |
addRolloverAppearance(PdfAppearanceStream ap,
int state)
Adds an appearance stream for specified button state of the form field that the viewer applications should use when the user hovers the mouse pointer over the field. |
Object |
clone()
|
List |
getChildList()
Returns list of children form fields for this group form field. |
PdfAppearanceStream |
getDownAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
int |
getHighlightMode()
Returns highlight style used by viewer applications for the form field when the user interacts with the field. |
PdfAppearanceStream |
getNormalAppearance()
Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
String |
getNormalCaption()
Returns text that viewer applications display on the form field when the user is not interacting with the field. |
PdfAppearanceStream |
getRolloverAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button). |
int |
getState()
Returns button state for the form field. |
void |
setDownAppearance(PdfAppearanceStream downAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
void |
setHighlightMode(int highlightMode)
Specifies highlight style for the form field that viewer applications need to use when the user interacts with the field. |
void |
setNormalAppearance(PdfAppearanceStream normalAppearance)
Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
void |
setNormalCaption(String normalCaption)
Specifies text that viewer applications should display on the form field when the user is not interacting with the field. |
void |
setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button). |
void |
setState(int appearanceState)
Specifies button state for the check box. |
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 SCALE_ALWAYS
public static final int SCALE_NEVER
public static final int SCALE_WHEN_ICON_IS_BIGGER
public static final int SCALE_WHEN_ICON_IS_SMALLER
public static final int SCALE_TYPE_PROPORTIONAL
public static final int SCALE_TYPE_ANAMORPHIC
Constructor Detail |
public PdfFormCheckBox(String name, int fieldFlags)
name
- name of the form fieldfieldFlags
- form field attributes
PdfFormField
public PdfFormCheckBox(String name, String alternateName, String mappingName, int fieldFlags)
name
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldfieldFlags
- form field attributes
public PdfFormCheckBox(String name, String alternateName, String mappingName)
name
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldpublic PdfFormCheckBox(String name)
name
- name of the form fieldpublic PdfFormCheckBox(PdfRect rect)
rect
- rectangular area where the form field needs to be
displayedpublic PdfFormCheckBox(PdfRect r, String name, int fieldFlags)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldfieldFlags
- form field attributes
public PdfFormCheckBox(PdfRect r, String name)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldpublic PdfFormCheckBox(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldfieldFlags
- form field attributes
public PdfFormCheckBox(PdfRect r, String name, String alternateName, String mappingName)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldpublic PdfFormCheckBox(String name, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name of the form fieldfieldFlags
- form field attributes
borderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldfieldFlags
- form field attributes
borderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
name
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldborderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(String name, Color borderColor, Color backgroundColor)
name
- name of the form fieldborderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(PdfRect r, String name, int fieldFlags, Color borderColor, Color backgroundColor)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldfieldFlags
- alternate name of the form fieldborderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(PdfRect r, String name, Color borderColor, Color backgroundColor)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldborderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldpublic PdfFormCheckBox(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldfieldFlags
- form field attributes
borderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldPdfFormField
public PdfFormCheckBox(PdfRect r, String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
r
- rectangular area where the form field needs to be
displayedname
- name of the form fieldalternateName
- alternate name of the form fieldmappingName
- mapping name of the form fieldborderColor
- color of the border of the form fieldbackgroundColor
- background color of the form fieldMethod Detail |
public Object clone()
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
com.gnostice.pdfone.PdfProAnnot
normalAppearance
- the specified appearance streamPdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
public PdfAppearanceStream getNormalAppearance()
com.gnostice.pdfone.PdfProAnnot
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setDownAppearance(PdfAppearanceStream downAppearance)
com.gnostice.pdfone.PdfProAnnot
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public PdfAppearanceStream getDownAppearance()
com.gnostice.pdfone.PdfProAnnot
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
com.gnostice.pdfone.PdfProAnnot
rolloverAppearance
- the specified appearance streamPdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.getRolloverAppearance()
public PdfAppearanceStream getRolloverAppearance()
com.gnostice.pdfone.PdfProAnnot
PdfProAnnot.getNormalAppearance()
,
PdfProAnnot.getDownAppearance()
,
PdfProAnnot.setNormalAppearance(PdfAppearanceStream)
,
PdfProAnnot.setDownAppearance(PdfAppearanceStream)
,
PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)
public void setNormalCaption(String normalCaption)
com.gnostice.pdfone.PdfFormButtonField
normalCaption
- text that viewer applications should display on
the form field when the user is not interacting with
the fieldPdfFormButtonField.getNormalCaption()
public String getNormalCaption()
com.gnostice.pdfone.PdfFormButtonField
PdfFormButtonField.setNormalCaption(String)
public List getChildList()
PdfFormField
getChildList
in class PdfFormField
PdfFormField.TYPE_CHECKGROUP
,
PdfFormField.TYPE_RADIOGROUP
,
PdfProDocument.addFormField(PdfFormField, String[])
public void setState(int appearanceState)
appearanceState
- constant
specifying button statepublic int getHighlightMode()
constant
specifying the highlight stylepublic void setHighlightMode(int highlightMode)
highlightMode
- constant
specifying the highlight stylepublic int getState()
constant
specifying the button statepublic void addNormalAppearance(PdfAppearanceStream ap, int state)
ap
- appearance stream for specified button state of the
form field that the viewer applications should use
when the user is not interacting with the fieldstate
- constant
specifying the button statepublic void addRolloverAppearance(PdfAppearanceStream ap, int state)
ap
- appearance stream for specified button state of the
form field that the viewer applications should use
when the user hovers the mouse pointer over the
fieldstate
- constant
specifying the button statepublic void addDownAppearance(PdfAppearanceStream ap, int state)
ap
- appearance stream for specified button state of the
form field that the viewer applications should use
when the user presses the mouse pointer over the
fieldstate
- constant
specifying the button state
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |