org.eclipse.jface.viewers

## Class BaseLabelProvider

- java.lang.Object
- - org.eclipse.core.commands.common.EventManager
  - - org.eclipse.jface.viewers.BaseLabelProvider

All Implemented Interfaces:
  IBaseLabelProvider

Direct Known Subclasses:
  CellLabelProvider, LabelProvider

    public class BaseLabelProvider
    extends EventManager
    implements IBaseLabelProvider

BaseLabelProvider is a default concrete implementation of `IBaseLabelProvider`

Since:
  3.3

### Constructor Summary

Constructors
Constructor and Description
`BaseLabelProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addListener(ILabelProviderListener listener)` Adds a listener to this label provider.
`void` `dispose()` The `BaseLabelProvider` implementation of this `IBaseLabelProvider` method clears its internal listener list.
`protected void` `fireLabelProviderChanged(LabelProviderChangedEvent event)` Fires a label provider changed event to all registered listeners Only listeners registered at the time this method is called are notified.
`boolean` `isLabelProperty(Object element, String property)` The `BaseLabelProvider` implementation of this `IBaseLabelProvider` method returns `true`.
`void` `removeListener(ILabelProviderListener listener)` Removes a listener to this label provider.

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BaseLabelProvider

    public BaseLabelProvider()

### Method Detail

#### addListener

    public void addListener(ILabelProviderListener listener)

Description copied from interface: `IBaseLabelProvider`
Adds a listener to this label provider. Has no effect if an identical listener is already registered.

Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider.

Specified by:
  `addListener` in interface `IBaseLabelProvider`
Parameters:
  `listener` - a label provider listener

#### dispose

    public void dispose()

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`

#### isLabelProperty

    public boolean isLabelProperty(Object element,
                                   String property)

The `BaseLabelProvider` implementation of this `IBaseLabelProvider` method returns `true`. Subclasses may override.

Specified by:
  `isLabelProperty` in interface `IBaseLabelProvider`
Parameters:
  `element` - the element
  `property` - the property
Returns:
  `true` if the label would be affected, and `false` if it would be unaffected

#### removeListener

    public void removeListener(ILabelProviderListener listener)

Description copied from interface: `IBaseLabelProvider`
Removes a listener to this label provider. Has no effect if an identical listener is not registered.

Specified by:
  `removeListener` in interface `IBaseLabelProvider`
Parameters:
  `listener` - a label provider listener

#### fireLabelProviderChanged

    protected void fireLabelProviderChanged(LabelProviderChangedEvent event)

Fires a label provider changed event to all registered listeners Only listeners registered at the time this method is called are notified.

Parameters:
  `event` - a label provider changed event
See Also:
  `ILabelProviderListener.labelProviderChanged(org.eclipse.jface.viewers.LabelProviderChangedEvent)`