com.google.gwt.user.client.ui

## Class InlineLabel

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

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

    public class InlineLabel
    extends Label

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 `LabelBase.setDirectionEstimator(boolean)` or passing a DirectionEstimator parameter to the constructor, and is off by default.

### CSS Style Rules

- .gwt-InlineLabel { }

### 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 inherited from class com.google.gwt.user.client.ui.Label

`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
`` `InlineLabel()` Creates an empty label.
`protected` `InlineLabel(Element element)` This constructor may be used by subclasses to explicitly use an existing element.
`` `InlineLabel(java.lang.String text)` Creates a label with the specified text.
`` `InlineLabel(java.lang.String text, DirectionEstimator directionEstimator)` Creates a label with the specified text and a default direction estimator.
`` `InlineLabel(java.lang.String text, HasDirection.Direction dir)` Creates a label with the specified text and direction.

### Method Summary

All Methods Static Methods Concrete Methods
`static InlineLabel` `wrap(Element element)` Creates a InlineLabel widget that wraps an existing <div> or <span> element.

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

`addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, asEditor, getDirection, getText, getTextDirection, removeClickListener, removeMouseListener, removeMouseWheelListener, setDirection, setText, setText`

### 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, unsinkEvents`

### 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`

### 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`

### Constructor Detail

#### InlineLabel

    public InlineLabel()

Creates an empty label.

#### InlineLabel

    public InlineLabel(java.lang.String text)

Creates a label with the specified text.

Parameters:
  `text` - the new label's text

#### InlineLabel

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

#### InlineLabel

    public InlineLabel(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, `Label.DEFAULT_DIRECTION_ESTIMATOR` can be used.

#### InlineLabel

    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

### Method Detail

#### wrap

    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 `RootPanel.detachNow(Widget)`.

Parameters:
  `element` - the element to be wrapped