| org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider
NavigatorContentServiceLabelProvider | public class NavigatorContentServiceLabelProvider extends EventManager implements ILabelProvider,IColorProvider,IFontProvider,ITreePathLabelProvider,ILabelProviderListener(Code) | |
Provides relevant labels based on the associated
INavigatorContentService for the contents of a
TreeViewer .
Except for the dependency on
INavigatorContentService , this class has no
dependencies on the rest of the Common Navigator framework. Tree viewers that would like to use
the extensions defined by the Common Navigator, without using the actual view part or other
pieces of functionality (filters, sorting, etc) may choose to use this class, in effect using an
extensible label provider.
EXPERIMENTAL. This class or interface has been added as part of a work in
progress. There is a guarantee neither that this API will work nor that it will remain the same.
Please do not use this API without consulting with the Platform/UI team.
since: 3.2 See Also: org.eclipse.ui.internal.navigator.NavigatorContentService See Also: org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider |
Method Summary | |
public void | addListener(ILabelProviderListener aListener)
Label provider listeners are currently supported. | public void | dispose()
Dispose of the content service, if it was created and not supplied.
If a client uses this class outside of the framework of
CommonViewer , this method
must be called when finished. | 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. | public Color | getBackground(Object anElement) | public Font | getFont(Object anElement) | public Color | getForeground(Object anElement) | public Image | getImage(Object anElement)
Return the appropriate image for anElement. | public String | getText(Object anElement)
Return a String representation of anElement to be used as the display name in the tree
viewer. | public boolean | isLabelProperty(Object anElement, String aProperty)
Indicates whether anElelement has aProperty that affects the display of the label. | public void | labelProviderChanged(LabelProviderChangedEvent event) | public void | removeListener(ILabelProviderListener aListener)
Label provider listeners are currently supported. | public void | updateLabel(ViewerLabel label, TreePath elementPath) |
NavigatorContentServiceLabelProvider | public NavigatorContentServiceLabelProvider(NavigatorContentService aContentService)(Code) | |
Uses the supplied content service to acquire the available extensions.
Parameters: aContentService - The associated NavigatorContentService that should be used to acquire information. |
addListener | public void addListener(ILabelProviderListener aListener)(Code) | |
Label provider listeners are currently supported.
See Also: org.eclipse.jface.viewers.IBaseLabelProvider.addListener(org.eclipse.jface.viewers.ILabelProviderListener) |
dispose | public void dispose()(Code) | |
Dispose of the content service, if it was created and not supplied.
If a client uses this class outside of the framework of
CommonViewer , this method
must be called when finished.
See Also: org.eclipse.jface.viewers.IBaseLabelProvider.dispose |
fireLabelProviderChanged | protected void fireLabelProviderChanged(LabelProviderChangedEvent event)(Code) | | 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 |
getBackground | public Color getBackground(Object anElement)(Code) | | |
getForeground | public Color getForeground(Object anElement)(Code) | | |
getImage | public Image getImage(Object anElement)(Code) | |
Return the appropriate image for anElement. The image will be used as the icon for anElement
when displayed in the tree viewer. This method uses information from its contentService to
know what extensions to use to supply the correct label.
Parameters: anElement - An element from the Tree Viewer The Image that will be used as the icon when anElement is displayed in the viewer. See Also: org.eclipse.jface.viewers.ILabelProvider.getImage(java.lang.Object) |
getText | public String getText(Object anElement)(Code) | |
Return a String representation of anElement to be used as the display name in the tree
viewer.
Parameters: anElement - An element from the Tree Viewer The String label to display for the object when represented in the viewer. See Also: org.eclipse.jface.viewers.ILabelProvider.getText(java.lang.Object) |
isLabelProperty | public boolean isLabelProperty(Object anElement, String aProperty)(Code) | |
Indicates whether anElelement has aProperty that affects the display of the label.
Parameters: anElement - An element from the Tree Viewer Parameters: aProperty - A property of the given element that could be a label provider True if any of the extensions enabled on anElement consider aProperty alabel-changing property. See Also: org.eclipse.jface.viewers.IBaseLabelProvider.isLabelProperty(java.lang.Objectjava.lang.String) |
labelProviderChanged | public void labelProviderChanged(LabelProviderChangedEvent event)(Code) | | |
removeListener | public void removeListener(ILabelProviderListener aListener)(Code) | |
Label provider listeners are currently supported.
See Also: org.eclipse.jface.viewers.IBaseLabelProvider.removeListener(org.eclipse.jface.viewers.ILabelProviderListener) |
updateLabel | public void updateLabel(ViewerLabel label, TreePath elementPath)(Code) | | |
|
|