Class RichTextCellEditor
java.lang.Object
org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor
org.eclipse.nebula.widgets.nattable.extension.nebula.richtext.RichTextCellEditor
- All Implemented Interfaces:
ICellEditor
NatTable
ICellEditor implementation that makes use of the Nebula
RichTextEditor.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor
AbstractCellEditor.InlineFocusListener, AbstractCellEditor.InlineTraverseListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.nebula.widgets.richtext.RichTextEditorThe rich text editor control, initiallynull.protected org.eclipse.nebula.widgets.richtext.RichTextEditorConfigurationTheRichTextEditorConfigurationthat should be used for creating the inline rich text editor control.protected intThe style bits that are used to create the rich text editor control.Fields inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor
cellStyle, configRegistry, conversionEditErrorHandler, dataValidator, displayConverter, editMode, focusListener, labelStack, layerCell, parent, traverseListener, validationEditErrorHandler -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new resizableRichTextCellEditorwith a default configuration.RichTextCellEditor(int style) Create a newRichTextCellEditorwith a default configuration and the given style bits.RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration) Create a new resizableRichTextCellEditorwith the given configuration.RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration, int style) Create a newRichTextCellEditorwith the given configuration and the given style bits. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.widgets.ControlactivateCell(org.eclipse.swt.widgets.Composite parent, Object originalCanonicalValue) This method will be called byAbstractCellEditor.activateCell(Composite, Object, EditModeEnum, ICellEditHandler, ILayerCell, IConfigRegistry)after initializing the activation values and before adding the default listeners.org.eclipse.nebula.widgets.richtext.RichTextEditorcreateEditorControl(org.eclipse.swt.widgets.Composite parent) Creates the editor control that is wrapped by this ICellEditor.protected org.eclipse.nebula.widgets.richtext.RichTextEditorcreateRichTextEditor(org.eclipse.swt.widgets.Composite parent) org.eclipse.nebula.widgets.richtext.RichTextEditorReturns the current value in this editor prior to conversion.protected org.eclipse.swt.graphics.PointvoidsetEditorValue(Object value) Sets the given value to editor control.Methods inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor
activateAtAnyPosition, activateCell, activateOnTraversal, addEditorControlListeners, calculateControlBounds, close, commit, commit, commit, getCanonicalValue, getCanonicalValue, getColumnIndex, getColumnPosition, getRowIndex, getRowPosition, handleConversion, isClosed, openAdjacentEditor, openInline, openMultiEditDialog, removeEditorControlListeners, setCanonicalValue, setDataValidator, supportMultiEdit, validateCanonicalValue, validateCanonicalValue
-
Field Details
-
editor
protected org.eclipse.nebula.widgets.richtext.RichTextEditor editorThe rich text editor control, initiallynull. -
editorConfiguration
protected org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfigurationTheRichTextEditorConfigurationthat should be used for creating the inline rich text editor control. Ifnullthe defaultRichTextEditorConfigurationwill be used.- Since:
- 1.1
-
style
protected int styleThe style bits that are used to create the rich text editor control.
-
-
Constructor Details
-
RichTextCellEditor
public RichTextCellEditor()Create a new resizableRichTextCellEditorwith a default configuration. -
RichTextCellEditor
public RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration) Create a new resizableRichTextCellEditorwith the given configuration.- Parameters:
editorConfiguration- TheRichTextEditorConfigurationthat should be used for creating theRichTextEditor- Since:
- 1.1
-
RichTextCellEditor
public RichTextCellEditor(int style) Create a newRichTextCellEditorwith a default configuration and the given style bits.- Parameters:
style- The style bits that should be used to create the rich text editor control.
-
RichTextCellEditor
public RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration, int style) Create a newRichTextCellEditorwith the given configuration and the given style bits.- Parameters:
editorConfiguration- TheRichTextEditorConfigurationthat should be used for creating theRichTextEditorstyle- The style bits that should be used to create the rich text editor control.- Since:
- 1.1
-
-
Method Details
-
getEditorValue
Description copied from interface:ICellEditorReturns the current value in this editor prior to conversion. For a text editor that is used to edit integer values, this would mean it returns the text value instead of the converted integer value. This method is only intended to be used internally .- Returns:
- The current value in this editor prior to conversion.
-
setEditorValue
Description copied from interface:ICellEditorSets the given value to editor control. This method is used to put the display values to the wrapped editor.- Parameters:
value- The display value to set to the wrapped editor control.
-
getEditorControl
public org.eclipse.nebula.widgets.richtext.RichTextEditor getEditorControl()- Returns:
- The editor control that is wrapped by this ICellEditor.
- Since:
- 1.1
-
activateCell
protected org.eclipse.swt.widgets.Control activateCell(org.eclipse.swt.widgets.Composite parent, Object originalCanonicalValue) Description copied from class:AbstractCellEditorThis method will be called byAbstractCellEditor.activateCell(Composite, Object, EditModeEnum, ICellEditHandler, ILayerCell, IConfigRegistry)after initializing the activation values and before adding the default listeners. In this method the underlying editor control should be created and initialized, hiding default configuration from editor implementors.- Specified by:
activateCellin classAbstractCellEditor- Parameters:
parent- The parent Composite, needed for the creation of the editor control.originalCanonicalValue- The value that should be put to the activated editor control.- Returns:
- The SWT
Controlto be used for capturing the new cell value.
-
createEditorControl
public org.eclipse.nebula.widgets.richtext.RichTextEditor createEditorControl(org.eclipse.swt.widgets.Composite parent) Description copied from interface:ICellEditorCreates the editor control that is wrapped by this ICellEditor. Will use the style configurations in ConfigRegistry for styling the control.- Parameters:
parent- The Composite that will be the parent of the new editor control. Can not benull- Returns:
- The created editor control that is wrapped by this ICellEditor.
-
createRichTextEditor
protected org.eclipse.nebula.widgets.richtext.RichTextEditor createRichTextEditor(org.eclipse.swt.widgets.Composite parent) - Parameters:
parent- the parent used to create the RichTextEditor wrapped by this RichtextCellEditor.- Returns:
- the created RichTextEditor
-
getMinimumDimension
protected org.eclipse.swt.graphics.Point getMinimumDimension()- Returns:
- The minimum dimension used for the rich text editor control.
-