public abstract class CPDFWidgetItems extends CPDFWidget
CPDFWidget
,
CPDFListboxWidget
,
CPDFComboboxWidget
CPDFWidget.BorderStyle, CPDFWidget.CheckStyle, CPDFWidget.WidgetType
CPDFAnnotation.AppearanceType, CPDFAnnotation.Type
annotPtr, apRotation, pdfPage
Modifier | Constructor and Description |
---|---|
protected |
CPDFWidgetItems(long annotPtr,
CPDFWidget.WidgetType widgetType) |
Modifier and Type | Method and Description |
---|---|
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 |
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.
|
boolean |
setTextProperty(CPDFTextAttribute freetextDa)
Sets Freetext font style.
|
clearBorderColor, clearFillColor, getBorderColor, getBorderStyles, getBorderWidth, getCheckColor, getCheckStyle, getFieldFlag, getFieldName, getFieldType, getFillAlpha, getFillColor, getRect, getWidgetType, isReadOnly, setBorderColor, setBorderStyles, setBorderWidth, setCheckColor, setCheckStyle, setFieldFlag, setFieldName, setFieldType, setFillAlpha, setFillColor, setReadOnly, setRect, updateAp, updateAp
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 CPDFWidgetItems(long annotPtr, CPDFWidget.WidgetType widgetType)
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 boolean isMultiSelectListBox()
public boolean resetForm()
resetForm
in class CPDFWidget
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 boolean setTextProperty(CPDFTextAttribute freetextDa)
freetextDa
- Font style.public CPDFTextAttribute getTextProperty()
CPDFTextAttribute