Class ComboBoxPropertyDescriptor

  • All Implemented Interfaces:
    IPropertyDescriptor

    public class ComboBoxPropertyDescriptor
    extends PropertyDescriptor
    Descriptor for a property that has a value which should be edited with a combo box cell editor. This class provides a default ILabelProvider that will render the label of the given descriptor as the String found in the labels array at the currently selected index.

    The value of the property is a 0-based Integer index into the labels array.

    This class may be instantiated; it is not intended to be subclassed.

    Example:

     String[] values = { "Top left", "Top right", "Bottom left", "Bottom right" };
     IPropertyDescriptor pd = new ComboBoxPropertyDescriptor("origin", "Origin", values);
     
    Restriction:
    This class is not intended to be subclassed by clients.
    • Constructor Detail

      • ComboBoxPropertyDescriptor

        public ComboBoxPropertyDescriptor​(Object id,
                                          String displayName,
                                          String[] labelsArray)
        Creates an property descriptor with the given id, display name, and list of value labels to display in the combo box cell editor.
        Parameters:
        id - the id of the property
        displayName - the name to display for the property
        labelsArray - the labels to display in the combo box