Package com.vaadin.client.ui
Class VRichTextArea
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- com.vaadin.client.ui.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.HasEnabled,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, com.google.gwt.user.client.ui.HasEnabled
This class implements a basic client side rich text editor component.- Author:
- Vaadin Ltd.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSNAMEThe input node CSS classname.ApplicationConnectionclientFor internal use only.VRichTextToolbarformatterFor internal use only.com.google.gwt.user.client.ui.HTMLhtmlFor internal use only.StringidFor internal use only.booleanimmediateFor internal use only.com.google.gwt.event.shared.HandlerRegistrationkeyPressHandlerFor internal use only.intmaxLengthFor internal use only.com.google.gwt.user.client.ui.RichTextAreartaFor internal use only.
-
Constructor Summary
Constructors Constructor Description VRichTextArea()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBlurHandler(com.google.gwt.event.dom.client.BlurHandler blurHandler)Adds a blur handler to the component.com.google.gwt.event.shared.HandlerRegistrationaddInputHandler(com.google.gwt.user.client.Command inputHandler)StringgetSanitizedValue()Browsers differ in what they return as the content of a visually empty rich text area.intgetTabIndex()StringgetValue()Gets the value of the text area.booleanisEnabled()voidonKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)voidonKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)voidremoveBlurHandler(com.google.gwt.event.dom.client.BlurHandler blurHandler)Removes a blur handler.voidselectAll()For internal use only.voidsetAccessKey(char key)voidsetEnabled(boolean enabled)voidsetFocus(boolean focused)voidsetHeight(String height)voidsetMaxLength(int maxLength)voidsetReadOnly(boolean b)voidsetTabIndex(int index)voidsetValue(String value)Sets the value of the text area.voidsetWidth(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
-
CLASSNAME
public static final String CLASSNAME
The input node CSS classname.- See Also:
- Constant Field Values
-
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.
-
-
Method Detail
-
setMaxLength
public void setMaxLength(int maxLength)
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
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:
setHeightin classcom.google.gwt.user.client.ui.UIObject
-
setWidth
public void setWidth(String width)
- Overrides:
setWidthin classcom.google.gwt.user.client.ui.UIObject
-
onKeyPress
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
- Specified by:
onKeyPressin interfacecom.google.gwt.event.dom.client.KeyPressHandler
-
onKeyDown
public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
- Specified by:
onKeyDownin interfacecom.google.gwt.event.dom.client.KeyDownHandler
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
setAccessKey
public void setAccessKey(char key)
- Specified by:
setAccessKeyin interfacecom.google.gwt.user.client.ui.Focusable
-
setFocus
public void setFocus(boolean focused)
- Specified by:
setFocusin interfacecom.google.gwt.user.client.ui.Focusable
-
setTabIndex
public void setTabIndex(int index)
- Specified by:
setTabIndexin interfacecom.google.gwt.user.client.ui.Focusable
-
setValue
public void setValue(String value)
Sets the value of the text area.- Parameters:
value- The text value, as HTML
-
getValue
public String getValue()
Gets the value of the text area.- Returns:
- the value as HTML
-
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
-
addInputHandler
public com.google.gwt.event.shared.HandlerRegistration addInputHandler(com.google.gwt.user.client.Command inputHandler)
-
-