ComboBoxField
Overview
ComboBoxField is a class in Aspose.PDF FOSS for Java.
Inherits from: Field.
Combo box / dropdown field (/FT /Ch, combo flag) (ISO 32000-1:2008, §12.7.4.4).
This class provides 90 methods for working with ComboBoxField objects in Java programs.
Available methods include: ComboBoxField, WidgetAnnotation, addOption, flatten, fromDictionary, get, getActions, getAlternateName, getAnnotationIndex, getAppearance, getAppearanceCharacteristics, getBorder, and 74 additional methods.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: actions, alternateName, annotationIndex, appearance, appearanceCharacteristics, border, and 48 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
options | OptionCollection | Read | Returns the options (/Opt array) for this combo box. |
selected | String | Read | Returns the currently selected value. |
editable | boolean | Read | Returns whether this combo box is editable (/Ff bit 19). |
border | Border | Read | Returns the border of this form field. |
actions | org.aspose.pdf.annotations.AnnotationActionCollection | Read | Returns the action collection for this field. |
partialName | String | Read | Returns the partial field name (/T entry). |
fullName | String | Read | Returns the fully-qualified dotted name of this field. |
alternateName | String | Read | Returns the alternate (tooltip) name (/TU entry). |
value | String | Read | Returns the field value (/V entry) as a string. |
defaultValue | String | Read | Returns the default value (/DV entry) as a string. |
fieldFlags | int | Read | Returns the field flags (/Ff entry). |
readOnly | boolean | Read | Returns whether this field is read-only (bit 1 of /Ff). |
required | boolean | Read | Returns whether this field is required (bit 2 of /Ff). |
noExport | boolean | Read | Returns whether this field is excluded from export (bit 3 of /Ff). |
defaultAppearance | String | Read | Returns the default appearance string (/DA entry). |
characteristics | AppearanceCharacteristics | Read | Returns the appearance characteristics helper backed by the /MK dictionary. |
appearance | AppearanceDictionary | Read | Returns a typed view over this field’s {@code /AP} appearance dictionary |
| (ISO 32000-1:2008 §12.5.5). | |||
count | int | Read | Returns the number of child fields (sub-widgets) of this field. |
pageIndex | int | Read | Returns the 1-based page index on which this field’s widget annotation resides. |
annotationIndex | int | Read | Returns the 0-based annotation index of this field within its page’s |
| annotation array. | |||
fieldType | String | Read | Returns the field type (/FT), e.g. |
fieldValue | PdfBase | Read | Returns the raw field value (/V). |
fieldName | String | Read | Returns the partial field name (/T). |
highlightMode | String | Read | Returns the highlight mode (/H). |
appearanceCharacteristics | PdfDictionary | Read | Returns the appearance characteristics dictionary (/MK). |
widgetAction | PdfAction | Read | Returns the action (/A) associated with this widget. |
subtype | String | Read | Returns the annotation subtype (e.g. |
rect | Rectangle | Read | Returns the annotation rectangle defining its location on the page. |
contents | String | Read | Returns the text content of the annotation (/Contents entry). |
name | String | Read | Returns the unique name of the annotation (/NM entry). |
modified | String | Read | Returns the date and time the annotation was last modified (/M entry). |
flags | int | Read | Returns the annotation flags (/F entry) as a bitmask. |
flagsAsEnum | java.util.EnumSet<AnnotationFlags> | Read | Returns the annotation flags as a typed {@link java.util.EnumSet}. |
invisible | boolean | Read | Returns whether the Invisible flag (bit 1) is set. |
hidden | boolean | Read | Returns whether the Hidden flag (bit 2) is set. |
print | boolean | Read | Returns whether the Print flag (bit 3) is set. |
noZoom | boolean | Read | Returns whether the NoZoom flag (bit 4) is set. |
noRotate | boolean | Read | Returns whether the NoRotate flag (bit 5) is set. |
noView | boolean | Read | Returns whether the NoView flag (bit 6) is set. |
locked | boolean | Read | Returns whether the Locked flag (bit 8) is set. |
color | Color | Read | Returns the annotation color (/C entry). |
normalAppearanceStream | PdfStream | Read | Returns the raw normal appearance stream (/AP /N) for this annotation |
| (ISO 32000-1:2008, §12.5.5). | |||
normalAppearance | XForm | Read | Returns the normal appearance as an {@link XForm}, mirroring the C# |
| {@code Annotation.NormalAppearance} property. | |||
opacity | double | Read | Returns the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque). |
zIndex | int | Read | Returns the Z-index (drawing order) of this annotation. |
page | Page | Read | Returns the page this annotation belongs to. |
pdfDictionary | PdfDictionary | Read | Returns the underlying PDF dictionary for this annotation. |
margin | MarginInfo | Read | Gets the margin information for this paragraph. |
horizontalAlignment | HorizontalAlignment | Read | Gets the horizontal alignment of this paragraph within its container. |
inLineParagraph | boolean | Read | Returns whether this paragraph is an inline element. |
keptWithNext | boolean | Read | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |||
firstParagraphInColumn | boolean | Read | Returns whether this paragraph is the first in its column. |
inNewPage | boolean | Read | Returns whether this paragraph should start on a new page during layout. |
hyperlink | Hyperlink | Read | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. |
Methods
| Signature | Description |
|---|---|
ComboBoxField(dict: PdfDictionary, page: Page, fullName: String) | Constructs a combo box field from an existing PDF dictionary. |
ComboBoxField() | Constructs a new empty combo box field. |
ComboBoxField(doc: Document) | Constructs a new combo box field associated with the given document. |
ComboBoxField(page: Page, rect: Rectangle) | Constructs a new combo box field on the given page with the specified rectangle. |
regenerateAppearance() | Rebuilds the {@code /AP/N} normal appearance stream from the current |
| rectangle, default appearance ({@code /DA}) and selected value, so the | |
| dropdown’s chosen text is visible in strict viewers (poppler, mupdf) that | |
| render only the appearance stream (F-10 sibling, Sprint 22 Part 3). | |
getOptions() → OptionCollection | Returns the options (/Opt array) for this combo box. |
getSelected() → String | Returns the currently selected value. |
setSelected(value: String) | Sets the selected value by string. |
setSelected(index: int) | Sets the selected option by 1-based index. |
addOption(value: String) | Adds an option to this combo box (/Opt array). |
isEditable() → boolean | Returns whether this combo box is editable (/Ff bit 19). |
getBorder() → Border | Returns the border of this form field. |
setBorder(border: Border) | Sets the border of this form field. |
getActions() → org.aspose.pdf.annotations.AnnotationActionCollection | Returns the action collection for this field. |
setWidth(width: double) | Sets the width of the field widget by adjusting the annotation rectangle. |
setHeight(height: double) | Sets the height of the field widget by adjusting the annotation rectangle. |
getPartialName() → String | Returns the partial field name (/T entry). |
setPartialName(name: String) | Sets the partial field name (/T entry). |
getFullName() → String | Returns the fully-qualified dotted name of this field. |
getAlternateName() → String | Returns the alternate (tooltip) name (/TU entry). |
getValue() → String | Returns the field value (/V entry) as a string. |
setValue(value: String) | Sets the field value (/V entry). |
getDefaultValue() → String | Returns the default value (/DV entry) as a string. |
getFieldFlags() → int | Returns the field flags (/Ff entry). |
setFieldFlags(flags: int) | Sets the field flags (/Ff entry). |
isReadOnly() → boolean | Returns whether this field is read-only (bit 1 of /Ff). |
isRequired() → boolean | Returns whether this field is required (bit 2 of /Ff). |
isNoExport() → boolean | Returns whether this field is excluded from export (bit 3 of /Ff). |
getDefaultAppearance() → String | Returns the default appearance string (/DA entry). |
setDefaultAppearance(da: String) | Sets the field’s default appearance string (/DA entry). |
getCharacteristics() → AppearanceCharacteristics | Returns the appearance characteristics helper backed by the /MK dictionary. |
getAppearance() → AppearanceDictionary | Returns a typed view over this field’s {@code /AP} appearance dictionary |
| (ISO 32000-1:2008 §12.5.5). | |
fromDictionary(dict: PdfDictionary, ftObj: PdfBase, fullName: String, page: Page, parser: PDFParser) → Field | Factory method: creates the appropriate {@link Field} subclass from a PDF dictionary. |
getCount() → int | Returns the number of child fields (sub-widgets) of this field. |
get(index: int) → Field | Returns the child field at the given 1-based index. |
iterator() → Iterator<Field> | Returns an iterator over child fields (sub-widgets) of this field. |
getPageIndex() → int | Returns the 1-based page index on which this field’s widget annotation resides. |
getAnnotationIndex() → int | Returns the 0-based annotation index of this field within its page’s |
| annotation array. | |
WidgetAnnotation(dict: PdfDictionary, page: Page) | Constructs a widget annotation from an existing PDF dictionary. |
getFieldType() → String | Returns the field type (/FT), e.g. |
getFieldValue() → PdfBase | Returns the raw field value (/V). |
getFieldName() → String | Returns the partial field name (/T). |
getHighlightMode() → String | Returns the highlight mode (/H). |
getAppearanceCharacteristics() → PdfDictionary | Returns the appearance characteristics dictionary (/MK). |
getWidgetAction() → PdfAction | Returns the action (/A) associated with this widget. |
getSubtype() → String | Returns the annotation subtype (e.g. |
getRect() → Rectangle | Returns the annotation rectangle defining its location on the page. |
setRect(rect: Rectangle) | Sets the annotation rectangle (ISO 32000-1:2008 §12.5.2, Table 164, |
| {@code /Rect} entry). | |
getContents() → String | Returns the text content of the annotation (/Contents entry). |
setContents(contents: String) | Sets the text content of the annotation (/Contents entry). |
getName() → String | Returns the unique name of the annotation (/NM entry). |
setName(name: String) | Sets the unique name of the annotation (/NM entry). |
getModified() → String | Returns the date and time the annotation was last modified (/M entry). |
setModified(date: String) | Sets the date and time the annotation was last modified (/M entry). |
getFlags() → int | Returns the annotation flags (/F entry) as a bitmask. |
setFlags(flags: int) | Sets the annotation flags (/F entry) as a bitmask. |
getFlagsAsEnum() → java.util.EnumSet<AnnotationFlags> | Returns the annotation flags as a typed {@link java.util.EnumSet}. |
isInvisible() → boolean | Returns whether the Invisible flag (bit 1) is set. |
isHidden() → boolean | Returns whether the Hidden flag (bit 2) is set. |
isPrint() → boolean | Returns whether the Print flag (bit 3) is set. |
isNoZoom() → boolean | Returns whether the NoZoom flag (bit 4) is set. |
isNoRotate() → boolean | Returns whether the NoRotate flag (bit 5) is set. |
isNoView() → boolean | Returns whether the NoView flag (bit 6) is set. |
isLocked() → boolean | Returns whether the Locked flag (bit 8) is set. |
getColor() → Color | Returns the annotation color (/C entry). |
setColor(color: Color) | Sets the annotation color (/C entry) as an RGB color array. |
getNormalAppearanceStream() → PdfStream | Returns the raw normal appearance stream (/AP /N) for this annotation |
| (ISO 32000-1:2008, §12.5.5). | |
getNormalAppearance() → XForm | Returns the normal appearance as an {@link XForm}, mirroring the C# |
| {@code Annotation.NormalAppearance} property. | |
flatten() | Flattens this annotation into the page content stream. |
getOpacity() → double | Returns the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque). |
setOpacity(opacity: double) | Sets the opacity of the annotation (0.0 = fully transparent, 1.0 = fully opaque). |
getZIndex() → int | Returns the Z-index (drawing order) of this annotation. |
setZIndex(zIndex: int) | Sets the Z-index (drawing order) of this annotation. |
getPage() → Page | Returns the page this annotation belongs to. |
setPage(page: Page) | Sets the page this annotation belongs to. |
getPdfDictionary() → PdfDictionary | Returns the underlying PDF dictionary for this annotation. |
getMargin() → MarginInfo | Gets the margin information for this paragraph. |
setMargin(margin: MarginInfo) | Sets the margin information for this paragraph. |
getHorizontalAlignment() → HorizontalAlignment | Gets the horizontal alignment of this paragraph within its container. |
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment) | Sets the horizontal alignment of this paragraph within its container. |
isInLineParagraph() → boolean | Returns whether this paragraph is an inline element. |
setInLineParagraph(inLineParagraph: boolean) | Sets whether this paragraph should be treated as an inline element. |
isKeptWithNext() → boolean | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
setKeptWithNext(keptWithNext: boolean) | Sets whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
isFirstParagraphInColumn() → boolean | Returns whether this paragraph is the first in its column. |
setFirstParagraphInColumn(firstParagraphInColumn: boolean) | Sets whether this paragraph is the first in its column. |
isInNewPage() → boolean | Returns whether this paragraph should start on a new page during layout. |
setInNewPage(inNewPage: boolean) | Sets whether this paragraph should start on a new page during layout. |
getHyperlink() → Hyperlink | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. | |
setHyperlink(hyperlink: Hyperlink) | Attaches a hyperlink to this paragraph. |