public interface IBaseLabelProvider
ILabelProvider
or
an ITableLabelProvider
.
A label provider must not be shared between viewers since a label provider generally manages SWT resources (images), which must be disposed when the viewer is disposed. To simplify life cycle management, the current label provider of a viewer is disposed when the viewer is disposed.
Label providers can be used outside the context of viewers wherever
images are needed. When label providers are used in this fashion
it is the responsibility of the user to ensure dispose
is called when the provider is no longer needed.
ILabelProvider
,
ITableLabelProvider
Modifier and Type | Method and Description |
---|---|
void |
addListener(ILabelProviderListener listener)
Adds a listener to this label provider.
|
void |
dispose()
Disposes of this label provider.
|
boolean |
isLabelProperty(Object element,
String property)
Returns whether the label would be affected
by a change to the given property of the given element.
|
void |
removeListener(ILabelProviderListener listener)
Removes a listener to this label provider.
|
void addListener(ILabelProviderListener listener)
Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider.
listener
- a label provider listenervoid dispose()
boolean isLabelProperty(Object element, String property)
element
- the elementproperty
- the propertytrue
if the label would be affected,
and false
if it would be unaffectedvoid removeListener(ILabelProviderListener listener)
listener
- a label provider listener
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.