|
|||||||||
| 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
This interface is used to access basic formatting options, when available. |
static interface |
RichTextArea.ExtendedFormatter
This interface is used to access full formatting options, when available. |
static class |
RichTextArea.FontSize
Font size enumeration. |
static class |
RichTextArea.Justification
Justification enumeration. |
| Constructor Summary | |
|---|---|
RichTextArea()
Creates a new, blank RichTextArea object with no stylesheet. |
|
| Method Summary | |
|---|---|
void |
addMouseListener(MouseListener listener)
Adds a listener interface to receive mouse events. |
RichTextArea.BasicFormatter |
getBasicFormatter()
Gets the basic rich text formatting interface. |
RichTextArea.ExtendedFormatter |
getExtendedFormatter()
Gets the full rich text formatting interface. |
java.lang.String |
getHTML()
Gets this object's contents as HTML. |
java.lang.String |
getText()
Gets this object's text. |
protected void |
onAttach()
This method is called when a widget is attached to the browser's document. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
protected void |
onDetach()
This method is called when a widget is detached from the browser's document. |
void |
removeMouseListener(MouseListener listener)
Removes a previously added listener interface. |
void |
setFocus(boolean focused)
Explicitly focus/unfocus this widget. |
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.FocusWidget |
|---|
addClickListener, addFocusListener, addKeyboardListener, getFocusImpl, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, setAccessKey, setElement, setEnabled, setTabIndex |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, isAttached, onLoad, onUnload, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RichTextArea()
RichTextArea object with no stylesheet.
| Method Detail |
|---|
public void addMouseListener(MouseListener listener)
SourcesMouseEvents
addMouseListener in interface SourcesMouseEventslistener - the listener interface to addpublic RichTextArea.BasicFormatter getBasicFormatter()
null if basic formatting is not supportedpublic RichTextArea.ExtendedFormatter getExtendedFormatter()
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 void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class FocusWidgetevent - the event receivedpublic void removeMouseListener(MouseListener listener)
SourcesMouseEvents
removeMouseListener in interface SourcesMouseEventslistener - the listener interface to removepublic void setFocus(boolean focused)
HasFocus
setFocus in interface HasFocussetFocus 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 setText(java.lang.String text)
HasText
setText in interface HasTexttext - the object's new textprotected void onAttach()
WidgetWidget.onLoad() method.
Subclasses that override this method must call
super.onAttach() to ensure that the Widget has been attached
to its underlying Element.
onAttach in class Widgetprotected void onDetach()
WidgetWidget.onUnload() method.
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 Widget
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||