Class VRichTextArea

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, 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.Focusable, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Field

    public class VRichTextArea
    extends com.google.gwt.user.client.ui.Composite
    implements Field, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.user.client.ui.Focusable
    This class implements a basic client side rich text editor component.
    Author:
    Vaadin Ltd.
    • 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 
      Modifier and Type Field Description
      static String CLASSNAME
      The input node CSS classname.
      ApplicationConnection client
      For internal use only.
      VRichTextToolbar formatter
      For internal use only.
      com.google.gwt.user.client.ui.HTML html
      For internal use only.
      String id
      For internal use only.
      boolean immediate
      For internal use only.
      com.google.gwt.event.shared.HandlerRegistration keyPressHandler
      For internal use only.
      int maxLength
      For internal use only.
      com.google.gwt.user.client.ui.RichTextArea rta
      For internal use only.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      VRichTextArea()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBlurHandler​(com.google.gwt.event.dom.client.BlurHandler blurHandler)
      Adds a blur handler to the component.
      String getSanitizedValue()
      Browsers differ in what they return as the content of a visually empty rich text area.
      int getTabIndex()  
      String getValue()
      Get the value the text area
      void onKeyDown​(com.google.gwt.event.dom.client.KeyDownEvent event)  
      void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)  
      void removeBlurHandler​(com.google.gwt.event.dom.client.BlurHandler blurHandler)
      Removes a blur handler.
      void selectAll()
      For internal use only.
      void setAccessKey​(char key)  
      void setEnabled​(boolean enabled)  
      void setFocus​(boolean focused)  
      void setHeight​(String height)  
      void setReadOnly​(boolean b)  
      void setTabIndex​(int index)  
      void setValue​(String value)
      Set the value of the text area
      void setWidth​(String width)  
      • 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, unsinkEvents
      • 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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString
    • Field Detail

      • id

        public String id
        For internal use only. May be removed or replaced in the future.
      • client

        public ApplicationConnection client
        For internal use only. May be removed or replaced in the future.
      • immediate

        public boolean immediate
        For internal use only. May be removed or replaced in the future.
      • rta

        public com.google.gwt.user.client.ui.RichTextArea rta
        For internal use only. May be removed or replaced in the future.
      • formatter

        public VRichTextToolbar formatter
        For internal use only. May be removed or replaced in the future.
      • html

        public com.google.gwt.user.client.ui.HTML html
        For internal use only. May be removed or replaced in the future.
      • maxLength

        public int maxLength
        For internal use only. May be removed or replaced in the future.
      • keyPressHandler

        public com.google.gwt.event.shared.HandlerRegistration keyPressHandler
        For internal use only. May be removed or replaced in the future.
    • Constructor Detail

      • VRichTextArea

        public VRichTextArea()
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
      • selectAll

        public void selectAll()
        For internal use only. May be removed or replaced in the future.
      • setReadOnly

        public void setReadOnly​(boolean b)
      • setHeight

        public void setHeight​(String height)
        Overrides:
        setHeight in class com.google.gwt.user.client.ui.UIObject
      • setWidth

        public void setWidth​(String width)
        Overrides:
        setWidth in class com.google.gwt.user.client.ui.UIObject
      • onKeyPress

        public void onKeyPress​(com.google.gwt.event.dom.client.KeyPressEvent event)
        Specified by:
        onKeyPress in interface com.google.gwt.event.dom.client.KeyPressHandler
      • onKeyDown

        public void onKeyDown​(com.google.gwt.event.dom.client.KeyDownEvent event)
        Specified by:
        onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandler
      • getTabIndex

        public int getTabIndex()
        Specified by:
        getTabIndex in interface com.google.gwt.user.client.ui.Focusable
      • setAccessKey

        public void setAccessKey​(char key)
        Specified by:
        setAccessKey in interface com.google.gwt.user.client.ui.Focusable
      • setFocus

        public void setFocus​(boolean focused)
        Specified by:
        setFocus in interface com.google.gwt.user.client.ui.Focusable
      • setTabIndex

        public void setTabIndex​(int index)
        Specified by:
        setTabIndex in interface com.google.gwt.user.client.ui.Focusable
      • setValue

        public void setValue​(String value)
        Set the value of the text area
        Parameters:
        value - The text value. Can be html.
      • getValue

        public String getValue()
        Get the value the text area
      • getSanitizedValue

        public String getSanitizedValue()
        Browsers differ in what they return as the content of a visually empty rich text area. This method is used to normalize these to an empty string. See #8004.
        Returns:
        cleaned html string
      • addBlurHandler

        public void addBlurHandler​(com.google.gwt.event.dom.client.BlurHandler blurHandler)
        Adds a blur handler to the component.
        Parameters:
        blurHandler - the blur handler to add
      • removeBlurHandler

        public void removeBlurHandler​(com.google.gwt.event.dom.client.BlurHandler blurHandler)
        Removes a blur handler.
        Parameters:
        blurHandler - the handler to remove