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
    The StringMapProp being used for the table.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.swt.graphics.Image
    getColumnImage(Object element, int columnIndex)
    Returns the label image for the given column of the given element.
    getColumnText(Object element, int columnIndex)
    Returns the label text for the given column of the given element.
    org.eclipse.swt.graphics.Image
    getImage(Object element)
    Returns the image for the label of the given element.
    getText(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 Details

    • StringMapPropLabelProvider

      public StringMapPropLabelProvider(StringMapProp prop)
      The StringMapProp being used for the table.
  • Method Details

    • getColumnImage

      public org.eclipse.swt.graphics.Image getColumnImage(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 String getColumnText(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(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 String getText(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