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.BorderEffectIntensity, CPDFAnnotation.CPDFBorderEffectType, CPDFAnnotation.MarkState, CPDFAnnotation.MediaSourceType, CPDFAnnotation.ReviewState, CPDFAnnotation.Type
index
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.
|
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.
|
android.graphics.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.
|
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(android.graphics.RectF rect)
Sets annotation rectangle.
|
boolean |
updateAp()
The updated form appearance does not support transparency.
|
boolean |
updateAp(boolean supportTransparency)
Updates custom form appearance.
|
addToPage, applyAnnotationAttr, close, createReplyAnnotation, disableListenAttrChanged, enableListenAttrChanged, equal, equal, getAllReplyAnnotations, getAnnotationAttr, getAnnotIndexFromNative, getAnnotPtr, getAppearance, getAppearanceByPixel, getApRotation, getBordEffectIntensity, getBordEffectType, getContent, getCreationDate, getFlags, getMarkedAnnotState, getName, getRecentlyModifyDate, getReviewAnnotState, getRotateRectPoint, getRotation, getSourceRect, getTitle, getType, getVertices, hasAp, isAllowCorrectAnnotationAp, isHidden, isLocked, isValid, moveAnnotIndex, removeAp, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setAnnotTop, setBordEffectIntensity, setBordEffectType, setContent, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setOnAnnotationChangedListener, setRecentlyModifyDate, setReviewAnnotState, setRotation, setSourceRect, setTitle, setVertices, updateApWithBitmap, updateApWithImage
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()
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(android.graphics.RectF rect)
CPDFPage.convertRectToPage(boolean, float, float, RectF)
.setRect
in class CPDFAnnotation
rect
- Rectangle on the page.public android.graphics.RectF getRect()
CPDFPage.convertRectToPage(boolean, float, float, RectF)
.getRect
in class CPDFAnnotation