Class XViewerLabelProvider

java.lang.Object
org.eclipse.nebula.widgets.xviewer.XViewerLabelProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.ITableColorProvider, org.eclipse.jface.viewers.ITableLabelProvider, IXViewerLabelProvider

public abstract class XViewerLabelProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.ITableLabelProvider, org.eclipse.jface.viewers.ITableColorProvider, IXViewerLabelProvider
  • Constructor Summary

    Constructors 
    Constructor Description
    XViewerLabelProvider​(XViewer viewer)  
  • Method Summary

    Modifier and Type Method Description
    void clearXViewerColumnIndexCache()
    When columns get re-ordered, need to clear out this cache so indexing can be re-computed
    org.eclipse.swt.graphics.Color getBackground​(java.lang.Object element, int columnIndex)  
    org.eclipse.swt.graphics.Color getBackground​(java.lang.Object element, XViewerColumn xCol, int columnIndex)  
    java.lang.Object getBackingData​(java.lang.Object element, XViewerColumn xViewerColumn, int columnIndex)
    Returns the backing data object for operations like sorting
    int getColumnGradient​(java.lang.Object element, XViewerColumn xCol, int columnIndex)
    Return value between 0..100 and cell will show bar graph shading that portion of the cell
    org.eclipse.swt.graphics.Image getColumnImage​(java.lang.Object element, int columnIndex)  
    abstract org.eclipse.swt.graphics.Image getColumnImage​(java.lang.Object element, XViewerColumn xCol, int columnIndex)  
    java.lang.String getColumnText​(java.lang.Object element, int columnIndex)
    Returns the label text for the given column of the given element.
    abstract java.lang.String getColumnText​(java.lang.Object element, XViewerColumn xCol, int columnIndex)
    Returns the label text for the given column of the given element.
    org.eclipse.swt.graphics.Color getForeground​(java.lang.Object element, int columnIndex)  
    org.eclipse.swt.graphics.Color getForeground​(java.lang.Object element, XViewerColumn xCol, int columnIndex)  
    static java.lang.String getPrecomputedText​(java.lang.Object element, XViewerColumn xViewerColumn, IXViewerPreComputedColumn preComputedColumn, boolean debugLoading)  
    org.eclipse.swt.graphics.Color getSearchBackground​(java.lang.Object element, int columnIndex)  
    XViewerColumn getTreeColumnOffIndex​(int columnIndex)
    Returns XViewerColumn of the given index

    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

  • Method Details

    • getTreeColumnOffIndex

      public XViewerColumn getTreeColumnOffIndex​(int columnIndex)
      Description copied from interface: IXViewerLabelProvider
      Returns XViewerColumn of the given index
      Specified by:
      getTreeColumnOffIndex in interface IXViewerLabelProvider
    • clearXViewerColumnIndexCache

      public void clearXViewerColumnIndexCache()
      Description copied from interface: IXViewerLabelProvider
      When columns get re-ordered, need to clear out this cache so indexing can be re-computed
      Specified by:
      clearXViewerColumnIndexCache in interface IXViewerLabelProvider
    • getColumnImage

      public org.eclipse.swt.graphics.Image getColumnImage​(java.lang.Object element, int columnIndex)
      Specified by:
      getColumnImage in interface org.eclipse.jface.viewers.ITableLabelProvider
    • getColumnText

      public java.lang.String getColumnText​(java.lang.Object element, int columnIndex)
      Description copied from interface: IXViewerLabelProvider
      Returns the label text for the given column of the given element.
      Specified by:
      getColumnText in interface org.eclipse.jface.viewers.ITableLabelProvider
      Specified by:
      getColumnText in interface IXViewerLabelProvider
    • getPrecomputedText

      public static java.lang.String getPrecomputedText​(java.lang.Object element, XViewerColumn xViewerColumn, IXViewerPreComputedColumn preComputedColumn, boolean debugLoading)
    • getSearchBackground

      public org.eclipse.swt.graphics.Color getSearchBackground​(java.lang.Object element, int columnIndex)
    • getBackground

      public org.eclipse.swt.graphics.Color getBackground​(java.lang.Object element, int columnIndex)
      Specified by:
      getBackground in interface org.eclipse.jface.viewers.ITableColorProvider
    • getForeground

      public org.eclipse.swt.graphics.Color getForeground​(java.lang.Object element, int columnIndex)
      Specified by:
      getForeground in interface org.eclipse.jface.viewers.ITableColorProvider
    • getBackground

      public org.eclipse.swt.graphics.Color getBackground​(java.lang.Object element, XViewerColumn xCol, int columnIndex)
    • getForeground

      public org.eclipse.swt.graphics.Color getForeground​(java.lang.Object element, XViewerColumn xCol, int columnIndex)
    • getColumnImage

      public abstract org.eclipse.swt.graphics.Image getColumnImage​(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getColumnText

      public abstract java.lang.String getColumnText​(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws java.lang.Exception
      Description copied from interface: IXViewerLabelProvider
      Returns the label text for the given column of the given element.
      Specified by:
      getColumnText in interface IXViewerLabelProvider
      Throws:
      java.lang.Exception
    • getBackingData

      public java.lang.Object getBackingData​(java.lang.Object element, XViewerColumn xViewerColumn, int columnIndex) throws java.lang.Exception
      Returns the backing data object for operations like sorting
      Specified by:
      getBackingData in interface IXViewerLabelProvider
      Throws:
      java.lang.Exception
    • getColumnGradient

      public int getColumnGradient​(java.lang.Object element, XViewerColumn xCol, int columnIndex) throws java.lang.Exception
      Return value between 0..100 and cell will show bar graph shading that portion of the cell
      Specified by:
      getColumnGradient in interface IXViewerLabelProvider
      Throws:
      java.lang.Exception