org.kuali.student.common.ui.client.widgets
Class KSRichEditor

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.kuali.student.common.ui.client.widgets.RichTextEditor
                  extended by org.kuali.student.common.ui.client.widgets.KSRichEditorAbstract
                      extended by org.kuali.student.common.ui.client.widgets.KSRichEditor
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasText

public class KSRichEditor
extends KSRichEditorAbstract
implements com.google.gwt.user.client.ui.HasText

KSRichEditor is the KS default rich text editor. The editor provides a variety of text formatting options commonly found in traditional text editors. It also features a toolbar which only shows when the editor is in focus and a pop-out window which allows a user to have more space to work (and can be resized). Any changes made in the pop-out editor are reflected in the original editor when the user is finished. TODO implement i18n


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
private  KSRichEditorAbstract richEditor
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
KSRichEditor()
          Creates a new KSRichEditor.
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler)
           
 com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
           
 String getHTML()
          Get the HTML version of the text input (retains all formatting).
 com.google.gwt.user.client.ui.RichTextArea getRichTextArea()
          Gets the RichTextArea widget used for text input in this rich editor widget.
 String getText()
          Get the plain text version of the text input (retains NO formatting).
protected  void init()
           
 void setHTML(String html)
          Set the HTML of this rich text editor.
 void setStyleName(String text)
           
 void setText(String text)
          Set the text of this rich text editor (this is text with no formatting).
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, 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, 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
 

Field Detail

richEditor

private KSRichEditorAbstract richEditor
Constructor Detail

KSRichEditor

public KSRichEditor()
Creates a new KSRichEditor.

Method Detail

getRichTextArea

public com.google.gwt.user.client.ui.RichTextArea getRichTextArea()
Gets the RichTextArea widget used for text input in this rich editor widget.

Specified by:
getRichTextArea in class KSRichEditorAbstract
Returns:
the RichTextArea used in this editor

getHTML

public String getHTML()
Get the HTML version of the text input (retains all formatting).

Specified by:
getHTML in class KSRichEditorAbstract
Returns:
the HTML version of the input text (with formatting)

getText

public String getText()
Get the plain text version of the text input (retains NO formatting).

Specified by:
getText in interface com.google.gwt.user.client.ui.HasText
Specified by:
getText in class KSRichEditorAbstract
Returns:
the plain text version of the input text (no formatting)

setHTML

public void setHTML(String html)
Set the HTML of this rich text editor.

Specified by:
setHTML in class KSRichEditorAbstract
Parameters:
html - the HTML to set this editor to

setText

public void setText(String text)
Set the text of this rich text editor (this is text with no formatting).

Specified by:
setText in interface com.google.gwt.user.client.ui.HasText
Specified by:
setText in class KSRichEditorAbstract
Parameters:
the - plain text to set this editor to

setStyleName

public void setStyleName(String text)
Specified by:
setStyleName in class KSRichEditorAbstract

addBlurHandler

public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(com.google.gwt.event.dom.client.BlurHandler handler)
Specified by:
addBlurHandler in interface com.google.gwt.event.dom.client.HasBlurHandlers

addFocusHandler

public com.google.gwt.event.shared.HandlerRegistration addFocusHandler(com.google.gwt.event.dom.client.FocusHandler handler)
Specified by:
addFocusHandler in interface com.google.gwt.event.dom.client.HasFocusHandlers

init

protected void init()
Specified by:
init in class KSRichEditorAbstract


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.