Class ObservableMapCellLabelProvider
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.jface.viewers.BaseLabelProvider
-
- org.eclipse.jface.viewers.CellLabelProvider
-
- org.eclipse.jface.databinding.viewers.ObservableMapCellLabelProvider
-
- All Implemented Interfaces:
IBaseLabelProvider,IToolTipProvider
public class ObservableMapCellLabelProvider extends CellLabelProvider
A label provider based on one or more observable maps that track attributes that this label provider uses for display. The default behavior is to display the first attribute's value. Clients may customize by subclassing and overridingupdate(ViewerCell).- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description protected IObservableMap<Object,Object>[]attributeMapsObservable maps typically mapping from viewer elements to label values.
-
Constructor Summary
Constructors Modifier Constructor Description ObservableMapCellLabelProvider(IObservableMap<?,?> attributeMap)Creates a new label provider that tracks changes to one attribute.protectedObservableMapCellLabelProvider(IObservableMap<?,?>[] attributeMaps)Creates a new label provider that tracks changes to more than one attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()TheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod clears its internal listener list.voidupdate(ViewerCell cell)Updates the label of the cell with the value for the cell element.-
Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider
dispose, getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, initialize, useNativeToolTip
-
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, fireLabelProviderChanged, isLabelProperty, removeListener
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Field Detail
-
attributeMaps
protected IObservableMap<Object,Object>[] attributeMaps
Observable maps typically mapping from viewer elements to label values. Subclasses may use these maps to provide custom labels.- Since:
- 1.4
-
-
Constructor Detail
-
ObservableMapCellLabelProvider
public ObservableMapCellLabelProvider(IObservableMap<?,?> attributeMap)
Creates a new label provider that tracks changes to one attribute.- Parameters:
attributeMap- attribute map to track
-
ObservableMapCellLabelProvider
protected ObservableMapCellLabelProvider(IObservableMap<?,?>[] attributeMaps)
Creates a new label provider that tracks changes to more than one attribute. This constructor should be used by subclasses that overrideupdate(ViewerCell)and make use of more than one attribute.- Parameters:
attributeMaps- attribute maps to track
-
-
Method Detail
-
dispose
public void dispose()
Description copied from class:BaseLabelProviderTheBaseLabelProviderimplementation of thisIBaseLabelProvidermethod clears its internal listener list. Subclasses may extend but should call the super implementation.- Specified by:
disposein interfaceIBaseLabelProvider- Overrides:
disposein classBaseLabelProvider
-
update
public void update(ViewerCell cell)
Updates the label of the cell with the value for the cell element. Note: The value for the first map is always used, for all columns.- Specified by:
updatein classCellLabelProvider- Parameters:
cell- The cell to be updated.
-
-