Class 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 overriding update(ViewerCell).
  • Field Details

    • 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.
  • Constructor Details

    • ObservableMapCellLabelProvider

      public ObservableMapCellLabelProvider(IObservableMap<?,?> attributeMap)
      Creates a new label provider that tracks changes to one attribute.
      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 override update(ViewerCell) and make use of more than one attribute.
      attributeMaps - attribute maps to track
  • Method Details

    • dispose

      public void dispose()
      Description copied from class: BaseLabelProvider
      The BaseLabelProvider implementation of this IBaseLabelProvider method clears its internal listener list. Subclasses may extend but should call the super implementation.
      Specified by:
      dispose in interface IBaseLabelProvider
      dispose in class BaseLabelProvider
    • 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:
      update in class CellLabelProvider
      cell - The cell to be updated.