|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
com.google.gwt.user.client.ui.RichTextArea
public class RichTextArea
A rich text editor that allows complex styling and formatting.
Because some browsers do not support rich text editing, and others support
only a limited subset of functionality, there are two formatter interfaces,
accessed via getBasicFormatter() and getExtendedFormatter()
. A browser that does not support rich text editing at all will return
null for both of these, while one that supports only the basic
functionality will return null for the latter.
| Nested Class Summary | |
|---|---|
static interface |
RichTextArea.BasicFormatter
Deprecated. use RichTextArea.Formatter instead |
static interface |
RichTextArea.ExtendedFormatter
Deprecated. use RichTextArea.Formatter instead |
static class |
RichTextArea.FontSize
Font size enumeration. |
static interface |
RichTextArea.Formatter
This interface is used to access full formatting options, when available. |
static class |
RichTextArea.Justification
Justification enumeration. |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.Widget |
|---|
eventsToSink |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR |
| Constructor Summary | |
|---|---|
RichTextArea()
Creates a new, blank RichTextArea object with no stylesheet. |
|
| Method Summary | |
|---|---|
HandlerRegistration |
addInitializeHandler(InitializeHandler handler)
Adds an InitializeEvent handler. |
RichTextArea.BasicFormatter |
getBasicFormatter()
Deprecated. use getFormatter() instead |
RichTextArea.ExtendedFormatter |
getExtendedFormatter()
Deprecated. use getFormatter() instead |
RichTextArea.Formatter |
getFormatter()
Gets the rich text formatting interface. |
java.lang.String |
getHTML()
Gets this object's contents as HTML. |
java.lang.String |
getText()
Gets this object's text. |
boolean |
isEnabled()
Gets whether this widget is enabled. |
protected void |
onAttach()
This method is called when a widget is attached to the browser's document. |
protected void |
onDetach()
This method is called when a widget is detached from the browser's document. |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled. |
void |
setFocus(boolean focused)
Explicitly focus/unfocus this widget. |
void |
setHTML(SafeHtml html)
Sets this object's contents via known-safe HTML. |
void |
setHTML(java.lang.String html)
Sets this object's contents via HTML. |
void |
setText(java.lang.String text)
Sets this object's text. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public RichTextArea()
RichTextArea object with no stylesheet.
| Method Detail |
|---|
public HandlerRegistration addInitializeHandler(InitializeHandler handler)
HasInitializeHandlersInitializeEvent handler.
addInitializeHandler in interface HasInitializeHandlershandler - the handler
@Deprecated public RichTextArea.BasicFormatter getBasicFormatter()
getFormatter() instead
RichTextArea is attached, visible on the
page, and has been focused by the user.
null if basic formatting is not supported@Deprecated public RichTextArea.ExtendedFormatter getExtendedFormatter()
getFormatter() instead
RichTextArea is attached, visible on the page, and
has been focused by the user.
null if full formatting is not supportedpublic RichTextArea.Formatter getFormatter()
RichTextArea is attached, visible on the page, and
has been focused by the user.
null if full formatting is not supportedpublic java.lang.String getHTML()
HasHTML
getHTML in interface HasHTMLpublic java.lang.String getText()
HasText
getText in interface HasTextpublic boolean isEnabled()
FocusWidget
isEnabled in interface HasEnabledisEnabled in class FocusWidgettrue if the widget is enabledpublic void setEnabled(boolean enabled)
FocusWidget
setEnabled in interface HasEnabledsetEnabled in class FocusWidgetenabled - true to enable the widget, false
to disable itpublic void setFocus(boolean focused)
Focusable
setFocus in interface FocusablesetFocus in class FocusWidgetfocused - whether this widget should take focus or release itpublic void setHTML(java.lang.String html)
HasHTMLHasText.setText(String) whenever possible.
setHTML in interface HasHTMLhtml - the object's new HTMLpublic void setHTML(SafeHtml html)
HasSafeHtml
The object will behave exactly the same as when a widget's
HasHTML.setHTML(String) method is
invoked; however the SafeHtml passed to this method observes the
contract that it can be used in an HTML context without causing unsafe
script execution. Thus, unlike
HasHTML.setHTML(String), using this
method cannot result in Cross-Site Scripting security vulnerabilities.
setHTML in interface HasSafeHtmlhtml - the object's new HTML, represented as a SafeHtml objectpublic void setText(java.lang.String text)
HasText
setText in interface HasTexttext - the object's new textprotected void onAttach()
Widget
This method is called when a widget is attached to the browser's document.
To receive notification after a Widget has been added to the document,
override the Widget.onLoad() method or use Widget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).
It is strongly recommended that you override Widget.onLoad() or
Widget.doAttachChildren() instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onAttach() to ensure that the Widget has been attached
to its underlying Element.
onAttach in class FocusWidgetWidget.onLoad(),
Widget.doAttachChildren()protected void onDetach()
Widget
This method is called when a widget is detached from the browser's
document. To receive notification before a Widget is removed from the
document, override the Widget.onUnload() method or use Widget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).
It is strongly recommended that you override Widget.onUnload() or
Widget.doDetachChildren() instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onDetach() to ensure that the Widget has been detached
from the underlying Element. Failure to do so will result in application
memory leaks due to circular references between DOM Elements and JavaScript
objects.
onDetach in class WidgetWidget.onUnload(),
Widget.doDetachChildren()
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||