Class ListSelectionPart

  • All Implemented Interfaces:
    IParameterDescriptor

    public class ListSelectionPart
    extends AbstractPart
    UI part descriptor for a string selection. This UI part supports the following types: String and int.

    Use setListType(int) to specify the type of list the UI should use. By default a simple list box will be used.

    • Constructor Detail

      • ListSelectionPart

        public ListSelectionPart​(ParameterDescriptor paramDescriptor,
                                 String[] choicesValues)
        Creates a new ListSelectionPart object with a given parameter descriptor.
        Parameters:
        paramDescriptor - the parameter descriptor for this UI part.
        choicesValues - the list of the items that can be selected. When the type of the parameter is an int, the list of values must be defined.
    • Method Detail

      • checkType

        protected void checkType()
        Description copied from class: AbstractPart
        Checks the types supported by this UI part.
        Overrides:
        checkType in class AbstractPart
      • getChoicesValues

        public String[] getChoicesValues()
        Gets the list of items that can be selected.
        Returns:
        the list of items that can be selected.
      • setChoicesValues

        public void setChoicesValues​(String[] choicesValues)
        Sets the list of items that can be selected.
        Parameters:
        choicesValues - the new list of items that can be selected.
      • getListType

        public int getListType()
        Gets the type of list this UI part should use.
        Returns:
        the type of list this UI part should use.
      • setListType

        public void setListType​(int listType)
        Sets the type of list this UI part should use.

        The possible values are:

        Parameters:
        listType - the new type of list this UI part should use.
      • getChoicesLabels

        public String[] getChoicesLabels()
        Gets the list of the localizable labels to use with the selectable values.
        Returns:
        the list of the localizable labels to use with the selectable values.
      • setChoicesLabels

        public void setChoicesLabels​(String[] choicesLabels)
        Sets the list of the localizable labels to use with the selectable values. If this list is not set, the values themselves will be used for display.
        Parameters:
        choicesLabels - the list of the localizable labels to use with the selectable values.