Eclipse Platform
Release 3.3

org.eclipse.jface.databinding.viewers
Class ObservableMapLabelProvider

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.viewers.BaseLabelProvider
          extended byorg.eclipse.jface.viewers.LabelProvider
              extended byorg.eclipse.jface.databinding.viewers.ObservableMapLabelProvider
All Implemented Interfaces:
IBaseLabelProvider, ILabelProvider, ITableLabelProvider

public class ObservableMapLabelProvider
extends LabelProvider
implements ILabelProvider, ITableLabelProvider

Since:
1.1

Constructor Summary
ObservableMapLabelProvider(IObservableMap attributeMap)
           
ObservableMapLabelProvider(IObservableMap[] attributeMaps)
           
 
Method Summary
 void dispose()
          Disposes of this label provider.
 Image getColumnImage(Object element, int columnIndex)
          Returns the label image for the given column of the given element.
 String getColumnText(Object element, int columnIndex)
          Returns the label text for the given column of 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.
 
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, 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, isLabelProperty, removeListener
 

Constructor Detail

ObservableMapLabelProvider

public ObservableMapLabelProvider(IObservableMap attributeMap)
Parameters:
attributeMap -

ObservableMapLabelProvider

public ObservableMapLabelProvider(IObservableMap[] attributeMaps)
Parameters:
attributeMaps -
Method Detail

dispose

public void dispose()
Description copied from interface: 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 BaseLabelProvider

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 LabelProvider

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 LabelProvider

getColumnImage

public Image getColumnImage(Object element,
                            int columnIndex)
Description copied from interface: ITableLabelProvider
Returns the label image for the given column of the given element.

Specified by:
getColumnImage in interface ITableLabelProvider
Parameters:
element - the object representing the entire row, or null indicating that no input object is set in the viewer
columnIndex - the zero-based index of the column in which the label appears
Returns:
Image or null if there is no image for the given object at columnIndex

getColumnText

public String getColumnText(Object element,
                            int columnIndex)
Description copied from interface: ITableLabelProvider
Returns the label text for the given column of the given element.

Specified by:
getColumnText in interface ITableLabelProvider
Parameters:
element - the object representing the entire row, or null indicating that no input object is set in the viewer
columnIndex - the zero-based index of the column in which the label appears
Returns:
String or or null if there is no text for the given object at columnIndex

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

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