|
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.PdfFormPushButton
This class represents a push button that can be used to
submit
or
reset
a form. It can also be used to updated calculated fields.
A push button can have an icon and a caption, but does not hold any value.
Field Summary | |
static int |
CAPTION_ABOVE
Constant specifying a push button having its caption above its icon. |
static int |
CAPTION_BELOW
Constant specifying a push button having its caption below its icon. |
static int |
CAPTION_LEFTSIDE
Constant specifying a push button having its caption on the left side of its icon. |
static int |
CAPTION_OFF
Constant specifying a push button having an icon but no caption. |
static int |
CAPTION_ON
Constant specifying a push button having a caption but no icon. |
static int |
CAPTION_OVERLAID
Constant specifying a push button having its caption right over the icon. |
static int |
CAPTION_RIGHTSIDE
Constant specifying a push button having its caption on the right side of its icon. |
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 | |
PdfFormPushButton(PdfRect rect)
Constructs a push button form field with specified bounding box. |
|
PdfFormPushButton(PdfRect r,
String name)
Constructs a push button form field with specified bounding box and name. |
|
PdfFormPushButton(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified bounding box, name, border color, and background color. |
|
PdfFormPushButton(PdfRect r,
String name,
int fieldFlags)
Constructs a push button form field with specified bounding box, name, and flags. |
|
PdfFormPushButton(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified bounding box, name, flags, border color, and background color. |
|
PdfFormPushButton(PdfRect r,
String name,
String normalCaption)
|
|
PdfFormPushButton(PdfRect r,
String name,
String alternateName,
String mappingName)
Constructs a push button form field with specified bounding box, name, alternate name, and mapping name. |
|
PdfFormPushButton(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified bounding box, name, alternate name, mapping name, border color, and background color. |
|
PdfFormPushButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a push button form field with specified bounding box, name, alternate name, mapping name, and flags. |
|
PdfFormPushButton(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified bounding box, name, alternate name, mapping name, flags, border color, and background color. |
|
PdfFormPushButton(PdfRect r,
String name,
String normalCaption,
String rolloverCaption,
String downCaption)
Constructs a push button form field with specified bounding box, name, normal caption, rollover caption, and down caption. |
|
PdfFormPushButton(String name)
Constructs a push button form field with specified name. |
|
PdfFormPushButton(String name,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified name, border color, and background color. |
|
PdfFormPushButton(String name,
int fieldFlags)
Constructs a push button form field with specified name and flags. |
|
PdfFormPushButton(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified name, flags, border color, and background color. |
|
PdfFormPushButton(String name,
String alternateName,
String mappingName)
Constructs a push button form field with specified name, alternate name, and mapping name. |
|
PdfFormPushButton(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Constructs a push button form field with specified name, alternate name, mapping name, border color, and background color. |
|
PdfFormPushButton(String name,
String alternateName,
String mappingName,
int fieldFlags)
Constructs a push button form field with specified name, alternate name, mapping name, and flags. |
|
PdfFormPushButton(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Constructs a push 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()
|
int |
getCaptionPosition()
Returns position of the caption on the push button. |
String |
getDownCaption()
Returns caption used for the form field when it is depressed by the user on viewer applications. |
int |
getHighlightMode()
Returns highlight style used by viewer applications for the form field when the user interacts with the field. |
double |
getIconBottomPadding()
Returns bottom padding for the icon with the form field bounding box. |
double |
getIconLeftPadding()
Returns left padding for the icon with the form field bounding box. |
String |
getNormalCaption()
Returns text that viewer applications display on the form field when the user is not interacting with the field. |
String |
getRolloverCaption()
Returns caption used by the viewer applications on the form field when the user moves the mouse pointer over the field. |
int |
getScaleEvent()
Returns when viewer applications will scale the icon within the bounding box of the push button. |
int |
getScaleType()
Returns how viewer applications will scale the icon within the bounding box of the push button. |
int |
getState()
Returns button state for the form field. |
boolean |
isIconFitToRect()
Returns whether width of the border of the push button will be considered when scaling the icon of the push button within button's bounding box. |
void |
setCaptionPosition(int captionPosition)
|
void |
setDownCaption(String downCaption)
Specifies caption that needs to be used for the form field when it is depressed by the user on viewer applications. |
void |
setDownIcon(PdfImage downIcon)
Specifies icon that the viewer application should display for the push button when the user presses down on the 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 |
setIconBottomPadding(double iconBottomPadding)
Specifies bottom padding for the icon with the form field bounding box. |
void |
setIconFitToRect(boolean iconFitToRect)
Specifies whether width of the border of the push button needs to be considered when scaling the icon of the push button within button's bounding box. |
void |
setIconLeftPadding(double iconLeftPadding)
Specifies left padding for the icon with the form field bounding box. |
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 |
setNormalIcon(PdfImage normalIcon)
Specifies icon that the viewer application should display for the push button when the user is not interacting with the button. |
void |
setRolloverCaption(String rolloverCaption)
Specifies caption used by the viewer applications on the form field when the user moves the mouse pointer over the field. |
void |
setRollOverIcon(PdfImage rollOverIcon)
Specifies icon used by the viewer applications on the form field when the user moves the mouse pointer over the field. |
void |
setScaleEvent(int scaleEvent)
Specifies when viewer applications should scale the icon within the bounding box of the push button. |
void |
setScaleType(int scaleType)
Specifies how viewer applications should scale the icon within the bounding box of the push button. |
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 CAPTION_ON
public static final int CAPTION_OFF
public static final int CAPTION_BELOW
public static final int CAPTION_ABOVE
public static final int CAPTION_RIGHTSIDE
public static final int CAPTION_LEFTSIDE
public static final int CAPTION_OVERLAID
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 PdfFormPushButton(String name, int fieldFlags)
name
- name for the push button in the documentfieldFlags
- form field flagsPdfFormField
public PdfFormPushButton(String name, String alternateName, String mappingName, int fieldFlags)
name
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- form field flagsPdfFormField
public PdfFormPushButton(String name, String alternateName, String mappingName)
name
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentPdfFormField
public PdfFormPushButton(String name)
name
- name for the push button in the documentPdfFormField
public PdfFormPushButton(PdfRect rect)
rect
- bounding box of the push buttonpublic PdfFormPushButton(PdfRect r, String name, int fieldFlags)
r
- bounding box of the push buttonname
- name for the push button in the documentfieldFlags
- form field flagsPdfFormField
public PdfFormPushButton(PdfRect r, String name)
r
- bounding box of the push buttonname
- name for the push button in the documentPdfFormField
public PdfFormPushButton(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags)
r
- bounding box of the push buttonname
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- form field flagspublic PdfFormPushButton(PdfRect r, String name, String alternateName, String mappingName)
r
- bounding box of the push buttonname
- name for the push button in the documentalternateName
- mapping name for the push button in the documentmappingName
- mapping name for the push button in the documentPdfFormField
public PdfFormPushButton(String name, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the push button in the documentfieldFlags
- form field flagsborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- form field flagsborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
name
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(String name, Color borderColor, Color backgroundColor)
name
- name for the push button in the documentborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(PdfRect r, String name, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the push buttonname
- name for the push button in the documentfieldFlags
- form field flagsborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(PdfRect r, String name, Color borderColor, Color backgroundColor)
r
- bounding box of the push buttonname
- name for the push button in the documentborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the push buttonname
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentfieldFlags
- form field flagsborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonPdfFormField
public PdfFormPushButton(PdfRect r, String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
r
- bounding box of the push buttonname
- name for the push button in the documentalternateName
- alternate name for the push button in the documentmappingName
- mapping name for the push button in the documentborderColor
- border color of the push buttonbackgroundColor
- background color of the push buttonpublic PdfFormPushButton(PdfRect r, String name, String normalCaption)
public PdfFormPushButton(PdfRect r, String name, String normalCaption, String rolloverCaption, String downCaption)
r
- bounding box of the push buttonname
- name for the push button in the documentnormalCaption
- caption that viewer applications should display when
the user is not interacting with the buttonrolloverCaption
- caption that viewer applications should display when
the user moves the mouse pointer over the buttondownCaption
- that viewer applications should display when the
user presses down on the buttonMethod Detail |
public Object clone()
public void addNormalAppearance(PdfAppearanceStream ap, int state)
com.gnostice.pdfone.PdfFormButtonField
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 addDownAppearance(PdfAppearanceStream ap, int state)
com.gnostice.pdfone.PdfFormButtonField
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 statepublic void addRolloverAppearance(PdfAppearanceStream ap, int state)
com.gnostice.pdfone.PdfFormButtonField
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 double getIconBottomPadding()
setIconBottomPadding(double)
public void setIconBottomPadding(double iconBottomPadding)
setScaleType(int)
is called with
SCALE_TYPE_ANAMORPHIC. If a value of 0 (zero) is specified,
then the icon will be positioned at the bottom edge of the
bounding box. A value of 0.5 will position the icon right
between the top and bottom edges of the bounding box.
iconBottomPadding
- value between 0 and 1 indicating the fraction of the
bottom padding and the total height of the bounding
boxgetIconBottomPadding()
,
setIconLeftPadding(double)
public boolean isIconFitToRect()
setIconFitToRect(boolean)
,
setScaleType(int)
public void setIconFitToRect(boolean iconFitToRect)
iconFitToRect
- whether width of the border of the push button needs
to be considered when scaling the icon of the push
button within button's bounding boxisIconFitToRect()
,
setScaleType(int)
public double getIconLeftPadding()
setIconLeftPadding(double)
public void setIconLeftPadding(double iconLeftPadding)
setScaleType(int)
is called with
SCALE_TYPE_ANAMORPHIC. If a value of 0 (zero) is specified,
then the icon will be positioned at the left edge of the
bounding box. A value of 0.5 will position the icon right
between the top and bottom edges of the bounding box.
iconLeftPadding
- value between 0 and 1 indicating the fraction of the
left padding and the total width of the bounding boxgetIconLeftPadding()
,
setIconBottomPadding(double)
public int getScaleEvent()
setScaleEvent(int)
public void setScaleEvent(int scaleEvent)
scaleEvent
- constant specifying when viewer applications should
scale the icon within the bounding box of the push
button; either PdfFormButtonField.SCALE_ALWAYS
or PdfFormButtonField.SCALE_NEVER.getScaleEvent()
public int getScaleType()
setScaleType(int)
public void setScaleType(int scaleType)
scaleType
- constant specifying how viewer applications should
scale the icon within the bounding box of the push
buttongetScaleType()
public int getCaptionPosition()
constant
specifying the
position of the captionpublic void setCaptionPosition(int captionPosition)
captionPosition
- public String getDownCaption()
setDownCaption(String)
public void setDownCaption(String downCaption)
downCaption
- caption that needs to be used for the form field
when it is depressed by the usergetDownCaption()
public String getRolloverCaption()
setRolloverCaption(String)
public void setRolloverCaption(String rolloverCaption)
rolloverCaption
- caption used by the viewer applications on the form
field when the user moves the mouse pointer over the
fieldsetRolloverCaption(String)
public void setDownIcon(PdfImage downIcon)
downIcon
- image (icon) that the viewer application should
display for the push button when the user presses
down on the button.public void setNormalIcon(PdfImage normalIcon)
normalIcon
- image (icon) that the viewer application should
display for the push button when the user is not
interacting with the buttonpublic void setRollOverIcon(PdfImage rollOverIcon)
rollOverIcon
- image (icon) used by the viewer applications on the
form field when the user moves the mouse pointer
over the fieldpublic String getNormalCaption()
PdfFormButtonField.setNormalCaption(String)
public void setNormalCaption(String normalCaption)
normalCaption
- text that viewer applications should display on
the form field when the user is not interacting with
the fieldPdfFormButtonField.getNormalCaption()
public int getHighlightMode()
constant
specifying the highlight stylepublic void setHighlightMode(int highlightMode)
highlightMode
- constant
specifying the highlight stylepublic int getState()
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 |