com.google.gwt.user.client.ui
Class TextBox
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
com.google.gwt.user.client.ui.TextBoxBase
com.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
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.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
TextBox
public TextBox()
- Creates an empty text box.
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.