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 -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCellStyle(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.getActiveCellStyle(Object element) Returns the IStyle based on the state of the given elementorg.eclipse.swt.graphics.ColorgetBackground(Object element) org.eclipse.swt.graphics.Fontorg.eclipse.swt.graphics.ColorgetForeground(Object element) Methods inherited from class org.eclipse.jface.viewers.ColumnLabelProvider
getImage, getText, updateMethods inherited from class org.eclipse.jface.viewers.CellLabelProvider
dispose, getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipText, getToolTipTimeDisplayed, initialize, useNativeToolTipMethods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, dispose, fireLabelProviderChanged, isLabelProperty, removeListenerMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
addListener, dispose, isLabelProperty, removeListener
-
Constructor Details
-
InternalLabelProvider
public InternalLabelProvider()
-
-
Method Details
-
getActiveCellStyle
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
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
- Specified by:
getForegroundin interfaceorg.eclipse.jface.viewers.IColorProvider- Overrides:
getForegroundin classorg.eclipse.jface.viewers.ColumnLabelProvider
-
getBackground
- Specified by:
getBackgroundin interfaceorg.eclipse.jface.viewers.IColorProvider- Overrides:
getBackgroundin classorg.eclipse.jface.viewers.ColumnLabelProvider
-
getFont
- Specified by:
getFontin interfaceorg.eclipse.jface.viewers.IFontProvider- Overrides:
getFontin classorg.eclipse.jface.viewers.ColumnLabelProvider
-