public class ComboBoxLabelProvider extends LabelProvider
ILabelProvider
that assists in rendering labels for
ComboBoxPropertyDescriptors
. The label for a given
Integer
value is the String
at the value in
the provided values array.Constructor and Description |
---|
ComboBoxLabelProvider(String[] values) |
Modifier and Type | Method and Description |
---|---|
String |
getText(Object element)
Returns the
String that maps to the given
Integer offset in the values array. |
String[] |
getValues() |
void |
setValues(String[] values) |
getImage
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListener
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, dispose, isLabelProperty, removeListener
public ComboBoxLabelProvider(String[] values)
values
- the possible label values that this
ILabelProvider
may return.public String[] getValues()
ILabelProvider
may return.public void setValues(String[] values)
values
- the possible label values that this
ILabelProvider
may return.public String getText(Object element)
String
that maps to the given
Integer
offset in the values array.getText
in interface ILabelProvider
getText
in class LabelProvider
element
- an Integer
object whose value is a valid
location within the values array of the receiverString
from the provided values array, or the
empty String
ILabelProvider.getText(java.lang.Object)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.