com.google.gwt.user.client.ui

## Class Label

- java.lang.Object
- - com.google.gwt.user.client.ui.UIObject
  - - com.google.gwt.user.client.ui.Widget
    - - com.google.gwt.user.client.ui.LabelBase<java.lang.String>
      - - com.google.gwt.user.client.ui.Label

- All Implemented Interfaces:
    IsEditor<LeafValueEditor<java.lang.String>>, HasAllDragAndDropHandlers, HasAllGestureHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasHandlers, HasDirection, HasDirectionEstimator, EventListener, HasAutoHorizontalAlignment, HasDirectionalText, HasHorizontalAlignment, HasText, HasVisibility, HasWordWrap, IsWidget, SourcesClickEvents, SourcesMouseEvents
  Direct Known Subclasses:
    HTML, InlineLabel

      public class Label
      extends LabelBase<java.lang.String>
      implements HasDirectionalText, HasDirection, HasClickHandlers, HasDoubleClickHandlers, SourcesClickEvents, SourcesMouseEvents, HasAllDragAndDropHandlers, HasAllGestureHandlers, HasAllMouseHandlers, HasAllTouchHandlers, IsEditor<LeafValueEditor<java.lang.String>>

  A widget that contains arbitrary text, not interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout.

  ### Built-in Bidi Text Support

  This widget is capable of automatically adjusting its direction according to its content. This feature is controlled by `LabelBase.setDirectionEstimator(boolean)` or passing a DirectionEstimator parameter to the constructor, and is off by default.

  ### CSS Style Rules

  - .gwt-Label { }

  ### Example

  >     public class HTMLExample implements EntryPoint {

  >       public void onModuleLoad() {
  >         // Create a Label and an HTML widget.
  >         Label lbl = new Label("This is just text.  It will not be interpreted "
  >           + "as <html>.");

  >         HTML html = new HTML(
  >           "This is <b>HTML</b>.  It will be interpreted as such if you specify "
  >             + "the <span style='font-family:fixed'>asHTML</span> flag.", true);

  >         // Add them to the root panel.
  >         VerticalPanel panel = new VerticalPanel();
  >         panel.add(lbl);
  >         panel.add(html);
  >         RootPanel.get().add(panel);
  >       }
  >     }

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

      `UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

    - ### Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.HasDirection

      `HasDirection.Direction`

    - ### Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment

      `HasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DirectionEstimator` | `DEFAULT_DIRECTION_ESTIMATOR`

    - ### Fields inherited from class com.google.gwt.user.client.ui.LabelBase

      `directionalTextHelper`

    - ### Fields inherited from class com.google.gwt.user.client.ui.Widget

      `eventsToSink`

    - ### Fields inherited from class com.google.gwt.user.client.ui.UIObject

      `DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR`

    - ### Fields inherited from interface com.google.gwt.user.client.ui.HasAutoHorizontalAlignment

      `ALIGN_CONTENT_END, ALIGN_CONTENT_START`

    - ### Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment

      `ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `Label()` Creates an empty label.
    `protected` | `Label(Element element)` This constructor may be used by subclasses to explicitly use an existing element.
    `` | `Label(java.lang.String text)` Creates a label with the specified text.
    `` | `Label(java.lang.String text, boolean wordWrap)` Creates a label with the specified text.
    `` | `Label(java.lang.String text, DirectionEstimator directionEstimator)` Creates a label with the specified text and a default direction estimator.
    `` | `Label(java.lang.String text, HasDirection.Direction dir)` Creates a label with the specified text and direction.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HandlerRegistration` | `addClickHandler(ClickHandler handler)` Adds a `ClickEvent` handler.
    `void` | `addClickListener(ClickListener listener)` Deprecated. Use `addClickHandler(com.google.gwt.event.dom.client.ClickHandler)` instead
    `HandlerRegistration` | `addDoubleClickHandler(DoubleClickHandler handler)` Adds a `DoubleClickEvent` handler.
    `HandlerRegistration` | `addDragEndHandler(DragEndHandler handler)` Adds a `DragEndEvent` handler.
    `HandlerRegistration` | `addDragEnterHandler(DragEnterHandler handler)` Adds a `DragEnterEvent` handler.
    `HandlerRegistration` | `addDragHandler(DragHandler handler)` Adds a `DragEvent` handler.
    `HandlerRegistration` | `addDragLeaveHandler(DragLeaveHandler handler)` Adds a `DragLeaveEvent` handler.
    `HandlerRegistration` | `addDragOverHandler(DragOverHandler handler)` Adds a `DragOverEvent` handler.
    `HandlerRegistration` | `addDragStartHandler(DragStartHandler handler)` Adds a `DragStartEvent` handler.
    `HandlerRegistration` | `addDropHandler(DropHandler handler)` Adds a `DropEvent` handler.
    `HandlerRegistration` | `addGestureChangeHandler(GestureChangeHandler handler)` Adds a `GestureChangeEvent` handler.
    `HandlerRegistration` | `addGestureEndHandler(GestureEndHandler handler)` Adds a `GestureEndEvent` handler.
    `HandlerRegistration` | `addGestureStartHandler(GestureStartHandler handler)` Adds a `GestureStartEvent` handler.
    `HandlerRegistration` | `addMouseDownHandler(MouseDownHandler handler)` Adds a `MouseDownEvent` handler.
    `void` | `addMouseListener(MouseListener listener)` Deprecated. Use `addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)`, `addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler)`, `addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler)`, `addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler)` and `addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler)` instead
    `HandlerRegistration` | `addMouseMoveHandler(MouseMoveHandler handler)` Adds a `MouseMoveEvent` handler.
    `HandlerRegistration` | `addMouseOutHandler(MouseOutHandler handler)` Adds a `MouseOutEvent` handler.
    `HandlerRegistration` | `addMouseOverHandler(MouseOverHandler handler)` Adds a `MouseOverEvent` handler.
    `HandlerRegistration` | `addMouseUpHandler(MouseUpHandler handler)` Adds a `MouseUpEvent` handler.
    `HandlerRegistration` | `addMouseWheelHandler(MouseWheelHandler handler)` Adds a `MouseWheelEvent` handler.
    `void` | `addMouseWheelListener(MouseWheelListener listener)` Deprecated. Use `addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)` instead
    `HandlerRegistration` | `addTouchCancelHandler(TouchCancelHandler handler)` Adds a `TouchCancelEvent` handler.
    `HandlerRegistration` | `addTouchEndHandler(TouchEndHandler handler)` Adds a `TouchEndEvent` handler.
    `HandlerRegistration` | `addTouchMoveHandler(TouchMoveHandler handler)` Adds a `TouchMoveEvent` handler.
    `HandlerRegistration` | `addTouchStartHandler(TouchStartHandler handler)` Adds a `TouchStartEvent` handler.
    `LeafValueEditor<java.lang.String>` | `asEditor()` Returns the Editor encapsulated by the view object.
    `HasDirection.Direction` | `getDirection()` Deprecated. Use `getTextDirection()` instead
    `java.lang.String` | `getText()` Gets this object's text.
    `HasDirection.Direction` | `getTextDirection()` Gets the direction of this object's text.
    `void` | `removeClickListener(ClickListener listener)` Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by `addClickHandler(com.google.gwt.event.dom.client.ClickHandler)` instead
    `void` | `removeMouseListener(MouseListener listener)` Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by an add*Handler method instead
    `void` | `removeMouseWheelListener(MouseWheelListener listener)` Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by `addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)` instead
    `void` | `setDirection(HasDirection.Direction direction)` Deprecated. Use `LabelBase.setDirectionEstimator(boolean)` and / or pass explicit direction to `setText(java.lang.String)` instead
    `void` | `setText(java.lang.String text)` Sets the label's content to the given text.
    `void` | `setText(java.lang.String text, HasDirection.Direction dir)` Sets the label's content to the given text, applying the given direction.
    `static Label` | `wrap(Element element)` Creates a Label widget that wraps an existing <div> or <span> element.

    - ### Methods inherited from class com.google.gwt.user.client.ui.LabelBase

      `getAutoHorizontalAlignment, getDirectionEstimator, getHorizontalAlignment, getWordWrap, setAutoHorizontalAlignment, setDirectionEstimator, setDirectionEstimator, setHorizontalAlignment, setWordWrap, updateHorizontalAlignment`

    - ### Methods inherited from class com.google.gwt.user.client.ui.Widget

      `addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents`

    - ### Methods inherited from class com.google.gwt.user.client.ui.UIObject

      `addStyleDependentName, 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, toString, unsinkEvents`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Field Detail

    - #### DEFAULT_DIRECTION_ESTIMATOR

          public static final DirectionEstimator DEFAULT_DIRECTION_ESTIMATOR

  - ### Constructor Detail

    - #### Label

          public Label()

      Creates an empty label.

    - #### Label

          public Label(java.lang.String text)

      Creates a label with the specified text.
      Parameters:
        `text` - the new label's text

    - #### Label

          public Label(java.lang.String text,
               HasDirection.Direction dir)

      Creates a label with the specified text and direction.
      Parameters:
        `text` - the new label's text
        `dir` - the text's direction. Note that `DEFAULT` means direction should be inherited from the widget's parent element.

    - #### Label

          public Label(java.lang.String text,
               DirectionEstimator directionEstimator)

      Creates a label with the specified text and a default direction estimator.
      Parameters:
        `text` - the new label's text
        `directionEstimator` - A DirectionEstimator object used for automatic direction adjustment. For convenience, `DEFAULT_DIRECTION_ESTIMATOR` can be used.

    - #### Label

          public Label(java.lang.String text,
               boolean wordWrap)

      Creates a label with the specified text.
      Parameters:
        `text` - the new label's text
        `wordWrap` - `false` to disable word wrapping

    - #### Label

          protected Label(Element element)

      This constructor may be used by subclasses to explicitly use an existing element. This element must be either a <div> or <span> element.
      Parameters:
        `element` - the element to be used

  - ### Method Detail

    - #### wrap

          public static Label wrap(Element element)

      Creates a Label widget that wraps an existing <div> or <span> element. This element must already be attached to the document. If the element is removed from the document, you must call `RootPanel.detachNow(Widget)`.
      Parameters:
        `element` - the element to be wrapped

    - #### addClickHandler

          public HandlerRegistration addClickHandler(ClickHandler handler)

      Description copied from interface: `HasClickHandlers`
      Adds a `ClickEvent` handler.
      Specified by:
        `addClickHandler` in interface `HasClickHandlers`
      Parameters:
        `handler` - the click handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addClickListener

          @Deprecated
          public void addClickListener(ClickListener listener)

      Deprecated. Use `addClickHandler(com.google.gwt.event.dom.client.ClickHandler)` instead
      Description copied from interface: `SourcesClickEvents`
      Adds a listener interface to receive click events.
      Specified by:
        `addClickListener` in interface `SourcesClickEvents`
      Parameters:
        `listener` - the listener interface to add

    - #### addDoubleClickHandler

          public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)

      Description copied from interface: `HasDoubleClickHandlers`
      Adds a `DoubleClickEvent` handler.
      Specified by:
        `addDoubleClickHandler` in interface `HasDoubleClickHandlers`
      Parameters:
        `handler` - the double click handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragEndHandler

          public HandlerRegistration addDragEndHandler(DragEndHandler handler)

      Description copied from interface: `HasDragEndHandlers`
      Adds a `DragEndEvent` handler.
      Specified by:
        `addDragEndHandler` in interface `HasDragEndHandlers`
      Parameters:
        `handler` - the drag end handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragEnterHandler

          public HandlerRegistration addDragEnterHandler(DragEnterHandler handler)

      Description copied from interface: `HasDragEnterHandlers`
      Adds a `DragEnterEvent` handler.
      Specified by:
        `addDragEnterHandler` in interface `HasDragEnterHandlers`
      Parameters:
        `handler` - the drag end handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragHandler

          public HandlerRegistration addDragHandler(DragHandler handler)

      Description copied from interface: `HasDragHandlers`
      Adds a `DragEvent` handler.
      Specified by:
        `addDragHandler` in interface `HasDragHandlers`
      Parameters:
        `handler` - the drag handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragLeaveHandler

          public HandlerRegistration addDragLeaveHandler(DragLeaveHandler handler)

      Description copied from interface: `HasDragLeaveHandlers`
      Adds a `DragLeaveEvent` handler.
      Specified by:
        `addDragLeaveHandler` in interface `HasDragLeaveHandlers`
      Parameters:
        `handler` - the drag leave handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragOverHandler

          public HandlerRegistration addDragOverHandler(DragOverHandler handler)

      Description copied from interface: `HasDragOverHandlers`
      Adds a `DragOverEvent` handler.
      Specified by:
        `addDragOverHandler` in interface `HasDragOverHandlers`
      Parameters:
        `handler` - the drag over handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDragStartHandler

          public HandlerRegistration addDragStartHandler(DragStartHandler handler)

      Description copied from interface: `HasDragStartHandlers`
      Adds a `DragStartEvent` handler.
      Specified by:
        `addDragStartHandler` in interface `HasDragStartHandlers`
      Parameters:
        `handler` - the drag start handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addDropHandler

          public HandlerRegistration addDropHandler(DropHandler handler)

      Description copied from interface: `HasDropHandlers`
      Adds a `DropEvent` handler.
      Specified by:
        `addDropHandler` in interface `HasDropHandlers`
      Parameters:
        `handler` - the drop handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addGestureChangeHandler

          public HandlerRegistration addGestureChangeHandler(GestureChangeHandler handler)

      Description copied from interface: `HasGestureChangeHandlers`
      Adds a `GestureChangeEvent` handler.
      Specified by:
        `addGestureChangeHandler` in interface `HasGestureChangeHandlers`
      Parameters:
        `handler` - the gesture change handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addGestureEndHandler

          public HandlerRegistration addGestureEndHandler(GestureEndHandler handler)

      Description copied from interface: `HasGestureEndHandlers`
      Adds a `GestureEndEvent` handler.
      Specified by:
        `addGestureEndHandler` in interface `HasGestureEndHandlers`
      Parameters:
        `handler` - the gesture end handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addGestureStartHandler

          public HandlerRegistration addGestureStartHandler(GestureStartHandler handler)

      Description copied from interface: `HasGestureStartHandlers`
      Adds a `GestureStartEvent` handler.
      Specified by:
        `addGestureStartHandler` in interface `HasGestureStartHandlers`
      Parameters:
        `handler` - the gesture start handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseDownHandler

          public HandlerRegistration addMouseDownHandler(MouseDownHandler handler)

      Description copied from interface: `HasMouseDownHandlers`
      Adds a `MouseDownEvent` handler.
      Specified by:
        `addMouseDownHandler` in interface `HasMouseDownHandlers`
      Parameters:
        `handler` - the mouse down handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseListener

          @Deprecated
          public void addMouseListener(MouseListener listener)

      Deprecated. Use `addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)`, `addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler)`, `addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler)`, `addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler)` and `addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler)` instead
      Description copied from interface: `SourcesMouseEvents`
      Adds a listener interface to receive mouse events.
      Specified by:
        `addMouseListener` in interface `SourcesMouseEvents`
      Parameters:
        `listener` - the listener interface to add

    - #### addMouseMoveHandler

          public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)

      Description copied from interface: `HasMouseMoveHandlers`
      Adds a `MouseMoveEvent` handler.
      Specified by:
        `addMouseMoveHandler` in interface `HasMouseMoveHandlers`
      Parameters:
        `handler` - the mouse move handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseOutHandler

          public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)

      Description copied from interface: `HasMouseOutHandlers`
      Adds a `MouseOutEvent` handler.
      Specified by:
        `addMouseOutHandler` in interface `HasMouseOutHandlers`
      Parameters:
        `handler` - the mouse out handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseOverHandler

          public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)

      Description copied from interface: `HasMouseOverHandlers`
      Adds a `MouseOverEvent` handler.
      Specified by:
        `addMouseOverHandler` in interface `HasMouseOverHandlers`
      Parameters:
        `handler` - the mouse over handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseUpHandler

          public HandlerRegistration addMouseUpHandler(MouseUpHandler handler)

      Description copied from interface: `HasMouseUpHandlers`
      Adds a `MouseUpEvent` handler.
      Specified by:
        `addMouseUpHandler` in interface `HasMouseUpHandlers`
      Parameters:
        `handler` - the mouse up handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseWheelHandler

          public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)

      Description copied from interface: `HasMouseWheelHandlers`
      Adds a `MouseWheelEvent` handler.
      Specified by:
        `addMouseWheelHandler` in interface `HasMouseWheelHandlers`
      Parameters:
        `handler` - the mouse wheel handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addMouseWheelListener

          @Deprecated
          public void addMouseWheelListener(MouseWheelListener listener)

      Deprecated. Use `addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)` instead

    - #### addTouchCancelHandler

          public HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler)

      Description copied from interface: `HasTouchCancelHandlers`
      Adds a `TouchCancelEvent` handler.
      Specified by:
        `addTouchCancelHandler` in interface `HasTouchCancelHandlers`
      Parameters:
        `handler` - the touch cancel handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addTouchEndHandler

          public HandlerRegistration addTouchEndHandler(TouchEndHandler handler)

      Description copied from interface: `HasTouchEndHandlers`
      Adds a `TouchEndEvent` handler.
      Specified by:
        `addTouchEndHandler` in interface `HasTouchEndHandlers`
      Parameters:
        `handler` - the touch end handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addTouchMoveHandler

          public HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler)

      Description copied from interface: `HasTouchMoveHandlers`
      Adds a `TouchMoveEvent` handler.
      Specified by:
        `addTouchMoveHandler` in interface `HasTouchMoveHandlers`
      Parameters:
        `handler` - the touch move handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### addTouchStartHandler

          public HandlerRegistration addTouchStartHandler(TouchStartHandler handler)

      Description copied from interface: `HasTouchStartHandlers`
      Adds a `TouchStartEvent` handler.
      Specified by:
        `addTouchStartHandler` in interface `HasTouchStartHandlers`
      Parameters:
        `handler` - the touch start handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### asEditor

          public LeafValueEditor<java.lang.String> asEditor()

      Description copied from interface: `IsEditor`
      Returns the Editor encapsulated by the view object.
      Specified by:
        `asEditor` in interface `IsEditor<LeafValueEditor<java.lang.String>>`
      Returns:
        an `Editor` of type E

    - #### getDirection

          @Deprecated
          public HasDirection.Direction getDirection()

      Deprecated. Use `getTextDirection()` instead
      Gets the widget element's direction.
      Specified by:
        `getDirection` in interface `HasDirection`
      Returns:
        `RTL` if the directionality is right-to-left, `LTR` if the directionality is left-to-right, or `DEFAULT` if the directionality is not explicitly specified

    - #### getText

          public java.lang.String getText()

      Description copied from interface: `HasText`
      Gets this object's text.
      Specified by:
        `getText` in interface `HasText`
      Returns:
        the object's text

    - #### getTextDirection

          public HasDirection.Direction getTextDirection()

      Description copied from interface: `HasDirectionalText`
      Gets the direction of this object's text.
      Specified by:
        `getTextDirection` in interface `HasDirectionalText`
      Returns:
        the direction of this object's text

    - #### removeClickListener

          @Deprecated
          public void removeClickListener(ClickListener listener)

      Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by `addClickHandler(com.google.gwt.event.dom.client.ClickHandler)` instead
      Description copied from interface: `SourcesClickEvents`
      Removes a previously added listener interface.
      Specified by:
        `removeClickListener` in interface `SourcesClickEvents`
      Parameters:
        `listener` - the listener interface to remove

    - #### removeMouseListener

          @Deprecated
          public void removeMouseListener(MouseListener listener)

      Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by an add*Handler method instead
      Description copied from interface: `SourcesMouseEvents`
      Removes a previously added listener interface.
      Specified by:
        `removeMouseListener` in interface `SourcesMouseEvents`
      Parameters:
        `listener` - the listener interface to remove

    - #### removeMouseWheelListener

          @Deprecated
          public void removeMouseWheelListener(MouseWheelListener listener)

      Deprecated. Use the `HandlerRegistration.removeHandler()` method on the object returned by `addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)` instead

    - #### setDirection

          @Deprecated
          public void setDirection(HasDirection.Direction direction)

      Deprecated. Use `LabelBase.setDirectionEstimator(boolean)` and / or pass explicit direction to `setText(java.lang.String)` instead
      Sets the widget element's direction.
      Specified by:
        `setDirection` in interface `HasDirection`
      Parameters:
        `direction` - `RTL` if the directionality should be set to right-to-left, `LTR` if the directionality should be set to left-to-right `DEFAULT` if the directionality should not be explicitly set

    - #### setText

          public void setText(java.lang.String text)

      Sets the label's content to the given text.

      Doesn't change the widget's direction or horizontal alignment if `directionEstimator` is null. Otherwise, the widget's direction is set using the estimator, and its alignment may therefore change as described in `setText(String, Direction)`.

      Specified by:
        `setText` in interface `HasText`
      Parameters:
        `text` - the widget's new text

    - #### setText

          public void setText(java.lang.String text,
                     HasDirection.Direction dir)

      Sets the label's content to the given text, applying the given direction.

      This will have the following effect on the horizontal alignment:

      - If the automatic alignment setting is ALIGN_CONTENT_START or ALIGN_CONTENT_END, the horizontal alignment will be set to match the start or end edge, respectively, of the new direction (the `dir` parameter). If that is DEFAULT, the locale direction is used.
      - Otherwise, the horizontal alignment value is not changed, but the effective alignment may nevertheless change according to the usual HTML rules, i.e. it will match the start edge of the new direction if the widget element is a <div> and has no explicit alignment value even by inheritance.
      Specified by:
        `setText` in interface `HasDirectionalText`
      Parameters:
        `text` - the widget's new text
        `dir` - the text's direction. Note: `Direction.DEFAULT` means direction should be inherited from the widget's parent element.