T - the value typepublic class LabelBase<T> extends Widget implements HasWordWrap, HasDirectionEstimator, HasAutoHorizontalAlignment
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledHasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant| Modifier and Type | Field and Description | 
|---|---|
| (package private) DirectionalTextHelper | directionalTextHelperThe widget's DirectionalTextHelper object. | 
eventsToSinkDEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERRORALIGN_CONTENT_END, ALIGN_CONTENT_STARTALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT| Modifier | Constructor and Description | 
|---|---|
| protected  | LabelBase(boolean inline) | 
| protected  | LabelBase(Element element) | 
| Modifier and Type | Method and Description | 
|---|---|
| HasHorizontalAlignment.AutoHorizontalAlignmentConstant | getAutoHorizontalAlignment()Gets the horizontal auto-alignment setting. | 
| DirectionEstimator | getDirectionEstimator()Returns the  DirectionEstimatorobject. | 
| HasHorizontalAlignment.HorizontalAlignmentConstant | getHorizontalAlignment()Gets the horizontal alignment. | 
| boolean | getWordWrap()Gets whether word-wrapping is enabled. | 
| void | setAutoHorizontalAlignment(HasHorizontalAlignment.AutoHorizontalAlignmentConstant autoAlignment)Sets the horizontal alignment, allowing in addition to the "static"
  HasHorizontalAlignment.HorizontalAlignmentConstantvalues, the
 "automatic"HasHorizontalAlignment.AutoHorizontalAlignmentConstantvalues that depend on the content direction. | 
| void | setDirectionEstimator(boolean enabled)Toggles on / off direction estimation. | 
| void | setDirectionEstimator(DirectionEstimator directionEstimator)Sets the  DirectionEstimatorobject. | 
| void | setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)Sets the horizontal alignment. | 
| void | setWordWrap(boolean wrap)Sets whether word-wrapping is enabled. | 
| protected void | updateHorizontalAlignment()Sets the horizontal alignment of the widget according to the current
 AutoHorizontalAlignment setting. | 
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, unsinkEventsaddStyleDependentName, 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, toStringfinal DirectionalTextHelper directionalTextHelper
protected LabelBase(boolean inline)
protected LabelBase(Element element)
public HasHorizontalAlignment.AutoHorizontalAlignmentConstant getAutoHorizontalAlignment()
HasAutoHorizontalAlignmentHasAutoHorizontalAlignment.ALIGN_CONTENT_START), or one of the
 "static" HasHorizontalAlignment.HorizontalAlignmentConstant
 alignment values (e.g. HasHorizontalAlignment.ALIGN_LOCALE_START).
 It may be set by either setAutoHorizontalAlignment or HasHorizontalAlignment#setHorizontalAlignment. The default is null,
 indicating that no specific horizontal alignment has been set, allowing it
 to be determined by the usual HTML and CSS mechanisms.getAutoHorizontalAlignment in interface HasAutoHorizontalAlignmentpublic DirectionEstimator getDirectionEstimator()
HasDirectionEstimatorDirectionEstimator object.getDirectionEstimator in interface HasDirectionEstimatorpublic HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
HasHorizontalAlignmentgetHorizontalAlignment in interface HasHorizontalAlignmentHasHorizontalAlignment.ALIGN_LEFT,
         HasHorizontalAlignment.ALIGN_CENTER,
         HasHorizontalAlignment.ALIGN_RIGHT,
         HasHorizontalAlignment.ALIGN_JUSTIFY, or
         null).public boolean getWordWrap()
HasWordWrapgetWordWrap in interface HasWordWraptrue if word-wrapping is enabled.public void setAutoHorizontalAlignment(HasHorizontalAlignment.AutoHorizontalAlignmentConstant autoAlignment)
HasAutoHorizontalAlignmentHasHorizontalAlignment.HorizontalAlignmentConstant values, the
 "automatic" HasHorizontalAlignment.AutoHorizontalAlignmentConstant
 values that depend on the content direction. Determines the values returned
 by both HasAutoHorizontalAlignment.getAutoHorizontalAlignment() and
 HasHorizontalAlignment.getHorizontalAlignment().
  For the ALIGN_CONTENT_START and ALIGN_CONTENT_END
 values, sets the horizontal alignment (including the value of HasHorizontalAlignment#getHorizontalAlignment()) to the start or end edge
 of the current content's direction, respectively, and continues to
 automatically update it whenever the content direction changes.
 
 For other values, operates like HasHorizontalAlignment.setHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant).
 
 For null, the horizontal alignment is cleared, allowing it to
 be determined by the standard HTML mechanisms such as inheritance and CSS
 rules.
setAutoHorizontalAlignment in interface HasAutoHorizontalAlignmentautoAlignment - the new automatic horizontal alignment
        policyHasHorizontalAlignmentpublic void setDirectionEstimator(boolean enabled)
 See note at setDirectionEstimator(DirectionEstimator).
setDirectionEstimator in interface HasDirectionEstimatorenabled - Whether to enable direction estimation. If true,
          sets the DirectionEstimator object to a default
          DirectionEstimator.public void setDirectionEstimator(DirectionEstimator directionEstimator)
DirectionEstimator object.
 Note: DirectionEstimator should be set before the widget has any content; it's highly recommended to set it using a constructor. Reason: if the widget already has non-empty content, this will update its direction according to the new estimator's result. This may cause flicker, and thus should be avoided.
setDirectionEstimator in interface HasDirectionEstimatordirectionEstimator - The DirectionEstimator to be set. null means turning off direction estimation.public void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
 Use null to clear horizontal alignment, allowing it to be
 determined by the standard HTML mechanisms such as inheritance and CSS
 rules.
 
 
 Note: A subsequent call to setAutoHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.AutoHorizontalAlignmentConstant) may override
 the horizontal alignment set by this method.
 
 Note: For null, the horizontal alignment is cleared, allowing it to
 be determined by the standard HTML mechanisms such as inheritance and CSS
 rules.
setHorizontalAlignment in interface HasHorizontalAlignmentalign - the horizontal alignment (
         HasHorizontalAlignment.ALIGN_LEFT,
         HasHorizontalAlignment.ALIGN_CENTER,
         HasHorizontalAlignment.ALIGN_RIGHT,
         HasHorizontalAlignment.ALIGN_JUSTIFY,
         HasHorizontalAlignment.ALIGN_LOCALE_START, or
         HasHorizontalAlignment.ALIGN_LOCALE_END).setAutoHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.AutoHorizontalAlignmentConstant)public void setWordWrap(boolean wrap)
HasWordWrapsetWordWrap in interface HasWordWrapwrap - true to enable word-wrapping.protected void updateHorizontalAlignment()