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 |
Known Direct Subclasses |
Known Indirect Subclasses |
A widget that contains arbitrary text, not interpreted as HTML. This widget uses a <div> element, causing it to be displayed with block layout.
setDirectionEstimator(boolean)
or
passing a DirectionEstimator parameter to the constructor, and is off by
default.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_DIRECTION_ESTIMATOR |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.google.gwt.user.client.ui.HasAutoHorizontalAlignment
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasHorizontalAlignment
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty label.
| |||||||||||
Creates a label with the specified text.
| |||||||||||
Creates a label with the specified text and direction.
| |||||||||||
Creates a label with the specified text and a default direction estimator.
| |||||||||||
Creates a label with the specified text.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor may be used by subclasses to explicitly use an existing
element.
|
Creates an empty label.
Creates a label with the specified text.
text | the new label's text |
---|
Creates a label with the specified text and direction.
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.
|
Creates a label with the specified text and a default direction estimator.
text | the new label's text |
---|---|
directionEstimator | A DirectionEstimator object used for automatic
direction adjustment. For convenience,
DEFAULT_DIRECTION_ESTIMATOR can be used.
|
Creates a label with the specified text.
text | the new label's text |
---|---|
wordWrap | false to disable word wrapping
|
This constructor may be used by subclasses to explicitly use an existing element. This element must be either a <div> or <span> element.
element | the element to be used |
---|
Adds a ClickEvent
handler.
handler | the click handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addClickHandler(ClickHandler)
instead
Adds a listener interface to receive click events.
listener | the listener interface to add |
---|
Adds a DoubleClickEvent
handler.
handler | the double click handler |
---|
HandlerRegistration
used to remove this handler
Adds a GestureChangeEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a GestureEndEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a GestureStartEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseDownEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addMouseOverHandler(MouseOverHandler)
,
addMouseMoveHandler(MouseMoveHandler)
, addMouseDownHandler(MouseDownHandler)
,
addMouseUpHandler(MouseUpHandler)
and addMouseOutHandler(MouseOutHandler)
instead
Adds a listener interface to receive mouse events.
listener | the listener interface to add |
---|
Adds a MouseMoveEvent
handler.
handler | the mouse move handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseOutEvent
handler.
handler | the mouse out handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseOverEvent
handler.
handler | the mouse over handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseUpEvent
handler.
handler | the mouse up handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseWheelEvent
handler.
handler | the mouse wheel handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchCancelEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchEndEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchMoveEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchStartEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Returns the Editor encapsulated by the view object.
Editor
of type E
This method is deprecated.
Use getTextDirection()
instead
Gets the widget element's direction.
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
Gets the direction of this object's text.
This method is deprecated.
Use the removeHandler()
method on
the object returned by addClickHandler(ClickHandler)
instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by an add*Handler method instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by addMouseWheelHandler(MouseWheelHandler)
instead
This method is deprecated.
Use setDirectionEstimator(boolean)
and / or pass explicit
direction to setText(String)
instead
Sets the widget element's direction.
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
|
---|
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)
.
text | the widget's new text |
---|
Sets the label's content to the given text, applying the given direction.
This will have the following effect on the horizontal alignment:
dir
parameter). If that is DEFAULT, the locale direction is used.
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.
|
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
detachNow(Widget)
.
element | the element to be wrapped |
---|