org.eclipse.emf.cdo.ui
Class CDOLabelProvider

java.lang.Object
  extended by org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
      extended by org.eclipse.emf.cdo.ui.CDOLabelProvider
All Implemented Interfaces:
INotifyChangedListener, IBaseLabelProvider, IColorProvider, IFontProvider, ILabelProvider, ITableLabelProvider

public class CDOLabelProvider
extends AdapterFactoryLabelProvider
implements IColorProvider, IFontProvider

Author:
Eike Stepper

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
AdapterFactoryLabelProvider.ColorProvider, AdapterFactoryLabelProvider.FontAndColorProvider, AdapterFactoryLabelProvider.FontProvider
 
Field Summary
 
Fields inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
adapterFactory, defaultBackground, defaultFont, defaultForeground, isFireLabelUpdateNotifications, labelProviderListeners
 
Constructor Summary
CDOLabelProvider(AdapterFactory adapterFactory, CDOView view, TreeViewer viewer)
           
 
Method Summary
 void dispose()
          Disposes of this label provider.
 Color getBackground(Object object)
          Provides a background color for the given element.
 Font getFont(Object object)
          Provides a font for the given element.
 Color getForeground(Object object)
          Provides a foreground color for the given element.
 CDOView getView()
           
 TreeViewer getViewer()
           
 void notifyChanged(Notification notification)
           
 
Methods inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
addListener, fireLabelProviderChanged, getAdapterFactory, getBackground, getColorFromObject, getColumnImage, getColumnText, getDefaultBackground, getDefaultFont, getDefaultForeground, getDefaultImage, getFont, getFontFromObject, getForeground, getImage, getImageFromObject, getText, isFireLabelUpdateNotifications, isLabelProperty, removeListener, setAdapterFactory, setDefaultBackground, setDefaultFont, setDefaultForeground, setFireLabelUpdateNotifications
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDOLabelProvider

public CDOLabelProvider(AdapterFactory adapterFactory,
                        CDOView view,
                        TreeViewer viewer)
Since:
2.0
Method Detail

getView

public CDOView getView()
Since:
2.0

getViewer

public TreeViewer getViewer()

dispose

public void dispose()
Description copied from interface: org.eclipse.jface.viewers.IBaseLabelProvider
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.

Specified by:
dispose in interface IBaseLabelProvider
Overrides:
dispose in class AdapterFactoryLabelProvider

notifyChanged

public void notifyChanged(Notification notification)
Specified by:
notifyChanged in interface INotifyChangedListener
Overrides:
notifyChanged in class AdapterFactoryLabelProvider

getBackground

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

Specified by:
getBackground in interface IColorProvider
Overrides:
getBackground in class AdapterFactoryLabelProvider
Parameters:
object - the element
Returns:
the background color for the element, or null to use the default background color

getForeground

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

Specified by:
getForeground in interface IColorProvider
Overrides:
getForeground in class AdapterFactoryLabelProvider
Parameters:
object - the element
Returns:
the foreground color for the element, or null to use the default foreground color

getFont

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

Specified by:
getFont in interface IFontProvider
Overrides:
getFont in class AdapterFactoryLabelProvider
Parameters:
object - the element
Returns:
the font for the element, or null to use the default font


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.