Class TableCellEditor.InternalLabelProvider

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.CellLabelProvider
org.eclipse.jface.viewers.ColumnLabelProvider
org.eclipse.nebula.widgets.nattable.edit.editor.TableCellEditor.InternalLabelProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.IColorProvider, org.eclipse.jface.viewers.IFontProvider, org.eclipse.jface.viewers.ILabelProvider, org.eclipse.jface.viewers.IToolTipProvider
Enclosing class:
TableCellEditor

protected class TableCellEditor.InternalLabelProvider extends org.eclipse.jface.viewers.ColumnLabelProvider
ColumnLabelProvider that determines the styles to use in the internal editor control of the table viewer based on the registered styles in the ConfigRegistry for default style, conversion error style and validation error style.

If no explicit styles for conversion and validation errors are configured, the foreground is simply rendered in red.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyCellStyle(org.eclipse.swt.widgets.Control editorControl, Object element)
    Applies style attributes to the internal cell editor of the table viewer based on the state of the value.
    Returns the IStyle based on the state of the given element
    org.eclipse.swt.graphics.Color
     
    org.eclipse.swt.graphics.Font
    getFont(Object element)
     
    org.eclipse.swt.graphics.Color
     

    Methods inherited from class org.eclipse.jface.viewers.ColumnLabelProvider

    getImage, getText, update

    Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider

    dispose, getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, initialize, useNativeToolTip

    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

    • InternalLabelProvider

      public InternalLabelProvider()
  • Method Details

    • getActiveCellStyle

      public IStyle getActiveCellStyle(Object element)
      Returns the IStyle based on the state of the given element
      Parameters:
      element - The element for which the style should be searched
      Returns:
      The IStyle for the current state of the given element
    • applyCellStyle

      public void applyCellStyle(org.eclipse.swt.widgets.Control editorControl, Object element)
      Applies style attributes to the internal cell editor of the table viewer based on the state of the value.
      Parameters:
      editorControl - The internal editor control of the table viewer to set the style to
      element - The element that is shown in that cell
    • getForeground

      public org.eclipse.swt.graphics.Color getForeground(Object element)
      Specified by:
      getForeground in interface org.eclipse.jface.viewers.IColorProvider
      Overrides:
      getForeground in class org.eclipse.jface.viewers.ColumnLabelProvider
    • getBackground

      public org.eclipse.swt.graphics.Color getBackground(Object element)
      Specified by:
      getBackground in interface org.eclipse.jface.viewers.IColorProvider
      Overrides:
      getBackground in class org.eclipse.jface.viewers.ColumnLabelProvider
    • getFont

      public org.eclipse.swt.graphics.Font getFont(Object element)
      Specified by:
      getFont in interface org.eclipse.jface.viewers.IFontProvider
      Overrides:
      getFont in class org.eclipse.jface.viewers.ColumnLabelProvider