|
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.PdfFormRadioButton
This class represents a radio button form field. A radio button is usually part of a radio button group. On a viewer application, users are usually allowed to select only one radio button in a radio button group.
<span class="cc">// Create a PDF page</span> PdfPage page = new PdfPage(); <span class="cc">// Create a radio button</span> PdfFormRadioButton rb1 = new PdfFormRadioButton( new PdfRect(200, 100, 15, 10), "isMale"); rb1.setBorderColor(Color.BLACK); rb1.setState(PdfFormField.BUTTON_STATE_ON); <span class="cc">// Create another radio button</span> PdfFormRadioButton rb2 = new PdfFormRadioButton( new PdfRect(250, 100, 15, 10), "isFemale"); rb2.setBorderColor(Color.BLACK); <span class="cc">// Create a radio button group</span> PdfFormField rbg1 = new PdfFormField(PdfFormField.TYPE_RADIOGROUP, "gender"); <span class="cc">// Add radio buttons to the radio button group</span> rbg1.addChildField(rb1); rbg1.addChildField(rb2); <span class="cc">// Add the radio button group form field to the page</span> page.addFormField(rbg1); page.writeText("Male", 220, 98); page.writeText("Female", 270, 98);
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 | |
PdfFormRadioButton(PdfRect rect)
Constructs a radio button form field with specified bounding box. |
|
PdfFormRadioButton(PdfRect r,
String name)
Constructs a radio button form field with specified bounding box and name. |
|
PdfFormRadioButton(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified bounding box, name, border color, and background color. |
|
PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags)
Constructs a radio button form field with specified bounding box, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified bounding box, name, flags, border color, and background color. |
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName)
Constructs a radio button form field with specified bounding box, name, alternate name, and mapping name. |
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified bounding box, name, alternate name, mapping name, border color, and background color. |
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a radio button form field with specified bounding box, name, alternate name, mapping name, and flags. |
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified bounding box, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormRadioButton(String name)
Constructs a radio button form field with specified name. |
|
PdfFormRadioButton(String name,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified name, border color, and background color. |
|
PdfFormRadioButton(String name,
int fieldFlags)
Constructs a radio button form field with specified name and flags. |
|
PdfFormRadioButton(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified name, alternate name mapping name, flags, border color, and background color. |
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName)
Constructs a radio button form field with specified name, alternate name, and mapping name. |
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field with specified name, alternate name mapping name, border color, and background color. |
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a radio button form field with specified name, alternate name mapping name, and flags. |
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a radio button form field 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. |
String |
getOnStateName()
Returns value that will be submitted for the parent radio button group form field
if the radio button is selected. |
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 |
setName(String name)
Specifies name for the radio button. |
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 whether the radio button is checked. |
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 PdfFormRadioButton(String name, int fieldFlags)
name
- name for the radio button in the documentfieldFlags
- formfield attributes
public PdfFormRadioButton(String name, String alternateName, String mappingName, int fieldFlags)
name
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- formfield attributes
public PdfFormRadioButton(String name, String alternateName, String mappingName)
name
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the push button in the documentpublic PdfFormRadioButton(String name)
name
- name for the radio button in the documentpublic PdfFormRadioButton(PdfRect rect)
specify a name
of the radio button.
rect
- bounding box of the radio buttonpublic PdfFormRadioButton(PdfRect r, String name, int fieldFlags)
r
- bounding box of the radio buttonname
- name for the radio button in the documentfieldFlags
- formfield attributes
public PdfFormRadioButton(PdfRect r, String name)
r
- bounding box of the radio buttonname
- name for the radio button in the documentpublic PdfFormRadioButton(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags)
r
- bounding box of the radio buttonname
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the radio button in the documentfieldFlags
- formfield attributes
public PdfFormRadioButton(PdfRect r, String name, String alternateName, String mappingName)
r
- bounding box of the radio buttonname
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the radio button in the documentpublic PdfFormRadioButton(String name, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the radio button in the documentfieldFlags
- formfield attributes
borderColor
- color of the border of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- formfield attributes
borderColor
- color of the border of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
name
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the push button in the documentborderColor
- color of the border of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(String name, Color borderColor, Color backgroundColor)
name
- name for the radio button in the documentborderColor
- color of the border of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(PdfRect r, String name, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the radio buttonname
- name for the push button in the documentfieldFlags
- formfield attributes
borderColor
- border color of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(PdfRect r, String name, Color borderColor, Color backgroundColor)
r
- bounding box of the radio buttonname
- name for the radio button in the documentborderColor
- border color of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the radio buttonname
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the radio button in the documentfieldFlags
- formfield attributes
borderColor
- border color of the radio buttonbackgroundColor
- background color of the radio buttonpublic PdfFormRadioButton(PdfRect r, String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
r
- bounding box of the radio buttonname
- name for the radio button in the documentalternateName
- alternate name for the radio button in the documentmappingName
- mapping name for the radio button in the documentborderColor
- border color of the radio buttonbackgroundColor
- background color of the radio buttonMethod Detail |
public Object clone()
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
void addNormalAppearance(PdfAppearanceStream ap, int state)
.
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)
void addDownAppearance(PdfAppearanceStream ap, int state)
.
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)
void
addRolloverAppearance(PdfAppearanceStream ap, int state)
.
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 void setName(String name)
radio button group
form field
, provided that the radio button form field was
selected.
setName
in class PdfFormField
name
- name for the radio buttongetOnStateName()
public void setState(int appearanceState)
appearanceState
- constant
specifying whether the radio button is checkedpublic String getOnStateName()
radio button group form field
if the radio button is selected. When radio button is selected,
its name will be submitted as the value for the parent radio
button group.
radio button group form field
if the radio button is selectedsetName(String)
public List getChildList()
PdfFormField
getChildList
in class PdfFormField
PdfFormField.TYPE_CHECKGROUP
,
PdfFormField.TYPE_RADIOGROUP
,
PdfProDocument.addFormField(PdfFormField, String[])
public 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 |