public class FileEditorMappingLabelProvider extends LabelProvider implements ITableLabelProvider
IFileEditorMapping
objects in viewers.
This class has a singleton instance,
FileEditorMappingLabelProvider.INSTANCE,
which can be used any place this kind of label provider is needed.
The singleton instance hangs on to images, which get freed up when
dispose is called.
ILabelProvider| Modifier and Type | Field and Description |
|---|---|
static FileEditorMappingLabelProvider |
INSTANCE
Singleton instance accessor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
The
LabelProvider implementation of this
IBaseLabelProvider method does nothing. |
Image |
getColumnImage(Object element,
int row)
The
ResourceTypeEditorMappingLabelProvider implementation of this
ITableLabelProvider method creates and returns an new image. |
String |
getColumnText(Object element,
int row)
Returns the label text for the given column of the given element.
|
Image |
getImage(Object element)
The
ResourceTypeEditorMappingLabelProvider implementation of this
ILabelProvider method creates and returns an new image. |
String |
getText(Object element)
The
LabelProvider implementation of this
ILabelProvider method returns the element's toString
string. |
addListener, fireLabelProviderChanged, isLabelProperty, removeListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, isLabelProperty, removeListenerpublic static final FileEditorMappingLabelProvider INSTANCE
public void dispose()
LabelProviderLabelProvider implementation of this
IBaseLabelProvider method does nothing. Subclasses may extend.dispose in interface IBaseLabelProviderdispose in class LabelProviderpublic Image getColumnImage(Object element, int row)
ResourceTypeEditorMappingLabelProvider implementation of this
ITableLabelProvider method creates and returns an new image. The
image is remembered internally and will be deallocated by
dispose.getColumnImage in interface ITableLabelProviderelement - the object representing the entire row, or
null indicating that no input object is set
in the viewerrow - the zero-based index of the column in which
the label appearsnull if there is no image for the
given object at columnIndexpublic String getColumnText(Object element, int row)
ITableLabelProvidergetColumnText in interface ITableLabelProviderelement - the object representing the entire row, or
null indicating that no input object is set
in the viewerrow - the zero-based index of the column in which the label appearsnull if there is no text for the
given object at columnIndexpublic Image getImage(Object element)
ResourceTypeEditorMappingLabelProvider implementation of this
ILabelProvider method creates and returns an new image. The image
is remembered internally and will be deallocated by dispose.getImage in interface ILabelProvidergetImage in class LabelProviderelement - the element for which to provide the label imagenull
if there is no image for the given objectpublic String getText(Object element)
LabelProviderLabelProvider implementation of this
ILabelProvider method returns the element's toString
string. Subclasses may override.getText in interface ILabelProvidergetText in class LabelProviderelement - the element for which to provide the label textnull
if there is no text label for the given objectGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.