Class RichTextCellEditor
- java.lang.Object
-
- org.eclipse.jface.viewers.CellEditor
-
- org.eclipse.nebula.widgets.richtext.RichTextCellEditor
-
public class RichTextCellEditor extends org.eclipse.jface.viewers.CellEditorA cell editor that manages HTML entry fields. It uses theRichTextEditoras editing control.It creates the
RichTextEditorinstance always using the style bitSWT.EMBEDDEDto ensure the editor is opened with a minimum size. Otherwise the editing framework will set the bounds to the size of the current cell, which makes the editor unusable.Additionally it supports the style bit
SWT.RESIZEwhich is set by default if no specialized style is set. This enables resizing support of the embedded inlineRichTextEditor. By additionally specifying theSWT.MINstyle bit, it is not possible for a user to resize the editor below the specified minimum size viaAs the
RichTextEditoruses aBrowserinternally, it is also possible to specify the browser type via style bit.
-
-
Field Summary
Fields Modifier and Type Field Description protected RichTextEditoreditorThe rich text editor control, initiallynull.protected RichTextEditorConfigurationeditorConfigurationTheRichTextEditorConfigurationthat should be used for creating the inline rich text editor control.private org.eclipse.swt.events.ModifyListenermodifyListener
-
Constructor Summary
Constructors Constructor Description RichTextCellEditor(org.eclipse.swt.widgets.Composite parent)Create a resizableRichTextCellEditorwith the defaultRichTextEditorConfiguration.RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, int style)Create a resizableRichTextCellEditorwith the defaultRichTextEditorConfigurationand the given style bits.RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, RichTextEditorConfiguration editorConfiguration, int style)Create a resizableRichTextCellEditorwith the givenRichTextEditorConfigurationand the given style bits.RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, ToolbarConfiguration toolbarConfiguration)Deprecated.Use a constructor withRichTextEditorConfigurationparameterRichTextCellEditor(org.eclipse.swt.widgets.Composite parent, ToolbarConfiguration toolbarConfiguration, int style)Deprecated.Use a constructor withRichTextEditorConfigurationparameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(org.eclipse.swt.widgets.Composite parent)protected org.eclipse.swt.widgets.ControlcreateControl(org.eclipse.swt.widgets.Composite parent)protected java.lang.ObjectdoGetValue()protected voiddoSetFocus()protected voiddoSetValue(java.lang.Object value)protected voideditOccured(org.eclipse.swt.events.ModifyEvent e)Processes a modify event that occurred in this rich text cell editor.protected voidfocusLost()protected org.eclipse.swt.graphics.PointgetMinimumDimension()private org.eclipse.swt.events.ModifyListenergetModifyListener()Return the modify listener.RichTextEditorgetRichTextEditor()Return the createdRichTextEditorcontrol.-
Methods inherited from class org.eclipse.jface.viewers.CellEditor
activate, activate, addListener, addPropertyChangeListener, deactivate, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, getControl, getDoubleClickTimeout, getErrorMessage, getLayoutData, getStyle, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, keyReleaseOccured, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
-
-
-
-
Field Detail
-
editor
protected RichTextEditor editor
The rich text editor control, initiallynull.
-
editorConfiguration
protected RichTextEditorConfiguration editorConfiguration
TheRichTextEditorConfigurationthat should be used for creating the inline rich text editor control. Ifnullthe defaultRichTextEditorConfigurationwill be used.
-
modifyListener
private org.eclipse.swt.events.ModifyListener modifyListener
-
-
Constructor Detail
-
RichTextCellEditor
public RichTextCellEditor(org.eclipse.swt.widgets.Composite parent)
Create a resizableRichTextCellEditorwith the defaultRichTextEditorConfiguration.- Parameters:
parent- The parent composite.
-
RichTextCellEditor
@Deprecated public RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, ToolbarConfiguration toolbarConfiguration)Deprecated.Use a constructor withRichTextEditorConfigurationparameterCreate a resizableRichTextCellEditorwith the givenToolbarConfiguration.- Parameters:
parent- The parent composite.toolbarConfiguration- TheToolbarConfigurationthat should be used for creating theRichTextEditor.
-
RichTextCellEditor
public RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, int style)Create a resizableRichTextCellEditorwith the defaultRichTextEditorConfigurationand the given style bits.- Parameters:
parent- The parent composite.style- The style bits to use.
-
RichTextCellEditor
@Deprecated public RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, ToolbarConfiguration toolbarConfiguration, int style)Deprecated.Use a constructor withRichTextEditorConfigurationparameterCreate a resizableRichTextCellEditorwith the givenToolbarConfigurationand the given style bits.- Parameters:
parent- The parent composite.toolbarConfiguration- TheToolbarConfigurationthat should be used for creating theRichTextEditor.style- The style bits to use.
-
RichTextCellEditor
public RichTextCellEditor(org.eclipse.swt.widgets.Composite parent, RichTextEditorConfiguration editorConfiguration, int style)Create a resizableRichTextCellEditorwith the givenRichTextEditorConfigurationand the given style bits.- Parameters:
parent- The parent composite.editorConfiguration- TheRichTextEditorConfigurationthat should be used for creating theRichTextEditor.style- The style bits to use.
-
-
Method Detail
-
create
public void create(org.eclipse.swt.widgets.Composite parent)
- Overrides:
createin classorg.eclipse.jface.viewers.CellEditor
-
createControl
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createControlin classorg.eclipse.jface.viewers.CellEditor
-
getMinimumDimension
protected org.eclipse.swt.graphics.Point getMinimumDimension()
- Returns:
- The minimum dimension used for the rich text editor control.
-
doGetValue
protected java.lang.Object doGetValue()
- Specified by:
doGetValuein classorg.eclipse.jface.viewers.CellEditor
-
doSetFocus
protected void doSetFocus()
- Specified by:
doSetFocusin classorg.eclipse.jface.viewers.CellEditor
-
doSetValue
protected void doSetValue(java.lang.Object value)
- Specified by:
doSetValuein classorg.eclipse.jface.viewers.CellEditor
-
editOccured
protected void editOccured(org.eclipse.swt.events.ModifyEvent e)
Processes a modify event that occurred in this rich text cell editor. This framework method performs validation and sets the error message accordingly, and then reports a change viafireEditorValueChanged. Subclasses should call this method at appropriate times. Subclasses may extend or reimplement.- Parameters:
e- the SWT modify event- See Also:
TextCellEditor
-
getModifyListener
private org.eclipse.swt.events.ModifyListener getModifyListener()
Return the modify listener.- See Also:
TextCellEditor
-
focusLost
protected void focusLost()
- Overrides:
focusLostin classorg.eclipse.jface.viewers.CellEditor
-
getRichTextEditor
public RichTextEditor getRichTextEditor()
Return the createdRichTextEditorcontrol.- Returns:
- The
RichTextEditorcontrol, ornullif this cell editor has no control.
-
-