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
public class RichTextCellEditor extends AbstractCellEditor
NatTableICellEditor
implementation that makes use of the NebulaRichTextEditor
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor
AbstractCellEditor.InlineFocusListener, AbstractCellEditor.InlineTraverseListener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.nebula.widgets.richtext.RichTextEditor
editor
The rich text editor control, initiallynull
.protected org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration
editorConfiguration
TheRichTextEditorConfiguration
that should be used for creating the inline rich text editor control.protected int
style
The 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
Constructors Constructor Description RichTextCellEditor()
Create a new resizableRichTextCellEditor
with a default configuration.RichTextCellEditor(int style)
Create a newRichTextCellEditor
with a default configuration and the given style bits.RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration)
Create a new resizableRichTextCellEditor
with the given configuration.RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration, int style)
Create a newRichTextCellEditor
with the given configuration and the given style bits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.widgets.Control
activateCell(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.RichTextEditor
createEditorControl(org.eclipse.swt.widgets.Composite parent)
Creates the editor control that is wrapped by this ICellEditor.protected org.eclipse.nebula.widgets.richtext.RichTextEditor
createRichTextEditor(org.eclipse.swt.widgets.Composite parent)
org.eclipse.nebula.widgets.richtext.RichTextEditor
getEditorControl()
Object
getEditorValue()
Returns the current value in this editor prior to conversion.protected org.eclipse.swt.graphics.Point
getMinimumDimension()
void
setEditorValue(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 Detail
-
editor
protected org.eclipse.nebula.widgets.richtext.RichTextEditor editor
The rich text editor control, initiallynull
.
-
editorConfiguration
protected org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration
TheRichTextEditorConfiguration
that should be used for creating the inline rich text editor control. Ifnull
the defaultRichTextEditorConfiguration
will be used.- Since:
- 1.1
-
style
protected int style
The style bits that are used to create the rich text editor control.
-
-
Constructor Detail
-
RichTextCellEditor
public RichTextCellEditor()
Create a new resizableRichTextCellEditor
with a default configuration.
-
RichTextCellEditor
public RichTextCellEditor(org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration editorConfiguration)
Create a new resizableRichTextCellEditor
with the given configuration.- Parameters:
editorConfiguration
- TheRichTextEditorConfiguration
that should be used for creating theRichTextEditor
- Since:
- 1.1
-
RichTextCellEditor
public RichTextCellEditor(int style)
Create a newRichTextCellEditor
with 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 newRichTextCellEditor
with the given configuration and the given style bits.- Parameters:
editorConfiguration
- TheRichTextEditorConfiguration
that should be used for creating theRichTextEditor
style
- The style bits that should be used to create the rich text editor control.- Since:
- 1.1
-
-
Method Detail
-
getEditorValue
public Object getEditorValue()
Description copied from interface:ICellEditor
Returns 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
public void setEditorValue(Object value)
Description copied from interface:ICellEditor
Sets 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:AbstractCellEditor
This 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:
activateCell
in 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
Control
to 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:ICellEditor
Creates 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.
-
-