Class ComboBox


  • public class ComboBox
    extends ChoiceField

    A combo box field

    • Method Detail

      • getCanEdit

        public boolean getCanEdit()

        Has an editable item (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setCanEdit

        public void setCanEdit​(boolean value)

        Has an editable item (Setter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only
      • getChosenItem

        public ChoiceItem getChosenItem()

        The selected combo box item (Getter)

        If this property is null then the getEditableItemName() is the selected value. Setting this property automatically sets getEditableItemName() to null.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setChosenItem

        public void setChosenItem​(ChoiceItem value)

        The selected combo box item (Setter)

        If this property is null then the getEditableItemName() is the selected value. Setting this property automatically sets getEditableItemName() to null.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only
        java.lang.IllegalArgumentException - if the provided choice item object does not belong to the combo box field
        java.lang.IllegalStateException - if the form field is marked as read-only
        java.lang.IllegalStateException - if the form field has widgets
      • getEditableItemName

        public java.lang.String getEditableItemName()

        The name of the editable item (Getter)

        This property is null if any of the combo box items is selected, i.e., if getChosenItem() is not null. Setting this property automatically sets getChosenItem() to null.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setEditableItemName

        public void setEditableItemName​(java.lang.String value)

        The name of the editable item (Setter)

        This property is null if any of the combo box items is selected, i.e., if getChosenItem() is not null. Setting this property automatically sets getChosenItem() to null.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only
        java.lang.IllegalStateException - if the form field has no editable item (getCanEdit() property is false)
        java.lang.IllegalStateException - if the form field is marked as read-only
        java.lang.IllegalStateException - if the form field has widgets