public class RichTextArea extends com.google.gwt.user.client.ui.RichTextArea implements com.google.gwt.event.dom.client.HasDoubleClickHandlers, com.google.gwt.event.dom.client.HasLoadHandlers, com.google.gwt.event.dom.client.LoadHandler, HasPasteHandlers, HasCopyHandlers, HasActionHandlers, com.google.gwt.user.client.Window.ClosingHandler
com.google.gwt.user.client.ui.RichTextArea.BasicFormatter, com.google.gwt.user.client.ui.RichTextArea.ExtendedFormatter, com.google.gwt.user.client.ui.RichTextArea.FontSize, com.google.gwt.user.client.ui.RichTextArea.Formatter, com.google.gwt.user.client.ui.RichTextArea.Justification| Modifier and Type | Field and Description |
|---|---|
static String |
DIRTY |
static String |
INITIALIZING
Flag indicating that the load event is currently being handled.
|
static String |
LOADED
Flag indicating that the load event was fired.
|
| Constructor and Description |
|---|
RichTextArea()
Creates a new rich text area.
|
RichTextArea(CommandManager cm)
Custom constructor allowing us to inject a mock command manager.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addActionHandler(String actionName,
ActionHandler handler)
Registers the given handler for the specified action.
|
com.google.gwt.event.shared.HandlerRegistration |
addCopyHandler(CopyHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addDoubleClickHandler(com.google.gwt.event.dom.client.DoubleClickHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler) |
com.google.gwt.event.shared.HandlerRegistration |
addPasteHandler(PasteHandler handler) |
CommandManager |
getCommandManager() |
Document |
getDocument()
NOTE: If the current browser doesn't support rich text editing this method returns
null. |
protected com.google.gwt.user.client.ui.impl.RichTextAreaImpl |
getImpl()
NOTE: We need this method because
RichTextArea.impl is private. |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onDetach() |
void |
onLoad(com.google.gwt.event.dom.client.LoadEvent event) |
void |
onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event) |
void |
setHTML(String html)
http://code.google.com/p/google-web-toolkit/issues/detail?id=3147
http://code.google.com/p/google-web-toolkit/issues/detail?id=3156
|
void |
sinkEvents(int eventBitsToAdd) |
addInitializeHandler, getBasicFormatter, getExtendedFormatter, getFormatter, getHTML, getText, isEnabled, onAttach, setEnabled, setFocus, setHTML, setTextaddBlurHandler, addClickHandler, addClickListener, 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, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, unsinkEventsaddStyleDependentName, 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, toStringpublic static final String DIRTY
setHTML(String),
Constant Field Valuespublic static final String LOADED
onLoad(LoadEvent),
Constant Field Valuespublic static final String INITIALIZING
onLoad(LoadEvent),
Constant Field Valuespublic RichTextArea()
public RichTextArea(CommandManager cm)
cm - custom command managerpublic Document getDocument()
null. You should
test the returned value and fail save to an appropriate behavior!
if (rta.isAttached() && rta.getDocument() == null) {
// The current browser doesn't support rich text editing.
}
public CommandManager getCommandManager()
CommandManager associated with this instance.public void setHTML(String html)
setHTML in interface com.google.gwt.user.client.ui.HasHTMLsetHTML in class com.google.gwt.user.client.ui.RichTextAreaRichTextArea.setHTML(String)public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetpublic com.google.gwt.event.shared.HandlerRegistration addDoubleClickHandler(com.google.gwt.event.dom.client.DoubleClickHandler handler)
addDoubleClickHandler in interface com.google.gwt.event.dom.client.HasDoubleClickHandlersaddDoubleClickHandler in class com.google.gwt.user.client.ui.FocusWidgetpublic com.google.gwt.event.shared.HandlerRegistration addPasteHandler(PasteHandler handler)
addPasteHandler in interface HasPasteHandlerspublic com.google.gwt.event.shared.HandlerRegistration addCopyHandler(CopyHandler handler)
addCopyHandler in interface HasCopyHandlerspublic com.google.gwt.event.shared.HandlerRegistration addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler)
addLoadHandler in interface com.google.gwt.event.dom.client.HasLoadHandlerspublic void onLoad(com.google.gwt.event.dom.client.LoadEvent event)
onLoad in interface com.google.gwt.event.dom.client.LoadHandlerprotected com.google.gwt.user.client.ui.impl.RichTextAreaImpl getImpl()
RichTextArea.impl is private.public com.google.gwt.event.shared.HandlerRegistration addActionHandler(String actionName, ActionHandler handler)
HasActionHandlersaddActionHandler in interface HasActionHandlersactionName - the name of the action to listen tohandler - the object to be notified when the specified action occurspublic void sinkEvents(int eventBitsToAdd)
sinkEvents in class com.google.gwt.user.client.ui.Widgetprotected void onDetach()
onDetach in class com.google.gwt.user.client.ui.RichTextAreapublic void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
onWindowClosing in interface com.google.gwt.user.client.Window.ClosingHandlerCopyright © 2004–2016 XWiki. All rights reserved.