|
Gnostice PDFOne Java
|
||||||||
| 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.PdfFormField
com.gnostice.pdfone.PdfFormRadioButton
public class 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.
// Create a PDF page PdfPage page = new PdfPage(); // Create a radio button PdfFormRadioButton rb1 = new PdfFormRadioButton( new PdfRect(200, 100, 15, 10), "isMale"); rb1.setBorderColor(Color.BLACK); rb1.setState(PdfFormField.BUTTON_STATE_ON); // Create another radio button PdfFormRadioButton rb2 = new PdfFormRadioButton( new PdfRect(250, 100, 15, 10), "isFemale"); rb2.setBorderColor(Color.BLACK); // Create a radio button group PdfFormField rbg1 = new PdfFormField(PdfFormField.TYPE_RADIOGROUP, "gender"); // Add radio buttons to the radio button group rbg1.addChildField(rb1); rbg1.addChildField(rb2); // Add the radio button group form field to the page 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)
|
|
PdfFormRadioButton(PdfRect r,
String name)
|
|
PdfFormRadioButton(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags)
|
|
PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName)
|
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
|
|
PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(String name)
|
|
PdfFormRadioButton(String name,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(String name,
int fieldFlags)
|
|
PdfFormRadioButton(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName)
|
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
|
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags)
|
|
PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
|
|
| 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()
|
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()
|
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 a name that will be used to identify the form field in the document. |
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)
|
| Methods inherited from class com.gnostice.pdfone.PdfAnnot |
|---|
getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, hashCode, 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)
public PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags)
public PdfFormRadioButton(String name,
String alternateName,
String mappingName)
public PdfFormRadioButton(String name)
public PdfFormRadioButton(PdfRect rect)
public PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags)
public PdfFormRadioButton(PdfRect r,
String name)
public PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
public PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName)
public PdfFormRadioButton(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(String name,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
public PdfFormRadioButton(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
| Method Detail |
|---|
public Object clone()
public void setNormalAppearance(PdfAppearanceStream normalAppearance)
normalAppearance - the specified appearance streamsetDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream),
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance()public PdfAppearanceStream getNormalAppearance()
getDownAppearance(),
getRolloverAppearance(),
setNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public void setDownAppearance(PdfAppearanceStream downAppearance)
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance(),
setNormalAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public PdfAppearanceStream getDownAppearance()
getNormalAppearance(),
getDownAppearance(),
setNormalAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream)public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
rolloverAppearance - the specified appearance streamsetNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance()public PdfAppearanceStream getRolloverAppearance()
getNormalAppearance(),
getDownAppearance(),
setNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public void setNormalCaption(String normalCaption)
normalCaption - text that viewer applications should display on
the form field when the user is not interacting with
the fieldgetNormalCaption()public String getNormalCaption()
setNormalCaption(String)public void setName(String name)
PdfFormField"mapping name".
setName in class PdfFormFieldname - name that needs to be used to identify the form
field in the documentPdfFormField.getName(),
PdfFormField.setMappingName(String)public void setState(int appearanceState)
public String getOnStateName()
public List getChildList()
getChildList in class PdfFormFieldpublic int getHighlightMode()
constant
specifying the highlight stylepublic void setHighlightMode(int highlightMode)
highlightMode - constant
specifying the highlight stylepublic int getState()
constant
specifying the button state
public 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 state
public 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 state
public 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
|
Std. Ed. v2.10 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||