com.google.gwt.user.client.ui
Class TextBox

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.FocusWidget
              extended bycom.google.gwt.user.client.ui.TextBoxBase
                  extended bycom.google.gwt.user.client.ui.TextBox
All Implemented Interfaces:
EventListener, HasFocus, HasText, SourcesChangeEvents, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents

public class TextBox
extends TextBoxBase

A standard single-line text box.

CSS Style Rules

Example

code


Nested Class Summary
 
Nested classes inherited from class com.google.gwt.user.client.ui.TextBoxBase
TextBoxBase.TextAlignConstant
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.TextBoxBase
ALIGN_CENTER, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_RIGHT
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
TextBox()
          Creates an empty text box.
 
Method Summary
 int getMaxLength()
          Gets the maximum allowable length of the text box.
 int getVisibleLength()
          Gets the number of visible characters in the text box.
 void setMaxLength(int length)
          Sets the maximum allowable length of the text box.
 void setVisibleLength(int length)
          Sets the number of visible characters in the text box.
 
Methods inherited from class com.google.gwt.user.client.ui.TextBoxBase
addChangeListener, addClickListener, addKeyboardListener, cancelKey, getCursorPos, getImpl, getSelectedText, getSelectionLength, getText, onBrowserEvent, removeChangeListener, removeClickListener, removeKeyboardListener, selectAll, setCursorPos, setKey, setSelectionRange, setText, setTextAlignment
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addFocusListener, getTabIndex, isEnabled, removeFocusListener, setAccessKey, setEnabled, setFocus, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onDetach, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 

Constructor Detail

TextBox

public TextBox()
Creates an empty text box.

Method Detail

getMaxLength

public int getMaxLength()
Gets the maximum allowable length of the text box.

Returns:
the maximum length, in characters

getVisibleLength

public int getVisibleLength()
Gets the number of visible characters in the text box.

Returns:
the number of visible characters

setMaxLength

public void setMaxLength(int length)
Sets the maximum allowable length of the text box.

Parameters:
length - the maximum length, in characters

setVisibleLength

public void setVisibleLength(int length)
Sets the number of visible characters in the text box.

Parameters:
length - the number of visible characters


This javadoc distribution was not produced by Google. The official documentation is here.