public final class PerspectiveLabelProvider extends LabelProvider implements ITableLabelProvider
IPerspectiveDescriptor
) in table- and
tree-structured viewers.
Clients may instantiate this class. It is not intended to be subclassed.
Constructor and Description |
---|
PerspectiveLabelProvider()
Creates a new label provider for perspectives.
|
PerspectiveLabelProvider(boolean markDefault)
Creates a new label provider for perspectives.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
The
LabelProvider implementation of this
IBaseLabelProvider method does nothing. |
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)
The
LabelProvider implementation of this
ILabelProvider method returns null . |
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 PerspectiveLabelProvider()
public PerspectiveLabelProvider(boolean markDefault)
markDefault
- true
if the default perspective is to be
visually marked, and false
if the default perspective is
not treated as anything specialpublic final Image getImage(Object element)
LabelProvider
LabelProvider
implementation of this
ILabelProvider
method returns null
. Subclasses may
override.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 final void dispose()
LabelProvider
LabelProvider
implementation of this
IBaseLabelProvider
method does nothing. Subclasses may extend.dispose
in interface IBaseLabelProvider
dispose
in class LabelProvider
public final 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 objectpublic final Image getColumnImage(Object element, int columnIndex)
ITableLabelProvider
getColumnImage
in interface ITableLabelProvider
element
- the object representing the entire row, or
null
indicating that no input object is set
in the viewercolumnIndex
- the zero-based index of the column in which
the label appearsnull
if there is no image for the
given object at columnIndexITableLabelProvider.getColumnImage(java.lang.Object, int)
public final String getColumnText(Object element, int columnIndex)
ITableLabelProvider
getColumnText
in interface ITableLabelProvider
element
- the object representing the entire row, or
null
indicating that no input object is set
in the viewercolumnIndex
- the zero-based index of the column in which the label appearsnull
if there is no text for the
given object at columnIndexITableLabelProvider.getColumnText(java.lang.Object, int)
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.