public abstract class CPDFWidget extends CPDFAnnotation
Modifier and Type | Class and Description |
---|---|
static class |
CPDFWidget.BorderStyle
Border style for the form.
|
static class |
CPDFWidget.CheckStyle
Fill type of CheckBox and Radiobutton.
|
static class |
CPDFWidget.WidgetType
Form types.
|
CPDFAnnotation.AppearanceType, CPDFAnnotation.Type
annotPtr, apRotation, pdfPage
Modifier | Constructor and Description |
---|---|
protected |
CPDFWidget(long annotPtr,
CPDFWidget.WidgetType widgetType) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearBorderColor()
Clear the border color of the form.
|
boolean |
clearFillColor()
Clear the background color of the form.
|
int |
getBorderColor()
Gets the border color of the form.
|
CPDFWidget.BorderStyle |
getBorderStyles()
Gets the border style of the form.
|
float |
getBorderWidth()
Gets the border width of the form.
|
protected int |
getCheckColor()
Gets check color of CheckBox or Radiobutton.
|
CPDFWidget.CheckStyle |
getCheckStyle()
Gets the check style of CheckBox or Radiobutton.
|
int |
getFieldFlag()
Gets form flag.
|
java.lang.String |
getFieldName()
Gets internal name for the field.
|
java.lang.String |
getFieldType()
Not in use currently
|
float |
getFillAlpha()
Gets the background opacity of the form.
|
int |
getFillColor()
Gets the background color of the form.
|
RectF |
getRect()
Gets annotation rectangle.
|
CPDFWidget.WidgetType |
getWidgetType()
Gets form types, refer to:
CPDFWidget.WidgetType |
boolean |
isReadOnly()
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
resetForm()
Resets forms.
|
boolean |
setBorderColor(int color)
Sets the border color of the form.
|
boolean |
setBorderStyles(CPDFWidget.BorderStyle borderStyle)
Sets border style of the form.
|
boolean |
setBorderWidth(float width)
Sets the border width of the form.
|
protected boolean |
setCheckColor(int color)
Sets check color of CheckBox or Radiobutton.
|
boolean |
setCheckStyle(CPDFWidget.CheckStyle checkStyle)
Sets the check style of CheckBox or Radiobutton.
|
boolean |
setFieldFlag(int flag)
Sets form flag.
|
boolean |
setFieldName(java.lang.String fieldName)
Sets internal name for the field.
|
boolean |
setFieldType(java.lang.String fieldType)
Not in use currently
|
boolean |
setFillAlpha(float filledTransparency)
Sets the background opacity of the form.
|
boolean |
setFillColor(int color)
Sets the background color of the form.
|
boolean |
setReadOnly(boolean isReadOnly)
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
setRect(RectF rect)
Sets annotation rectangle.
|
boolean |
updateAp()
The updated form appearance does not support transparency.
|
boolean |
updateAp(boolean supportTransparency)
Updates custom form appearance.
|
addToPage, clearFilledRGBColor, clearFilledTransparency, close, getAppearanceByPixel, getApRotation, getBgRGBColor, getBorderRGBColor, getBorderStyle, getContent, getCreationDate, getFilledRGBColor, getFilledTransparency, getFlags, getName, getOverLayText, getRecentlyModifyDate, getRGBColor, getTitle, getTransparency, getType, hasAp, isAllowCorrectAnnotationAp, isHidden, isLocked, isValid, removeAp, removeFromPage, setAllowCorrectAnnotationAp, setBgRGBColor, setBorderRGBColor, setBorderStyle, setContent, setCreationDate, setFilledRGBColor, setFilledTransparency, setFlags, setHidden, setLocked, setName, setOverLayText, setRecentlyModifyDate, setRGBColor, setTitle, setTransparency, updateApWithBitmap, updateApWithImage
protected CPDFWidget(long annotPtr, CPDFWidget.WidgetType widgetType)
public CPDFWidget.WidgetType getWidgetType()
CPDFWidget.WidgetType
public boolean setFieldName(java.lang.String fieldName)
fieldName
- Internal name for the field.public java.lang.String getFieldName()
public boolean setFieldFlag(int flag)
flag
- Form flag.public int getFieldFlag()
public boolean isReadOnly()
CPDFAnnotation
isReadOnly
in class CPDFAnnotation
public boolean setReadOnly(boolean isReadOnly)
CPDFAnnotation
setReadOnly
in class CPDFAnnotation
isReadOnly
- True is readOnly,false otherwisepublic boolean setFieldType(java.lang.String fieldType)
fieldType
- Form typepublic java.lang.String getFieldType()
public boolean setFillColor(int color)
color
- Background color.public int getFillColor()
public boolean clearFillColor()
public boolean setBorderColor(int color)
color
- Border color.public int getBorderColor()
public boolean clearBorderColor()
public boolean setBorderStyles(CPDFWidget.BorderStyle borderStyle)
borderStyle
- Border style of the form.public CPDFWidget.BorderStyle getBorderStyles()
public boolean setCheckStyle(CPDFWidget.CheckStyle checkStyle)
checkStyle
- Check style of CheckBox or Radiobutton.public CPDFWidget.CheckStyle getCheckStyle()
protected boolean setCheckColor(int color)
color
- Check color value of CheckBox or Radiobutton.protected int getCheckColor()
public float getBorderWidth()
getBorderWidth
in class CPDFAnnotation
public boolean setBorderWidth(float width)
setBorderWidth
in class CPDFAnnotation
width
- Border width of the form.public boolean setFillAlpha(float filledTransparency)
filledTransparency
- Opacity value. Value range 0-1.public float getFillAlpha()
public boolean updateAp()
updateAp
in class CPDFAnnotation
public boolean updateAp(boolean supportTransparency)
supportTransparency
- Whether to support opacity.public boolean resetForm()
public boolean setRect(RectF rect)
setRect
in class CPDFAnnotation
rect
- Rectangle on the page.public RectF getRect()
getRect
in class CPDFAnnotation