Package com.iizigo.navigator
Class StringMapPropLabelProvider
- java.lang.Object
- org.eclipse.core.commands.common.EventManager
- org.eclipse.jface.viewers.BaseLabelProvider
- com.iizigo.navigator.StringMapPropLabelProvider
- All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider
,org.eclipse.jface.viewers.ILabelProvider
,org.eclipse.jface.viewers.ITableLabelProvider
public class StringMapPropLabelProvider extends org.eclipse.jface.viewers.BaseLabelProvider implements org.eclipse.jface.viewers.ITableLabelProvider, org.eclipse.jface.viewers.ILabelProvider
Label provider for a string map property for a two-column table.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description StringMapPropLabelProvider(StringMapProp prop)
The StringMapProp being used for the table.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Image
getColumnImage(java.lang.Object element, int columnIndex)
Returns the label image for the given column of the given element.java.lang.String
getColumnText(java.lang.Object element, int columnIndex)
Returns the label text for the given column of the given element.org.eclipse.swt.graphics.Image
getImage(java.lang.Object element)
Returns the image for the label of the given element.java.lang.String
getText(java.lang.Object element)
Returns the text for the label of the given element.Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListener
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Constructor Detail
StringMapPropLabelProvider
public StringMapPropLabelProvider(StringMapProp prop)
The StringMapProp being used for the table.
Method Detail
getColumnImage
public org.eclipse.swt.graphics.Image getColumnImage(java.lang.Object element, int columnIndex)
Returns the label image for the given column of the given element.- Specified by:
getColumnImage
in interfaceorg.eclipse.jface.viewers.ITableLabelProvider
- Parameters:
element
- the object representing the entire row, ornull
indicating that no input object is set in the viewercolumnIndex
- 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 java.lang.String getColumnText(java.lang.Object element, int columnIndex)
Returns the label text for the given column of the given element.- Specified by:
getColumnText
in interfaceorg.eclipse.jface.viewers.ITableLabelProvider
- Parameters:
element
- the object representing the entire row, ornull
indicating that no input object is set in the viewercolumnIndex
- 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
getImage
public org.eclipse.swt.graphics.Image getImage(java.lang.Object element)
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 interfaceorg.eclipse.jface.viewers.ILabelProvider
- Parameters:
element
- the element for which to provide the label image- Returns:
- the image used to label the element, or
null
if there is no image for the given object
getText
public java.lang.String getText(java.lang.Object element)
Returns the text for the label of the given element.- Specified by:
getText
in interfaceorg.eclipse.jface.viewers.ILabelProvider
- Parameters:
element
- the element for which to provide the label text- Returns:
- the text string used to label the element, or
null
if there is no text label for the given object