org.xwiki.gwt.wysiwyg.client
Class PlainTextEditor

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.xwiki.gwt.wysiwyg.client.PlainTextEditor
All Implemented Interfaces:
com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.Window.ClosingHandler

public class PlainTextEditor
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.user.client.Window.ClosingHandler

Source editor.

Version:
$Id: 1229ab5db5d8762ebacb176ad54d97bf0630959a $

Nested Class Summary
 
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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
PlainTextEditor(Element hook)
          Creates a new plain text editor that wraps the given text area element.
 
Method Summary
 com.google.gwt.user.client.ui.TextArea getTextArea()
           
 boolean isLoading()
           
 void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
          
 void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
          
 void setFocus(boolean focused)
          Set focus on the editor.
 void setLoading(boolean loading)
          Puts the editor in loading state.
 void submit()
          Stores the value of the plain text area in the hook's value property.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
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, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlainTextEditor

public PlainTextEditor(Element hook)
Creates a new plain text editor that wraps the given text area element.

Parameters:
hook - the element replaced by the newly created plain text editor
Method Detail

getTextArea

public com.google.gwt.user.client.ui.TextArea getTextArea()
Returns:
the text area used by the editor

setFocus

public void setFocus(boolean focused)
Set focus on the editor.

Parameters:
focused - true to set the focus on the editor, false blur the editor

setLoading

public void setLoading(boolean loading)
Puts the editor in loading state. While in loading state a spinner will be displayed.

Parameters:
loading - true to enter the loading state, false to leave the loading state

isLoading

public boolean isLoading()
Returns:
true if this plain text editor is currently in loading state, false otherwise

onBlur

public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)

Specified by:
onBlur in interface com.google.gwt.event.dom.client.BlurHandler
See Also:
BlurHandler.onBlur(BlurEvent)

onWindowClosing

public void onWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)

Specified by:
onWindowClosing in interface com.google.gwt.user.client.Window.ClosingHandler
See Also:
ClosingHandler#onWindowClosing(ClosingEvent)

submit

public void submit()
Stores the value of the plain text area in the hook's value property.



Copyright © 2004-2013 XWiki. All Rights Reserved.