PDChoice extends PDVariableText { public boolean isCombo() { return dictionary.getFlag(COSName.FF, FLAG_COMBO); } PDChoice(PDAcroForm acroForm);   PDChoice(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent); List<String> getOptions(); void setOptions(List<String> displayValues); void setOptions(List<String> exportValues, List<String> displayValues); List<String> getOptionsDisplayValues(); List<String> getOptionsExportValues(); List<Integer> getSelectedOptionsIndex(); void setSelectedOptionsIndex(List<Integer> values); boolean isSort(); void setSort( boolean sort ); boolean isMultiSelect(); void setMultiSelect( boolean multiSelect ); boolean isDoNotSpellCheck(); void setDoNotSpellCheck( boolean doNotSpellCheck ); boolean isCommitOnSelChange(); void setCommitOnSelChange( boolean commitOnSelChange ); boolean isCombo(); void setCombo( boolean combo ); void setValue(String value); void setDefaultValue(String value); void setValue(List<String> values); List<String> getValue(); List<String> getDefaultValue(); @Override String getValueAsString();  }
@Test public void createListBox() { PDChoice choiceField = new PDListBox(acroForm); assertEquals(choiceField.getFieldType(), choiceField.getCOSObject().getNameAsString(COSName.FT)); assertEquals(choiceField.getFieldType(), "Ch"); assertFalse(choiceField.isCombo()); }
@Test public void createComboBox() { PDChoice choiceField = new PDComboBox(acroForm); assertEquals(choiceField.getFieldType(), choiceField.getCOSObject().getNameAsString(COSName.FT)); assertEquals(choiceField.getFieldType(), "Ch"); assertTrue(choiceField.isCombo()); }