public class

InlineLabel

extends 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<T>
         ↳ com.google.gwt.user.client.ui.Label
           ↳ com.google.gwt.user.client.ui.InlineLabel

Class Overview

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

Built-in Bidi Text Support

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

CSS Style Rules

  • .gwt-InlineLabel { }

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
[Expand]
Inherited Fields
From class com.google.gwt.user.client.ui.Label
From interface com.google.gwt.user.client.ui.HasAutoHorizontalAlignment
From interface com.google.gwt.user.client.ui.HasHorizontalAlignment
Public Constructors
InlineLabel()
Creates an empty label.
InlineLabel(String text)
Creates a label with the specified text.
InlineLabel(String text, HasDirection.Direction dir)
Creates a label with the specified text and direction.
InlineLabel(String text, DirectionEstimator directionEstimator)
Creates a label with the specified text and a default direction estimator.
Protected Constructors
InlineLabel(Element element)
This constructor may be used by subclasses to explicitly use an existing element.
Public Methods
static InlineLabel wrap(Element element)
Creates a InlineLabel widget that wraps an existing <div> or <span> element.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.Label
From class com.google.gwt.user.client.ui.LabelBase
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.HasClickHandlers
From interface com.google.gwt.event.dom.client.HasDoubleClickHandlers
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.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.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.ui.HasAutoHorizontalAlignment
From interface com.google.gwt.user.client.ui.HasDirectionalText
From interface com.google.gwt.user.client.ui.HasHorizontalAlignment
From interface com.google.gwt.user.client.ui.HasText
From interface com.google.gwt.user.client.ui.HasWordWrap
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.SourcesClickEvents
From interface com.google.gwt.user.client.ui.SourcesMouseEvents

Public Constructors

public InlineLabel ()

Creates an empty label.

public InlineLabel (String text)

Creates a label with the specified text.

Parameters
text the new label's text

public InlineLabel (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: Direction.DEFAULT means direction should be inherited from the widget's parent element.

public InlineLabel (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.

Protected Constructors

protected InlineLabel (Element element)

This constructor may be used by subclasses to explicitly use an existing element. This element must be either a <div> <span> element.

Parameters
element the element to be used

Public Methods

public static InlineLabel wrap (Element element)

Creates a InlineLabel 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 detachNow(Widget).

Parameters
element the element to be wrapped