public class

TextBoxBase

extends ValueBoxBase<T>
implements SourcesChangeEvents
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.ValueBoxBase<T>
           ↳ com.google.gwt.user.client.ui.TextBoxBase
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract base class for most text entry widgets.

The names of the static members of TextBoxBase, as well as simple alignment names (left, center, right, justify), can be used as values for a textAlignment attribute.

For example,

 <g:TextBox textAlignment='ALIGN_RIGHT'/>
 <g:TextBox textAlignment='right'/>
 

Summary

Nested Classes
class TextBoxBase.TextAlignConstant This class is deprecated. use setAlignment(ValueBoxBase.TextAlignment)  
[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Fields
public static final TextBoxBase.TextAlignConstant ALIGN_CENTER Center the text.
public static final TextBoxBase.TextAlignConstant ALIGN_JUSTIFY Justify the text.
public static final TextBoxBase.TextAlignConstant ALIGN_LEFT Align the text to the left edge.
public static final TextBoxBase.TextAlignConstant ALIGN_RIGHT Align the text to the right.
Protected Constructors
TextBoxBase(Element elem)
Creates a text box that wraps the given browser element handle.
Public Methods
void addChangeListener(ChangeListener listener)
This method is deprecated. Use addChangeHandler(ChangeHandler) instead
String getValue()
Overridden to return "" from an empty text box.
void setTextAlignment(TextBoxBase.TextAlignConstant align)
This method is deprecated. use setAlignment(TextAlignment)
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.ValueBoxBase
From class com.google.gwt.user.client.ui.FocusWidget
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.editor.client.IsEditor
From interface com.google.gwt.event.dom.client.HasBlurHandlers
From interface com.google.gwt.event.dom.client.HasChangeHandlers
From interface com.google.gwt.event.dom.client.HasClickHandlers
From interface com.google.gwt.event.dom.client.HasDoubleClickHandlers
From interface com.google.gwt.event.dom.client.HasFocusHandlers
From interface com.google.gwt.event.dom.client.HasGestureChangeHandlers
From interface com.google.gwt.event.dom.client.HasGestureEndHandlers
From interface com.google.gwt.event.dom.client.HasGestureStartHandlers
From interface com.google.gwt.event.dom.client.HasKeyDownHandlers
From interface com.google.gwt.event.dom.client.HasKeyPressHandlers
From interface com.google.gwt.event.dom.client.HasKeyUpHandlers
From interface com.google.gwt.event.dom.client.HasMouseDownHandlers
From interface com.google.gwt.event.dom.client.HasMouseMoveHandlers
From interface com.google.gwt.event.dom.client.HasMouseOutHandlers
From interface com.google.gwt.event.dom.client.HasMouseOverHandlers
From interface com.google.gwt.event.dom.client.HasMouseUpHandlers
From interface com.google.gwt.event.dom.client.HasMouseWheelHandlers
From interface com.google.gwt.event.dom.client.HasTouchCancelHandlers
From interface com.google.gwt.event.dom.client.HasTouchEndHandlers
From interface com.google.gwt.event.dom.client.HasTouchMoveHandlers
From interface com.google.gwt.event.dom.client.HasTouchStartHandlers
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.logical.shared.HasValueChangeHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.i18n.client.HasDirection
From interface com.google.gwt.i18n.shared.HasDirectionEstimator
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.TakesValue
From interface com.google.gwt.user.client.ui.Focusable
From interface com.google.gwt.user.client.ui.HasEnabled
From interface com.google.gwt.user.client.ui.HasName
From interface com.google.gwt.user.client.ui.HasText
From interface com.google.gwt.user.client.ui.HasValue
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.SourcesChangeEvents
From interface com.google.gwt.user.client.ui.SourcesClickEvents
From interface com.google.gwt.user.client.ui.SourcesFocusEvents
From interface com.google.gwt.user.client.ui.SourcesKeyboardEvents
From interface com.google.gwt.user.client.ui.SourcesMouseEvents

Fields

public static final TextBoxBase.TextAlignConstant ALIGN_CENTER

Center the text.

public static final TextBoxBase.TextAlignConstant ALIGN_JUSTIFY

Justify the text.

public static final TextBoxBase.TextAlignConstant ALIGN_LEFT

Align the text to the left edge.

public static final TextBoxBase.TextAlignConstant ALIGN_RIGHT

Align the text to the right.

Protected Constructors

protected TextBoxBase (Element elem)

Creates a text box that wraps the given browser element handle. This is only used by subclasses.

Parameters
elem the browser element to wrap

Public Methods

public void addChangeListener (ChangeListener listener)

This method is deprecated.
Use addChangeHandler(ChangeHandler) instead

Adds a listener interface to receive change events.

Parameters
listener the listener interface to add

public String getValue ()

Overridden to return "" from an empty text box.

Returns
  • the object's value

public void setTextAlignment (TextBoxBase.TextAlignConstant align)

This method is deprecated.
use setAlignment(TextAlignment)

Legacy wrapper for setAlignment(TextAlignment).