public class MultiLineTextCellEditor extends TextCellEditor
TextCellEditor
that uses a multi line text editor as
editor control. To support multi line editing correctly, the behaviour to commit
on pressing the enter key is disabled.
A multi line editor usually needs some space. Therefore it might be a good decision
to set the configuration attribute EditConfigAttributes.OPEN_IN_DIALOG
to
true
for this editor, so the editor always opens in a subdialog.
As some table layouts may support enough space for an inline cell editor, this editor
does not specify ICellEditor.openInline(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry,
java.util.List)
to always return false
.
commitOnEnter, decorationProvider
cellStyle, configRegistry, conversionEditErrorHandler, dataValidator, displayConverter, editMode, labelStack, layerCell, validationEditErrorHandler
Constructor and Description |
---|
MultiLineTextCellEditor()
Create a new multi line text editor that ensures to not commit the editor
value in case enter is typed.
|
MultiLineTextCellEditor(boolean lineWrap)
Create a new multi line text editor that ensures to not commit the editor
value in case enter is typed.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Text |
createEditorControl(org.eclipse.swt.widgets.Composite parent)
Creates the editor control that is wrapped by this ICellEditor.
|
void |
setLineWrap(boolean lineWrap) |
activateCell, close, createEditorControl, getDecorationProvider, getEditorControl, getEditorValue, getInputConversionErrorHandler, getInputValidationErrorHandler, getSelectionMode, isEditable, setDecorationPositionOverride, setEditable, setEditorValue, setErrorDecorationEnabled, setErrorDecorationText, setInputConversionErrorHandler, setInputValidationErrorHandler, setSelectionMode, showErrorDecorationHover
activateAtAnyPosition, activateCell, addEditorControlListeners, commit, commit, commit, getCanonicalValue, getCanonicalValue, getColumnIndex, getColumnPosition, getRowIndex, getRowPosition, handleConversion, isClosed, openAdjacentEditor, openInline, removeEditorControlListeners, setCanonicalValue, setDataValidator, supportMultiEdit, validateCanonicalValue, validateCanonicalValue
public MultiLineTextCellEditor()
public MultiLineTextCellEditor(boolean lineWrap)
lineWrap
- Flag to configure whether the text control should enable automatic line
wrap behaviour or not.public org.eclipse.swt.widgets.Text createEditorControl(org.eclipse.swt.widgets.Composite parent)
ICellEditor
createEditorControl
in interface ICellEditor
createEditorControl
in class TextCellEditor
parent
- The Composite that will be the parent of the new editor control.
Can not be null
public void setLineWrap(boolean lineWrap)
lineWrap
- true
if the text control should enable automatic line
wrap behaviour, false
if notCopyright © 2013. All Rights Reserved.