com.google.gwt.user.client.ui

## Interface HasText

- All Known Subinterfaces:
    AutoDirectionHandler.Target, DialogBox.Caption, HasDirectionalHtml, HasDirectionalSafeHtml, HasDirectionalText, HasHTML
  All Known Implementing Classes:
    Anchor, Button, ButtonBase, CheckBox, CustomButton, CustomButton.Face, DialogBox, DialogBox.CaptionImpl, DoubleBox, HTML, Hyperlink, InlineHTML, InlineHyperlink, InlineLabel, IntegerBox, Label, LongBox, MenuItem, PasswordTextBox, PushButton, RadioButton, ResetButton, RichTextArea, SubmitButton, SuggestBox, TextArea, TextBox, TextBoxBase, TextButton, ToggleButton, TreeItem, ValueBox, ValueBoxBase

      public interface HasText

  An object that implements this interface contains text, which can be set and retrieved using these methods.

  ### Use in UiBinder Templates

  The body of an XML element representing a widget that implements HasText will be parsed as text and be used in a call to its `setText(String)` method. HasText elements must only contain text. (This behavior is overridden for `HasHTML` widgets.)

  For example:

       <g:Label>Hello.</g:Label>

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getText()` Gets this object's text.
    `void` | `setText(java.lang.String text)` Sets this object's text.

- - ### Method Detail

    - #### getText

          java.lang.String getText()

      Gets this object's text.
      Returns:
        the object's text

    - #### setText

          void setText(java.lang.String text)

      Sets this object's text.
      Parameters:
        `text` - the object's new text