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
BaseLabelProvider implementation of this
IBaseLabelProvider method clears its internal listener list. |
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, removeListener
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, isLabelProperty, removeListener
public static final FileEditorMappingLabelProvider INSTANCE
public void dispose()
BaseLabelProvider
BaseLabelProvider
implementation of this
IBaseLabelProvider
method clears its internal listener list.
Subclasses may extend but should call the super implementation.dispose
in interface IBaseLabelProvider
dispose
in class BaseLabelProvider
public 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 ITableLabelProvider
element
- 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)
ITableLabelProvider
getColumnText
in interface ITableLabelProvider
element
- 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 ILabelProvider
getImage
in class LabelProvider
element
- the element for which to provide the label imagenull
if there is no image for the given objectpublic String getText(Object element)
LabelProvider
LabelProvider
implementation of this
ILabelProvider
method returns the element's
toString
string. Subclasses may override.getText
in interface ILabelProvider
getText
in class LabelProvider
element
- the element for which to provide the label textnull
if there is no text label for the given object
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.