public class CPDFTextWidget extends CPDFWidget
Modifier and Type | Class and Description |
---|---|
static class |
CPDFTextWidget.TextFiledSpecial
Types of text field.
|
static class |
CPDFTextWidget.TPDFTextWidgetAttr |
CPDFWidget.BorderStyle, CPDFWidget.CheckStyle, CPDFWidget.WidgetType
CPDFAnnotation.AppearanceType, CPDFAnnotation.BorderEffectIntensity, CPDFAnnotation.CPDFBorderEffectType, CPDFAnnotation.MarkState, CPDFAnnotation.MediaSourceType, CPDFAnnotation.ReviewState, CPDFAnnotation.Type
index
Modifier and Type | Method and Description |
---|---|
void |
applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr) |
CPDFAnnotationUndoAttr |
getAnnotationAttr() |
int |
getFontColor()
Gets the font color of text content in TextField.
|
java.lang.String |
getFontName()
Gets the text content font in TextField, get the font type in
CPDFTextAttribute.FontNameHelper.FontType according to font names. |
float |
getFontSize()
Gets the font size of text content in TextField.
|
java.lang.String |
getText()
Gets the text content in TextField.
|
CPDFTextAlignment |
getTextAlignment()
Gets the the text alignment in TextField, more:
CPDFTextAlignment |
CPDFTextWidget.TextFiledSpecial |
getTextFieldSpecial()
Gets the content format of TextField, format type:
CPDFTextWidget.TextFiledSpecial |
boolean |
isMultiLine()
Whether to display multiline PDF text fields.
|
boolean |
isPassword()
Whether the TextField content display password, password :*****
|
boolean |
resetForm()
Resets TextField forms, content of TextField is cleared up
|
boolean |
setFontColor(int color)
Sets the font color of text content in TextField.
|
boolean |
setFontName(java.lang.String fontName)
Sets the font format of text content, get the font name by
CPDFTextAttribute.FontNameHelper
Such asCPDFTextAttribute.FontNameHelper#obtainFontName(CPDFTextAttribute.FontNameHelper.FontType, boolean, boolean) |
boolean |
setFontSize(float fontsize)
Sets the font size of text content in TextField.
|
boolean |
setMultiLine(boolean isMultiLine)
Sets to display multiline PDF text fields.
|
boolean |
setText(java.lang.String text)
Sets the text content in TextField.
|
boolean |
setTextAlignment(CPDFTextAlignment alignment)
Sets the text alignment in TextField, more:
CPDFTextAlignment |
boolean |
setTextFieldSpecial(boolean isDateSpecial)
Sets the content format of TextField, format type:
CPDFTextWidget.TextFiledSpecial |
clearBorderColor, clearFillColor, getBorderColor, getBorderStyles, getBorderWidth, getCheckStyle, getFieldFlag, getFieldName, getFieldType, getFillAlpha, getFillColor, getRect, getWidgetType, isReadOnly, setBorderColor, setBorderStyles, setBorderWidth, setCheckStyle, setFieldFlag, setFieldName, setFieldType, setFillAlpha, setFillColor, setReadOnly, setRect, updateAp, updateAp
addToPage, close, createReplyAnnotation, disableListenAttrChanged, enableListenAttrChanged, equal, equal, getAllReplyAnnotations, 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 boolean setText(java.lang.String text)
text
- Text content.public java.lang.String getText()
public boolean isMultiLine()
public boolean setMultiLine(boolean isMultiLine)
isMultiLine
- Whether to display multiline PDF text fields.public boolean isPassword()
public boolean setFontName(java.lang.String fontName)
CPDFTextAttribute.FontNameHelper
Such asCPDFTextAttribute.FontNameHelper#obtainFontName(CPDFTextAttribute.FontNameHelper.FontType, boolean, boolean)
fontName
- Font name of text.public java.lang.String getFontName()
CPDFTextAttribute.FontNameHelper.FontType
according to font names.
Whether the font is italic according to font namesCPDFTextAttribute.FontNameHelper#isItalic(String)
, Whether to be boldCPDFTextAttribute.FontNameHelper#isBold(String)
public boolean setFontSize(float fontsize)
fontsize
- Font size.public float getFontSize()
public boolean setFontColor(int color)
color
- Text color.public int getFontColor()
public boolean setTextAlignment(CPDFTextAlignment alignment)
CPDFTextAlignment
alignment
- Alignment.public CPDFTextAlignment getTextAlignment()
CPDFTextAlignment
public boolean setTextFieldSpecial(boolean isDateSpecial)
CPDFTextWidget.TextFiledSpecial
isDateSpecial
- Whether to be date format.public CPDFTextWidget.TextFiledSpecial getTextFieldSpecial()
CPDFTextWidget.TextFiledSpecial
public boolean resetForm()
resetForm
in class CPDFWidget
public CPDFAnnotationUndoAttr getAnnotationAttr()
getAnnotationAttr
in class CPDFAnnotation
public void applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr)
applyAnnotationAttr
in class CPDFAnnotation