public class LabelWidget extends AbstractWidget implements com.google.gwt.user.client.ui.HasText
Label
should be but is not: A Widget
for the
HTML element <label>. To prevent name collisions we had to find a new name for this. HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
Constructor and Description |
---|
LabelWidget()
The constructor.
|
LabelWidget(String text)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected com.google.gwt.dom.client.LabelElement |
getLabelElement() |
String |
getText() |
void |
setLabelledWidget(com.google.gwt.user.client.ui.Widget labelledWidget)
This method sets the
Widget labelled by this LabelWidget . |
void |
setText(String text) |
getId, setId
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
protected com.google.gwt.dom.client.LabelElement getLabelElement()
LabelElement
.public void setLabelledWidget(com.google.gwt.user.client.ui.Widget labelledWidget)
Widget
labelled by this LabelWidget
. You should always associate the
input widget with a LabelWidget
via this method for advanced usability and
Accessibility
. LabelWidget
and the given
labelledWidget
via String
attributes pointing to each others IDs. If an ID is
changed afterwards this connection will break. If you are using this classes directly and not via
UiWidgets
you have to take care of this and re-invoke this method in case an ID changes.labelledWidget
- is the Widget
labelled by this LabelWidget
.LabelElement.setHtmlFor(String)
public String getText()
getText
in interface com.google.gwt.user.client.ui.HasText
public void setText(String text)
setText
in interface com.google.gwt.user.client.ui.HasText
Copyright © 2001–2016 mmm-Team. All rights reserved.