org.eclipse.ui.views.properties
Interface IPropertyDescriptor
-
All Known Implementing Classes:
-
ColorPropertyDescriptor,
ComboBoxPropertyDescriptor,
PropertyDescriptor,
TextPropertyDescriptor
-
public interface IPropertyDescriptor
A descriptor for a property to be presented by a standard property sheet page
(PropertySheetPage
). These descriptors originate with property
sources (IPropertySource
).
A property descriptor carries the following information:
- property id (required)
- display name (required)
- brief description of the property (optional)
- category for grouping related properties (optional)
- label provider used to display the property value (optional)
- cell editor for changing the property value (optional)
- help context id (optional)
Clients may implement this interface to provide specialized property
descriptors; however, there are standard implementations declared in
this package that take care of the most common cases:
-
PropertyDescriptor - read-only property
-
TextPropertyDescriptor
- edits with a
TextCellEditor
-
CheckboxPropertyDescriptor - edits with a
CheckboxCellEditor
-
ComboBoxPropertyDescriptor - edits with a
ComboBoxCellEditor
-
ColorPropertyDescriptor - edits with a
ColorCellEditor
-
See Also:
-
IPropertySource.getPropertyDescriptors()
createPropertyEditor
CellEditor createPropertyEditor(
Composite parent)
- Creates and returns a new cell editor for editing this property. Returns
null
if the property is not editable.
-
-
Parameters:
-
parent
- the parent widget for the cell editor
-
Returns:
- the cell editor for this property, or
null
if this
property cannot be edited
getCategory
String getCategory()
- Returns the name of the category to which this property belongs. Properties
belonging to the same category are grouped together visually. This localized
string is shown to the user
-
-
Returns:
- the category name, or
null
if the default category is to
be used
getDescription
String getDescription()
- Returns a brief description of this property. This localized string is shown
to the user when this property is selected.
-
-
Returns:
- a brief description, or
null
if none
getDisplayName
String getDisplayName()
- Returns the display name for this property. This localized string is shown to
the user as the name of this property.
-
-
Returns:
- a displayable name
getFilterFlags
String[] getFilterFlags()
- Returns a list of filter types to which this property belongs.
The user is able to toggle the filters to show/hide properties belonging to
a filter type.
Valid values for these flags are declared as constants on
IPropertySheetEntry
-
-
Returns:
- a list of filter types to which this property belongs, or
null
if none
getHelpContextIds
Object getHelpContextIds()
- Returns the help context id for this property or
null
if this property has no help context id.
NOTE: Help support system API's changed since 2.0 and arrays
of contexts are no longer supported.
Thus the only valid non-null
return type for this method
is a String
representing a context id. The previously
valid return types are deprecated. The plural name for this method
is unfortunate.
-
-
Returns:
- the help context id for this entry
getId
Object getId()
- Returns the id for this property. This object is
used internally to distinguish one property descriptor
from another.
-
-
Returns:
- the property id
getLabelProvider
ILabelProvider getLabelProvider()
- Returns the label provider for this property. The label provider is used
to obtain the text (and possible image) for displaying the value
of this property.
-
-
Returns:
- the label provider used to display this property
isCompatibleWith
boolean isCompatibleWith(
IPropertyDescriptor anotherProperty)
- Returns whether this property descriptor and the given one are compatible.
The property sheet uses this method during multiple selection to determine
whether two property descriptors with the same id are in fact the same
property and can be displayed as a single entry in the property sheet.
-
-
Parameters:
-
anotherProperty
- the other property descriptor
-
Returns:
-
true
if the property descriptors are compatible, and
false
otherwise
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.