|
||||||||||
| 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
org.xwiki.gwt.user.client.ui.rta.RichTextArea
public class RichTextArea
Extends the rich text area provided by GWT to add support for advanced editing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.RichTextArea |
|---|
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 |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary | |
|---|---|
static java.lang.String |
DIRTY
|
static java.lang.String |
DISABLED
|
static java.lang.String |
LOADED
|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
RichTextArea()
Creates a new rich text area. |
|
RichTextArea(CommandManager cm)
Custom constructor allowing us to inject a mock command manager. |
|
| Method Summary | |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addActionHandler(java.lang.String actionName,
ActionHandler handler)
Registers the given handler for the specified action. |
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. |
boolean |
isEnabled()
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
protected void |
onLoad()
|
void |
onLoad(com.google.gwt.event.dom.client.LoadEvent event)
|
void |
setEnabled(boolean enabled)
|
void |
setHTML(java.lang.String html)
|
void |
sinkEvents(int eventBitsToAdd)
|
| Methods inherited from class com.google.gwt.user.client.ui.RichTextArea |
|---|
addInitializeHandler, getBasicFormatter, getExtendedFormatter, getFormatter, getHTML, getText, onAttach, onDetach, setFocus, setText |
| Methods inherited from class com.google.gwt.user.client.ui.FocusWidget |
|---|
addBlurHandler, addClickHandler, addClickListener, addFocusHandler, addFocusListener, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, getFocusImpl, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setElement, setTabIndex |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onUnload, removeFromParent, setLayoutData |
| 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, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
| 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 |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Field Detail |
|---|
public static final java.lang.String DIRTY
setHTML(String),
Constant Field Valuespublic static final java.lang.String LOADED
onLoad(LoadEvent),
Constant Field Valuespublic static final java.lang.String DISABLED
setEnabled(boolean),
Constant Field Values| Constructor Detail |
|---|
public RichTextArea()
public RichTextArea(CommandManager cm)
cm - custom command manager| Method Detail |
|---|
public 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(java.lang.String html)
setHTML in interface com.google.gwt.user.client.ui.HasHTMLsetHTML in class com.google.gwt.user.client.ui.RichTextAreaRichTextArea.setHTML(String),
http://code.google.com/p/google-web-toolkit/issues/detail?id=3147,
http://code.google.com/p/google-web-toolkit/issues/detail?id=3156public 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.WidgetWidget.onBrowserEvent(com.google.gwt.user.client.Event)public com.google.gwt.event.shared.HandlerRegistration addDoubleClickHandler(com.google.gwt.event.dom.client.DoubleClickHandler handler)
addDoubleClickHandler in interface com.google.gwt.event.dom.client.HasDoubleClickHandlersHasDoubleClickHandlers.addDoubleClickHandler(DoubleClickHandler)public com.google.gwt.event.shared.HandlerRegistration addPasteHandler(PasteHandler handler)
addPasteHandler in interface HasPasteHandlersHasPasteHandlers.addPasteHandler(PasteHandler)public com.google.gwt.event.shared.HandlerRegistration addLoadHandler(com.google.gwt.event.dom.client.LoadHandler handler)
addLoadHandler in interface com.google.gwt.event.dom.client.HasLoadHandlersHasLoadHandlers.addLoadHandler(LoadHandler)protected void onLoad()
onLoad in class com.google.gwt.user.client.ui.WidgetWidget.onLoad()public void onLoad(com.google.gwt.event.dom.client.LoadEvent event)
onLoad in interface com.google.gwt.event.dom.client.LoadHandlerLoadHandler.onLoad(LoadEvent),
RichTextArea.onAttach()protected com.google.gwt.user.client.ui.impl.RichTextAreaImpl getImpl()
RichTextArea.impl is private.
public boolean isEnabled()
isEnabled in class com.google.gwt.user.client.ui.FocusWidgetFocusWidget.isEnabled(),
setEnabled(boolean)public void setEnabled(boolean enabled)
NOTE: We overwrite this method to prevent the use of the disabled property which blocks rich text area
events in Internet Explorer. For instance, the load event is not fired if the disabled property is set to
true on the in-line frame element used by the rich text area. In order to be consistent with all the
browsers we chose to use a different property to mark the enabled/disabled state. This way we can disable the
rich text area while it is loading to prevent its content from being submitted and enable it when the load event
fires.
setEnabled in class com.google.gwt.user.client.ui.FocusWidgetFocusWidget.setEnabled(boolean),
isEnabled()
public com.google.gwt.event.shared.HandlerRegistration addActionHandler(java.lang.String actionName,
ActionHandler handler)
addActionHandler in interface HasActionHandlersactionName - the name of the action to listen tohandler - the object to be notified when the specified action occurs
HasActionHandlers.addActionHandler(String, ActionHandler)public void sinkEvents(int eventBitsToAdd)
sinkEvents in class com.google.gwt.user.client.ui.WidgetWidget.sinkEvents(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||