|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.views.properties.PropertyDescriptor
org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor
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 value array at the
currently selected index.
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);
Constructor Summary | |
ComboBoxPropertyDescriptor(Object id,
String displayName,
String[] valuesArray)
Creates an property descriptor with the given id, display name, and list of value labels to display in the combo box cell editor. |
Method Summary | |
CellEditor |
createPropertyEditor(Composite parent)
The ComboBoxPropertyDescriptor implementation of this
IPropertyDescriptor method creates and returns a new
ComboBoxCellEditor .
|
ILabelProvider |
getLabelProvider()
The ComboBoxPropertyDescriptor implementation of this
IPropertyDescriptor method returns the value set by
the setProvider method or, if no value has been set
it returns a ComboBoxLabelProvider created from the
valuesArray of this ComboBoxPropertyDescriptor . |
Methods inherited from class org.eclipse.ui.views.properties.PropertyDescriptor |
getAlwaysIncompatible, getCategory, getDescription, getDisplayName, getFilterFlags, getHelpContextIds, getId, getValidator, isCompatibleWith, isLabelProviderSet, setAlwaysIncompatible, setCategory, setDescription, setFilterFlags, setHelpContextIds, setLabelProvider, setValidator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ComboBoxPropertyDescriptor(Object id, String displayName, String[] valuesArray)
id
- the id of the propertydisplayName
- the name to display for the propertyvaluesArray
- the list of possible values to display in the combo boxMethod Detail |
public CellEditor createPropertyEditor(Composite parent)
ComboBoxPropertyDescriptor
implementation of this
IPropertyDescriptor
method creates and returns a new
ComboBoxCellEditor
.
The editor is configured with the current validator if there is one.
createPropertyEditor
in interface IPropertyDescriptor
createPropertyEditor
in class PropertyDescriptor
public ILabelProvider getLabelProvider()
ComboBoxPropertyDescriptor
implementation of this
IPropertyDescriptor
method returns the value set by
the setProvider
method or, if no value has been set
it returns a ComboBoxLabelProvider
created from the
valuesArray of this ComboBoxPropertyDescriptor
.
getLabelProvider
in interface IPropertyDescriptor
getLabelProvider
in class PropertyDescriptor
PropertyDescriptor.setLabelProvider(org.eclipse.jface.viewers.ILabelProvider)
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.