Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Interface IBaseLabelProvider

All Known Subinterfaces:
DelegatingStyledCellLabelProvider.IStyledLabelProvider, ICommonLabelProvider, ICompareInputLabelProvider, IDebugModelPresentation, IDebugModelPresentationExtension, IDecoratorManager, IDelayedLabelDecorator, IInstructionPointerPresentation, ILabelDecorator, ILabelProvider, ILightweightLabelDecorator, IMemoryBlockTablePresentation, ITableLabelProvider, ITreePathLabelProvider, IViewerLabelProvider
All Known Implementing Classes:
AbstractSynchronizationLabelProvider, AbstractSynchronizeLabelProvider, BaseLabelProvider, CellLabelProvider, ColumnLabelProvider, ComboBoxLabelProvider, DecoratingLabelProvider, DecoratingStyledCellLabelProvider, DelegatingStyledCellLabelProvider, EnvironmentTab.EnvironmentVariableLabelProvider, FileEditorMappingLabelProvider, LabelDecorator, LabelProvider, ListeningLabelProvider, NamedHandleObjectLabelProvider, ObservableMapCellLabelProvider, ObservableMapLabelProvider, OwnerDrawLabelProvider, PerspectiveLabelProvider, PreferenceLabelProvider, PropertyColumnLabelProvider, RefactoringHistoryLabelProvider, StyledCellLabelProvider, SynchronizationLabelProvider, TreeColumnViewerLabelProvider, org.eclipse.jface.internal.databinding.provisional.viewers.ViewerLabelProvider, WorkbenchLabelProvider, WorkbenchPartLabelProvider

public interface IBaseLabelProvider

A label provider maps an element of the viewer's model to an optional image and optional text string used to display the element in the viewer's control. Certain label providers may allow multiple labels per element. This is an "abstract interface", defining methods common to all label providers, but does not actually define the methods to get the label(s) for an element. This interface should never be directly implemented. Most viewers will take either an 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.

See Also:
ILabelProvider, ITableLabelProvider

Method Summary
 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.
 

Method Detail

addListener

void addListener(
ILabelProviderListener listener)
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.

Parameters:
listener - a label provider listener

dispose

void dispose()
Disposes of this label provider. When a label provider is attached to a viewer, the viewer will automatically call this method when the viewer is being closed. When label providers are used outside of the context of a viewer, it is the client's responsibility to ensure that this method is called when the provider is no longer needed.


isLabelProperty

boolean isLabelProperty(
Object element,
                        
String property)
Returns whether the label would be affected by a change to the given property of the given element. This can be used to optimize a non-structural viewer update. If the property mentioned in the update does not affect the label, then the viewer need not update the label.

Parameters:
element - the element
property - the property
Returns:
true if the label would be affected, and false if it would be unaffected

removeListener

void removeListener(
ILabelProviderListener listener)
Removes a listener to this label provider. Has no affect if an identical listener is not registered.

Parameters:
listener - a label provider listener

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire