Class RichTextArea
- All Implemented Interfaces:
HasAllDragAndDropHandlers,HasAllFocusHandlers,HasAllGestureHandlers,HasAllKeyHandlers,HasAllMouseHandlers,HasAllTouchHandlers,HasBlurHandlers,HasClickHandlers,HasDoubleClickHandlers,HasDragEndHandlers,HasDragEnterHandlers,HasDragHandlers,HasDragLeaveHandlers,HasDragOverHandlers,HasDragStartHandlers,HasDropHandlers,HasFocusHandlers,HasGestureChangeHandlers,HasGestureEndHandlers,HasGestureStartHandlers,HasKeyDownHandlers,HasKeyPressHandlers,HasKeyUpHandlers,HasMouseDownHandlers,HasMouseMoveHandlers,HasMouseOutHandlers,HasMouseOverHandlers,HasMouseUpHandlers,HasMouseWheelHandlers,HasTouchCancelHandlers,HasTouchEndHandlers,HasTouchMoveHandlers,HasTouchStartHandlers,HasAttachHandlers,HasInitializeHandlers,HasHandlers,HasSafeHtml,EventListener,Focusable,HasEnabled,HasFocus,HasHTML,HasText,HasVisibility,IsWidget,SourcesClickEvents,SourcesFocusEvents,SourcesKeyboardEvents,SourcesMouseEvents
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.
CSS Style Rules
- .gwt-RichTextArea
- Applied to the rich text element.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.static interfaceDeprecated.useRichTextArea.Formatterinsteadstatic classFont size enumeration.static interfaceThis interface is used to access full formatting options, when available.static classJustification 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
eventsToSinkFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInitializeHandler(InitializeHandler handler) Adds anInitializeEventhandler.Deprecated.usegetFormatter()insteadDeprecated.usegetFormatter()insteadGets the rich text formatting interface.getHTML()Gets this object's contents as HTML.getText()Gets this object's text.booleanGets whether this widget is enabled.protected voidonAttach()This method is called when a widget is attached to the browser's document.protected voidonDetach()This method is called when a widget is detached from the browser's document.voidsetEnabled(boolean enabled) Sets whether this widget is enabled.voidsetFocus(boolean focused) Explicitly focus/unfocus this widget.voidSets this object's contents via known-safe HTML.voidSets this object's contents via HTML.voidSets this object's text.Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setTabIndexMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
RichTextArea
public RichTextArea()Creates a new, blankRichTextAreaobject with no stylesheet.
-
-
Method Details
-
getBasicFormatter
Deprecated.usegetFormatter()insteadGets the basic rich text formatting interface. Note that formatting can only be done when theRichTextAreais attached, visible on the page, and has been focused by the user.- Returns:
nullif basic formatting is not supported
-
getExtendedFormatter
Deprecated.usegetFormatter()insteadGets the full rich text formatting interface. Note that formatting can only be done when theRichTextAreais attached, visible on the page, and has been focused by the user.- Returns:
nullif full formatting is not supported
-
getFormatter
Gets the rich text formatting interface. Note that formatting can only be done when theRichTextAreais attached, visible on the page, and has been focused by the user.- Returns:
nullif full formatting is not supported
-
getHTML
Description copied from interface:HasHTMLGets this object's contents as HTML. -
getText
Description copied from interface:HasTextGets this object's text. -
isEnabled
public boolean isEnabled()Description copied from class:FocusWidgetGets whether this widget is enabled.- Specified by:
isEnabledin interfaceHasEnabled- Overrides:
isEnabledin classFocusWidget- Returns:
trueif the widget is enabled
-
setEnabled
public void setEnabled(boolean enabled) Description copied from class:FocusWidgetSets whether this widget is enabled.- Specified by:
setEnabledin interfaceHasEnabled- Overrides:
setEnabledin classFocusWidget- Parameters:
enabled-trueto enable the widget,falseto disable it
-
setFocus
public void setFocus(boolean focused) Description copied from interface:FocusableExplicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events. NOTE: Most browsers fire FocusEvents asynchronously. Especially within GWT tests, you'll need to make your test asynchronous to properly do verifications. SeeGWTTestCase#delayTestFinishfor more information on how to do this.- Specified by:
setFocusin interfaceFocusable- Overrides:
setFocusin classFocusWidget- Parameters:
focused- whether this widget should take focus or release it
-
setHTML
Description copied from interface:HasHTMLSets this object's contents via HTML. Use care when setting an object's HTML; it is an easy way to expose script-based security problems. Consider usingHasText.setText(String)whenever possible. -
setText
Description copied from interface:HasTextSets this object's text. -
onAttach
protected void onAttach()Description copied from class:WidgetThis 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 useWidget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).It is strongly recommended that you override
Widget.onLoad()orWidget.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.- Overrides:
onAttachin classFocusWidget- See Also:
-
onDetach
protected void onDetach()Description copied from class:WidgetThis 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 useWidget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).It is strongly recommended that you override
Widget.onUnload()orWidget.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.
RichTextArea.Formatterinstead