Runtime

## org.eclipse.gmf.runtime.common.ui.services.statusline
Class StatusLineMessageContributionItem

    java.lang.Object
      org.eclipse.jface.action.ContributionItem
          org.eclipse.gmf.runtime.common.ui.services.statusline.StatusLineMessageContributionItem

All Implemented Interfaces:
  IContributionItem, IBaseLabelProvider, ILabelProvider

    public class StatusLineMessageContributionItem

extends ContributionItem
implements ILabelProvider

A default implementation of a contribution item that provides content for the message contribution in the status line. The default status line manager provides the ability to display an icon and message. This class is not really a ContributionItem but rather a label provider that is returned by the `StatusLineService`

Since:
  1.2

Constructor Summary
`StatusLineMessageContributionItem()` Constructor for a StatusLineMessageContributionItem.

Method Summary
`void` `addListener(ILabelProviderListener listener)`
`Image` `getImage(java.lang.Object element)`
`ILabelProvider` `getLabelProvider()` Get the label provider.
`java.lang.String` `getText(java.lang.Object element)`
`boolean` `isLabelProperty(java.lang.Object element, java.lang.String property)`
`void` `removeListener(ILabelProviderListener listener)`
`void` `setLabelProvider(ILabelProvider aLabelProvider)` Set the label provider.

Methods inherited from class org.eclipse.jface.action.ContributionItem
`dispose, fill, fill, fill, fill, getId, getParent, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
`dispose`

Constructor Detail

### StatusLineMessageContributionItem

    public StatusLineMessageContributionItem()

  Constructor for a StatusLineMessageContributionItem.

  Parameters:
    `workbenchPage` - - workbench page to be used
    `id` - - contribution item id

Method Detail

### addListener

    public void addListener(ILabelProviderListener listener)

  Specified by:
    `addListener` in interface `IBaseLabelProvider`

### getImage

    public Image getImage(java.lang.Object element)

  Specified by:
    `getImage` in interface `ILabelProvider`

### getLabelProvider

    public ILabelProvider getLabelProvider()

  Get the label provider. If no label provider has been initialized by setLabelProvider(), we create a new `CommonLabelProvider`.

  Returns:
    the label provider.

### getText

    public java.lang.String getText(java.lang.Object element)

  Specified by:
    `getText` in interface `ILabelProvider`

### isLabelProperty

    public boolean isLabelProperty(java.lang.Object element,
                                   java.lang.String property)

  Specified by:
    `isLabelProperty` in interface `IBaseLabelProvider`

### removeListener

    public void removeListener(ILabelProviderListener listener)

  Specified by:
    `removeListener` in interface `IBaseLabelProvider`

### setLabelProvider

    public void setLabelProvider(ILabelProvider aLabelProvider)

  Set the label provider.

  Parameters:
    `aLabelProvider` - the label provider.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.