Class StringMapPropLabelProvider

All Implemented Interfaces:
IBaseLabelProvider, ILabelProvider, ITableLabelProvider

public class StringMapPropLabelProvider extends BaseLabelProvider implements ITableLabelProvider, ILabelProvider
Label provider for a string map property for a two-column table.
Author:
Christopher Mindus
  • Constructor Details

    • StringMapPropLabelProvider

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

    • getColumnImage

      public Image getColumnImage(Object element, int columnIndex)
      Returns the label image for the given column of the given element.
      Specified by:
      getColumnImage in interface 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 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 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 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 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