Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      org.eclipse.swt.graphics.ImagegetColumnImage​(java.lang.Object element, int columnIndex)
      Returns the label image for the given column of the given element.
      java.lang.StringgetColumnText​(java.lang.Object element, int columnIndex)
      Returns the label text for the given column of the given element.
      org.eclipse.swt.graphics.ImagegetImage​(java.lang.Object element)
      Returns the image for the label of the given element.
      java.lang.StringgetText​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider

        addListener, dispose, isLabelProperty, removeListener
    • 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 interface org.eclipse.jface.viewers.ITableLabelProvider
        Parameters:
        element - the object representing the entire row, or null indicating that no input object is set in the viewer
        columnIndex - 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 interface org.eclipse.jface.viewers.ITableLabelProvider
        Parameters:
        element - the object representing the entire row, or null indicating that no input object is set in the viewer
        columnIndex - 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 interface org.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 interface org.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