public class RichTextEditor extends Composite
Constructor and Description |
---|
RichTextEditor(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 given
ToolbarConfiguration and 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 given
ToolbarConfiguration and a style value describing its behavior and appearance. |
RichTextEditor(Composite parent,
ToolbarConfiguration toolbarConfig)
Deprecated.
use constructors that take a
RichTextEditorConfiguration |
RichTextEditor(Composite parent,
ToolbarConfiguration toolbarConfig,
int style)
Deprecated.
use constructors that take a
RichTextEditorConfiguration |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of the operating system resources associated with
the receiver and all its descendents.
|
RichTextEditorConfiguration |
getEditorConfiguration()
This method returns the
RichTextEditorConfiguration that is used to configure this
RichTextEditor . |
java.lang.String |
getText()
Get the text from the editing area.
|
boolean |
isEditable()
Returns the editable state.
|
boolean |
isReparentable()
Returns
true if the underlying operating
system supports this reparenting, otherwise false |
void |
setEditable(boolean editable)
Sets the editable state.
|
void |
setFont(Font font)
Sets 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.
|
void |
setLayout(Layout layout)
Sets the layout which is associated with the receiver to be
the argument which may be null.
|
void |
setText(java.lang.String text)
Set text to the editing area.
|
changed, computeSize, getAdapter, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
addControlListener, 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, update
addDisposeListener, addListener, checkSubclass, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, toString
public RichTextEditor(Composite parent)
parent
- a composite control which will be the parent of the new instance (cannot be null)java.lang.IllegalArgumentException
- SWTException
- public RichTextEditor(Composite parent, int style)
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- SWTException
- @Deprecated public RichTextEditor(Composite parent, ToolbarConfiguration toolbarConfig)
RichTextEditorConfiguration
parent
- a composite control which will be the parent of the new instance (cannot be null)toolbarConfig
- the
ToolbarConfiguration
to use or
null
for using the default
ToolbarConfiguration
java.lang.IllegalArgumentException
- SWTException
- @Deprecated public RichTextEditor(Composite parent, ToolbarConfiguration toolbarConfig, int style)
RichTextEditorConfiguration
ToolbarConfiguration
and a style value describing its behavior and appearance.parent
- the parent composite where this rich text editor should be added totoolbarConfig
- the
ToolbarConfiguration
to use or
null
for using the default
ToolbarConfiguration
style
- the style of widget to constructjava.lang.IllegalArgumentException
- SWTException
- public RichTextEditor(Composite parent, RichTextEditorConfiguration editorConfig)
ToolbarConfiguration
and a style value describing its behavior and appearance.parent
- a composite control which will be the parent of the new instance (cannot be null)editorConfig
- the RichTextEditorConfiguration
to use or null
for
using the default RichTextEditorConfiguration
java.lang.IllegalArgumentException
- SWTException
- public RichTextEditor(Composite parent, RichTextEditorConfiguration editorConfig, int style)
ToolbarConfiguration
and a style value describing its behavior and appearance.parent
- a composite control which will be the parent of the new instance (cannot be null)editorConfig
- the RichTextEditorConfiguration
to use or null
for
using the default RichTextEditorConfiguration
style
- the style of control to constructjava.lang.IllegalArgumentException
- SWTException
- public RichTextEditorConfiguration getEditorConfiguration()
RichTextEditorConfiguration
that is used to configure this
RichTextEditor
. It can be used to change some configurations at runtime.RichTextEditorConfiguration
used to configure this RichTextEditor
.public void setLayout(Layout layout)
Composite
public void setFont(Font font)
Control
public void dispose()
Widget
true
when sent the message isDisposed()
.
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 Dispose
event.
public void setText(java.lang.String text)
text
- The text to set to the editing area.public java.lang.String getText()
public boolean isEditable()
public void setEditable(boolean editable)
editable
- the new editable statepublic boolean isReparentable()
Control
true
if the underlying operating
system supports this reparenting, otherwise false
isReparentable
in class Control
true
if the widget can be reparented, otherwise false
Copyright (c) EclipseSource and others 2002, 2020.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0