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 InternalLabelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.IStyle
getActiveCellStyle(Object element)
Returns the IStyle based on the state of the given elementorg.eclipse.swt.graphics.Color
getBackground(Object element)
org.eclipse.swt.graphics.Font
getFont(Object element)
org.eclipse.swt.graphics.Color
getForeground(Object element)
-
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
-
-
-
-
Method Detail
-
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 toelement
- The element that is shown in that cell
-
getForeground
public org.eclipse.swt.graphics.Color getForeground(Object element)
- Specified by:
getForeground
in interfaceorg.eclipse.jface.viewers.IColorProvider
- Overrides:
getForeground
in classorg.eclipse.jface.viewers.ColumnLabelProvider
-
getBackground
public org.eclipse.swt.graphics.Color getBackground(Object element)
- Specified by:
getBackground
in interfaceorg.eclipse.jface.viewers.IColorProvider
- Overrides:
getBackground
in classorg.eclipse.jface.viewers.ColumnLabelProvider
-
getFont
public org.eclipse.swt.graphics.Font getFont(Object element)
- Specified by:
getFont
in interfaceorg.eclipse.jface.viewers.IFontProvider
- Overrides:
getFont
in classorg.eclipse.jface.viewers.ColumnLabelProvider
-
-