com.vaadin.client.ui
Class VTextArea

java.lang.Object
  extended by TextBoxBase
      extended by com.vaadin.client.ui.VTextField
          extended by com.vaadin.client.ui.VTextArea
All Implemented Interfaces:
DragImageModifier, Field

public class VTextArea
extends VTextField
implements DragImageModifier

This class represents a multiline textfield (textarea). TODO consider replacing this with a RichTextArea based implementation. IE does not support CSS height for textareas in Strict mode :-(

Author:
Vaadin Ltd.

Field Summary
static java.lang.String CLASSNAME
           
 
Fields inherited from class com.vaadin.client.ui.VTextField
CLASSNAME_FOCUS, client, listenTextChangeEvents, paintableId, TEXTCHANGE_EVENTS, textChangeEventMode, textChangeEventTimeout, valueBeforeEdit
 
Constructor Summary
VTextArea()
           
 
Method Summary
protected  boolean browserSupportsMaxLengthAttribute()
           
protected  void enforceMaxLength()
           
 int getCursorPos()
           
 TextAreaElement getTextAreaElement()
           
 void modifyDragImage(Element element)
          This method is called for cloned element which corresponds to the widget element.
 void onBrowserEvent(Event event)
           
 void onKeyDown(KeyDownEvent event)
           
protected  void setMaxLengthToElement(int newMaxLength)
           
 void setRows(int rows)
           
 void setSelectionRange(int pos, int length)
           
 void setWordwrap(boolean wordwrap)
           
protected  void updateMaxLength(int maxLength)
          This method is responsible for updating the DOM or otherwise ensuring that the given max length is enforced.
 
Methods inherited from class com.vaadin.client.ui.VTextField
attachCutEventListener, detachCutEventListener, flushChangesFromFocusedTextField, getMaxLength, isWordwrap, onAttach, onBlur, onChange, onCut, onDetach, onFocus, setColumns, setImmediate, setInputPrompt, setMaxLength, setReadOnly, updateCursorPosition, updateFieldContent, valueChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

VTextArea

public VTextArea()
Method Detail

getTextAreaElement

public TextAreaElement getTextAreaElement()

setRows

public void setRows(int rows)

setSelectionRange

public void setSelectionRange(int pos,
                              int length)

enforceMaxLength

protected void enforceMaxLength()

browserSupportsMaxLengthAttribute

protected boolean browserSupportsMaxLengthAttribute()

updateMaxLength

protected void updateMaxLength(int maxLength)
Description copied from class: VTextField
This method is responsible for updating the DOM or otherwise ensuring that the given max length is enforced. Called when the max length for the field has changed.

Overrides:
updateMaxLength in class VTextField
Parameters:
maxLength - The new max length

onBrowserEvent

public void onBrowserEvent(Event event)
Overrides:
onBrowserEvent in class VTextField

getCursorPos

public int getCursorPos()

setMaxLengthToElement

protected void setMaxLengthToElement(int newMaxLength)
Overrides:
setMaxLengthToElement in class VTextField

setWordwrap

public void setWordwrap(boolean wordwrap)

onKeyDown

public void onKeyDown(KeyDownEvent event)
Overrides:
onKeyDown in class VTextField

modifyDragImage

public void modifyDragImage(Element element)
Description copied from interface: DragImageModifier
This method is called for cloned element which corresponds to the widget element. One could modify/correct this element for drag image.

Specified by:
modifyDragImage in interface DragImageModifier
Parameters:
element - cloned element of drag image


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.