Eclipse Platform
Release 3.3

org.eclipse.jface.viewers
Class TreeColumnViewerLabelProvider

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.viewers.BaseLabelProvider
          extended byorg.eclipse.jface.viewers.CellLabelProvider
              extended byorg.eclipse.jface.viewers.ColumnLabelProvider
                  extended byorg.eclipse.jface.viewers.WrappedViewerLabelProvider
                      extended byorg.eclipse.jface.viewers.TableColumnViewerLabelProvider
                          extended byorg.eclipse.jface.viewers.TreeColumnViewerLabelProvider
All Implemented Interfaces:
IBaseLabelProvider, IColorProvider, IFontProvider, ILabelProvider

public class TreeColumnViewerLabelProvider
extends org.eclipse.jface.viewers.TableColumnViewerLabelProvider

TreeViewerLabelProvider is the ViewerLabelProvider that handles TreePaths.

Since:
3.3

Constructor Summary
TreeColumnViewerLabelProvider(IBaseLabelProvider labelProvider)
          Create a new instance of the receiver with the supplied labelProvider.
 
Method Summary
 Color getBackground(Object element)
          Provides a background color for the given element.
 Font getFont(Object element)
          Provides a font for the given element.
 Color getForeground(Object element)
          Provides a foreground color for the given element.
 Image getImage(Object element)
          Returns the image for the label of the given element.
 String getText(Object element)
          Returns the text for the label of the given element.
 ITreePathLabelProvider getTreePathProvider()
          Return the ITreePathLabelProvider for the receiver.
 void setProviders(Object provider)
          Set the any providers for the receiver that can be adapted from provider.
 void update(ViewerCell cell)
          Update the label for cell.
 void updateLabel(ViewerLabel label, TreePath elementPath)
          Update the label for the element with TreePath.
 
Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider
getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, useNativeToolTip
 
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListener
 
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
 
Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
addListener, dispose, isLabelProperty, removeListener
 

Constructor Detail

TreeColumnViewerLabelProvider

public TreeColumnViewerLabelProvider(IBaseLabelProvider labelProvider)
Create a new instance of the receiver with the supplied labelProvider.

Parameters:
labelProvider -
Method Detail

updateLabel

public void updateLabel(ViewerLabel label,
                        TreePath elementPath)
Update the label for the element with TreePath.

Parameters:
label -
elementPath -

setProviders

public void setProviders(Object provider)
Description copied from class: org.eclipse.jface.viewers.WrappedViewerLabelProvider
Set the any providers for the receiver that can be adapted from provider.

Parameters:
provider - Object

getTreePathProvider

public ITreePathLabelProvider getTreePathProvider()
Return the ITreePathLabelProvider for the receiver.

Returns:
Returns the treePathProvider.

update

public void update(ViewerCell cell)
Description copied from class: CellLabelProvider
Update the label for cell.


getFont

public Font getFont(Object element)
Description copied from interface: IFontProvider
Provides a font for the given element.

Specified by:
getFont in interface IFontProvider
Overrides:
getFont in class ColumnLabelProvider

getBackground

public Color getBackground(Object element)
Description copied from interface: IColorProvider
Provides a background color for the given element.

Specified by:
getBackground in interface IColorProvider
Overrides:
getBackground in class ColumnLabelProvider

getText

public String getText(Object element)
Description copied from interface: ILabelProvider
Returns the text for the label of the given element.

Specified by:
getText in interface ILabelProvider
Overrides:
getText in class ColumnLabelProvider

getImage

public Image getImage(Object element)
Description copied from interface: ILabelProvider
Returns the image for the label of the given element. The image is owned by the label provider and must not be disposed directly. Instead, dispose the label provider when no longer needed.

Specified by:
getImage in interface ILabelProvider
Overrides:
getImage in class ColumnLabelProvider

getForeground

public Color getForeground(Object element)
Description copied from interface: IColorProvider
Provides a foreground color for the given element.

Specified by:
getForeground in interface IColorProvider
Overrides:
getForeground in class ColumnLabelProvider

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.