Class ColorPropertyDescriptor

java.lang.Object
org.eclipse.ui.views.properties.PropertyDescriptor
org.eclipse.ui.views.properties.ColorPropertyDescriptor
All Implemented Interfaces:
IPropertyDescriptor

public class ColorPropertyDescriptor extends PropertyDescriptor
Descriptor for a property that has a color value which should be edited with a color cell editor.

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

Example:

 IPropertyDescriptor pd = new ColorPropertyDescriptor("fg", "Foreground Color");
 
Restriction:
This class is not intended to be subclassed by clients.
  • Constructor Details

    • ColorPropertyDescriptor

      public ColorPropertyDescriptor(Object id, String displayName)
      Creates an property descriptor with the given id and display name.
      Parameters:
      id - the id of the property
      displayName - the name to display for the property
  • Method Details

    • createPropertyEditor

      public CellEditor createPropertyEditor(Composite parent)
      The ColorPropertyDescriptor implementation of this IPropertyDescriptor method creates and returns a new ColorCellEditor.

      The editor is configured with the current validator if there is one.

      Specified by:
      createPropertyEditor in interface IPropertyDescriptor
      Overrides:
      createPropertyEditor in class PropertyDescriptor
      Parameters:
      parent - the parent widget for the cell editor
      Returns:
      the cell editor for this property, or null if this property cannot be edited