com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class ChoiceField

    • Constructor Detail

      • ChoiceField

        public ChoiceField(Page page,
                           Rectangle rect)

        Constructor for ChoiceField.

        Parameters:
        page - Page where field is situated.
        rect - Rectangle of the field.
      • ChoiceField

        public ChoiceField(IDocument doc)

        Creates choice field (for Generator)

        Parameters:
        doc - Document where choice field will be created.
      • ChoiceField

        public ChoiceField(IDocument doc,
                           Rectangle rect)

        Constructor for ChoiceField.

        Parameters:
        doc - Document where field will be created.
        rect - Rectangle of the field.
    • Method Detail

      • getCommitImmediately

        public boolean getCommitImmediately()

        Gets commit on selection change flag.

        Returns:
        boolean value
      • setCommitImmediately

        public void setCommitImmediately(boolean value)

        Sets commit on selection change flag.

        Parameters:
        value - boolean value
      • getMultiSelect

        public boolean getMultiSelect()

        Gets multiselection flag.

        Returns:
        boolean value
      • setMultiSelect

        public void setMultiSelect(boolean value)

        Sets multiselection flag.

        Parameters:
        value - boolean value
      • getSelected

        public int getSelected()

        Gets index of selected option. This property allows to change selection.

        Returns:
        int value
      • setSelected

        public void setSelected(int value)

        Sets index of selected option. This property allows to change selection.

        Parameters:
        value - int value
      • getSelectedItems

        public int[] getSelectedItems()

        Sets array of selected items. For multiselect list array contains more then one item. For single selection list it contains single item.

        Returns:
        array of int values
      • setSelectedItems

        public void setSelectedItems(int[] value)

        Sets array of selected items. For multiselect list array contains more then one item. For single selection list it contains single item.

        Parameters:
        value - array of int values
      • getOptions

        public OptionCollection getOptions()

        Gets collection of choice options.

        Returns:
        OptionCollection object
      • addOption

        public void addOption(String optionName)

        Adds new option with specified name.

        Parameters:
        optionName - Name of the new option.
      • addOption

        public void addOption(String export,
                              String name)

        Adds new option with specified export value and name.

        Parameters:
        export - Export value.
        name - Name of the new option.
      • deleteOption

        public void deleteOption(String optionName)

        Deletes option by its name.

        Parameters:
        optionName - Name of the option which must be deleted.
      • getValue

        public String getValue()

        Gets value of the field.

        Overrides:
        getValue in class Field
        Returns:
        String value
      • setValue

        public void setValue(String value)

        Sets value of the field.

        Overrides:
        setValue in class Field
        Parameters:
        value - String value