Class RichTextEditor
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.nebula.widgets.richtext.RichTextEditor
Rich Text Editor control that wraps CKEditor, a web-based WYSIWYG/Rich-Text editor.
- Since:
- 3.1
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionRichTextEditor(Composite parent) Constructs a new instance of this class given its parent.RichTextEditor(Composite parent, int style) Constructs a new instance of this class given its parent.RichTextEditor(Composite parent, RichTextEditorConfiguration editorConfig) Constructs a new instance of this class given its parent, the givenToolbarConfigurationand a style value describing its behavior and appearance.RichTextEditor(Composite parent, RichTextEditorConfiguration editorConfig, int style) Constructs a new instance of this class given its parent, the givenToolbarConfigurationand a style value describing its behavior and appearance.RichTextEditor(Composite parent, ToolbarConfiguration toolbarConfig) Deprecated.RichTextEditor(Composite parent, ToolbarConfiguration toolbarConfig, int style) Deprecated.use constructors that take aRichTextEditorConfiguration
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Disposes of the operating system resources associated with the receiver and all its descendents.This method returns theRichTextEditorConfigurationthat is used to configure thisRichTextEditor.getText()Get the text from the editing area.booleanReturns the editable state.booleanReturnstrueif the underlying operating system supports this reparenting, otherwisefalsevoidsetEditable(boolean editable) Sets the editable state.voidSets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.voidSets the layout which is associated with the receiver to be the argument which may be null.voidSet text to the editing area.Methods inherited from class org.eclipse.swt.widgets.Compositechanged, computeSize, getAdapter, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabListMethods inherited from class org.eclipse.swt.widgets.ScrollablecomputeTrim, getClientArea, getHorizontalBar, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.ControladdControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addTouchListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, isEnabled, isFocusControl, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setData, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, updateMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, checkSubclass, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, toString
- 
Constructor Details- 
RichTextEditorConstructs a new instance of this class given its parent.- Parameters:
- parent- a composite control which will be the parent of the new instance (cannot be null)
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
 
- 
RichTextEditorConstructs a new instance of this class given its parent.- Parameters:
- parent- a composite control which will be the parent of the new instance (cannot be null)
- style- the style of control to construct
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
 
- 
RichTextEditorDeprecated.use constructors that take aRichTextEditorConfigurationConstructs a new instance of this class given its parent.- Parameters:
- parent- a composite control which will be the parent of the new instance (cannot be null)
- toolbarConfig- the- ToolbarConfigurationto use or- nullfor using the default- ToolbarConfiguration
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
 
- 
RichTextEditorDeprecated.use constructors that take aRichTextEditorConfigurationConstructs a new instance of this class given its parent, the givenToolbarConfigurationand a style value describing its behavior and appearance.- Parameters:
- parent- the parent composite where this rich text editor should be added to
- toolbarConfig- the- ToolbarConfigurationto use or- nullfor using the default- ToolbarConfiguration
- style- the style of widget to construct
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
 
- 
RichTextEditorConstructs a new instance of this class given its parent, the givenToolbarConfigurationand a style value describing its behavior and appearance.- Parameters:
- parent- a composite control which will be the parent of the new instance (cannot be null)
- editorConfig- the- RichTextEditorConfigurationto use or- nullfor using the default- RichTextEditorConfiguration
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
- Since:
- 3.2
 
- 
RichTextEditorConstructs a new instance of this class given its parent, the givenToolbarConfigurationand a style value describing its behavior and appearance.- Parameters:
- parent- a composite control which will be the parent of the new instance (cannot be null)
- editorConfig- the- RichTextEditorConfigurationto use or- nullfor using the default- RichTextEditorConfiguration
- style- the style of control to construct
- Throws:
- IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
 
- SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
 
- Since:
- 3.2
 
 
- 
- 
Method Details- 
getEditorConfigurationThis method returns theRichTextEditorConfigurationthat is used to configure thisRichTextEditor. It can be used to change some configurations at runtime.- Returns:
- The RichTextEditorConfigurationused to configure thisRichTextEditor.
- Since:
- 3.2
 
- 
setLayoutDescription copied from class:CompositeSets the layout which is associated with the receiver to be the argument which may be null.
- 
setFontDescription copied from class:ControlSets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
- 
disposepublic void dispose()Description copied from class:WidgetDisposes of the operating system resources associated with the receiver and all its descendents. After this method has been invoked, the receiver and all descendents will answertruewhen sent the messageisDisposed(). Any internal connections between the widgets in the tree will have been removed to facilitate garbage collection.NOTE: This method is not called recursively on the descendents of the receiver. This means that, widget implementers can not detect when a widget is being disposed of by re-implementing this method, but should instead listen for the Disposeevent.
- 
setTextSet text to the editing area. Can contain HTML tags for styling.- Parameters:
- text- The text to set to the editing area.
 
- 
getTextGet the text from the editing area. Contains HTML tags for formatting.- Returns:
- The text that is currently set in the editing area.
 
- 
isEditablepublic boolean isEditable()Returns the editable state.- Returns:
- whether or not the receiver is editable
 
- 
setEditablepublic void setEditable(boolean editable) Sets the editable state.- Parameters:
- editable- the new editable state
 
- 
isReparentablepublic boolean isReparentable()Description copied from class:ControlReturnstrueif the underlying operating system supports this reparenting, otherwisefalse- Overrides:
- isReparentablein class- Control
- Returns:
- trueif the widget can be reparented, otherwise- false
 
 
- 
RichTextEditorConfiguration