public abstract class CPDFWidgetItems extends CPDFWidget
CPDFWidget
,
CPDFListboxWidget
,
CPDFComboboxWidget
Modifier and Type | Class and Description |
---|---|
static class |
CPDFWidgetItems.TPDFWidgetItemsAttr |
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.
|
java.lang.String |
getFontName()
Gets the font.
|
float |
getFontSize()
Gets the font size.
|
int |
getItemCount()
Gets the total count of items in ListBox or ComboBox.
|
CPDFWidgetItem |
getOptionByIndex(int index)
Gets the option by index in ListBox or ComboBox.
|
CPDFWidgetItem[] |
getOptions()
Gets all options in ListBox or ComboBox.
|
int[] |
getSelectedIndexes()
Gets the list of indexes with a selected option in ListBox or ComboBox.
|
CPDFTextAttribute |
getTextProperty()
Gets the attribute of items in ListBox or ComboBox, more:
CPDFTextAttribute |
boolean |
isMultiSelectListBox()
Whether to allow to select multiple items in Listbox.
|
boolean |
resetForm()
Resets form.
|
boolean |
setFontColor(int color)
Sets the font color.
|
boolean |
setFontName(java.lang.String fontName)
Sets the font.
|
boolean |
setFontSize(float fontsize)
Sets the font size.
|
boolean |
setOptionItems(CPDFWidgetItem[] items)
Sets the options for the ListBox or ComboBox,
The text value of each
CPDFWidgetItem is not allowed to be equal, otherwise the setting will be failed. |
boolean |
setOptionItems(CPDFWidgetItem[] items,
int[] selectIndexes)
给ListBox或者ComboBox设置条目,并且设置这些条目中被选择的下标。
每个条目的text值不允许相等,否则会设置失败。如果
|
boolean |
setSelectedIndexes(int[] index)
Sets the index items as selected in ListBox or ComboBox.
|
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 CPDFWidgetItem[] getOptions()
CPDFWidgetItem
public int[] getSelectedIndexes()
public CPDFWidgetItem getOptionByIndex(int index)
index
- The index value of the option.public boolean setSelectedIndexes(int[] index)
index
- The index of selected items.public int getItemCount()
public CPDFTextAttribute getTextProperty()
CPDFTextAttribute
public boolean isMultiSelectListBox()
public boolean resetForm()
resetForm
in class CPDFWidget
public java.lang.String getFontName()
public boolean setFontName(java.lang.String fontName)
fontName
- Font namepublic float getFontSize()
public boolean setFontSize(float fontsize)
fontsize
- Font size.public int getFontColor()
public boolean setFontColor(int color)
color
- Font color.public boolean setOptionItems(CPDFWidgetItem[] items, int[] selectIndexes)
items
- public boolean setOptionItems(CPDFWidgetItem[] items)
CPDFWidgetItem
is not allowed to be equal, otherwise the setting will be failed.items
- Array of optionspublic void applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr)
applyAnnotationAttr
in class CPDFAnnotation
public CPDFAnnotationUndoAttr getAnnotationAttr()
getAnnotationAttr
in class CPDFAnnotation