public class VTextField extends com.google.gwt.user.client.ui.TextBoxBase implements Field, com.google.gwt.event.dom.client.ChangeHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, com.google.gwt.event.dom.client.KeyDownHandler
com.google.gwt.user.client.ui.TextBoxBase.TextAlignConstantcom.google.gwt.user.client.ui.ValueBoxBase.TextAlignment| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME
The input node CSS classname.
|
static String |
CLASSNAME_FOCUS
This CSS classname is added to the input node on hover.
|
ApplicationConnection |
client
For internal use only.
|
boolean |
listenTextChangeEvents
For internal use only.
|
String |
paintableId
For internal use only.
|
static int |
TEXTCHANGE_EVENTS
For internal use only.
|
String |
textChangeEventMode
For internal use only.
|
int |
textChangeEventTimeout |
String |
valueBeforeEdit
For internal use only.
|
| Modifier | Constructor and Description |
|---|---|
|
VTextField() |
protected |
VTextField(com.google.gwt.dom.client.Element node) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachCutEventListener(com.google.gwt.dom.client.Element el)
For internal use only.
|
protected void |
detachCutEventListener(com.google.gwt.dom.client.Element el) |
static void |
flushChangesFromFocusedTextField() |
int |
getMaxLength() |
protected boolean |
isWordwrap() |
protected void |
onAttach() |
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent event) |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onChange(com.google.gwt.event.dom.client.ChangeEvent event) |
protected void |
onCut() |
protected void |
onDetach() |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) |
void |
setColumns(int columns) |
void |
setImmediate(boolean immediate) |
void |
setInputPrompt(String inputPrompt) |
void |
setMaxLength(int newMaxLength)
For internal use only.
|
protected void |
setMaxLengthToElement(int newMaxLength) |
void |
setReadOnly(boolean readOnly) |
protected boolean |
updateCursorPosition()
Updates the cursor position variable if it has changed since the last
update.
|
void |
updateFieldContent(String text)
For internal use only.
|
protected void |
updateMaxLength(int maxLength)
This method is responsible for updating the DOM or otherwise ensuring
that the given max length is enforced.
|
void |
valueChange(boolean blurred)
Called when the field value might have changed and/or the field was
blurred.
|
addChangeListener, getValue, setTextAlignmentaddChangeHandler, addValueChangeHandler, asEditor, cancelKey, getCursorPos, getDirection, getDirectionEstimator, getImpl, getName, getSelectedText, getSelectionLength, getText, getValueOrThrow, isReadOnly, onLoad, removeChangeListener, selectAll, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setKey, setName, setSelectionRange, setText, setValue, setValueaddBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String CLASSNAME
public static final String CLASSNAME_FOCUS
public String paintableId
public ApplicationConnection client
public String valueBeforeEdit
public static final int TEXTCHANGE_EVENTS
TODO When GWT adds ONCUT, add it there and remove workaround. See http://code.google.com/p/google-web-toolkit/issues/detail?id=4030
Also note that the cut/paste are not totally crossbrowsers compatible. E.g. in Opera mac works via context menu, but on via File->Paste/Cut. Opera might need the polling method for 100% working textchanceevents. Eager polling for a change is bit dum and heavy operation, so I guess we should first try to survive without.
public boolean listenTextChangeEvents
public String textChangeEventMode
public int textChangeEventTimeout
public VTextField()
protected VTextField(com.google.gwt.dom.client.Element node)
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.ValueBoxBase<String>public void setReadOnly(boolean readOnly)
setReadOnly in class com.google.gwt.user.client.ui.ValueBoxBase<String>public void updateFieldContent(String text)
protected void onCut()
public void attachCutEventListener(com.google.gwt.dom.client.Element el)
protected void detachCutEventListener(com.google.gwt.dom.client.Element el)
protected void onDetach()
onDetach in class com.google.gwt.user.client.ui.Widgetprotected void onAttach()
onAttach in class com.google.gwt.user.client.ui.FocusWidgetpublic void setMaxLength(int newMaxLength)
protected void updateMaxLength(int maxLength)
maxLength - The new max lengthprotected void setMaxLengthToElement(int newMaxLength)
public int getMaxLength()
public void onChange(com.google.gwt.event.dom.client.ChangeEvent event)
onChange in interface com.google.gwt.event.dom.client.ChangeHandlerpublic void valueChange(boolean blurred)
blurred - true if the field was blurredprotected boolean updateCursorPosition()
public static void flushChangesFromFocusedTextField()
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus in interface com.google.gwt.event.dom.client.FocusHandlerpublic void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur in interface com.google.gwt.event.dom.client.BlurHandlerpublic void setColumns(int columns)
public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandlerpublic void setImmediate(boolean immediate)
public void setInputPrompt(String inputPrompt)
protected boolean isWordwrap()
Copyright © 2016 Vaadin Ltd. All rights reserved.