Package com.google.gwt.user.client.ui
Class ValueLabel<T>
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.ValueLabel<T>
- Type Parameters:
T
- the value type.
- All Implemented Interfaces:
IsEditor<LeafValueEditor<T>>
,HasAttachHandlers
,HasHandlers
,HasDirectionEstimator
,EventListener
,TakesValue<T>
,HasAutoHorizontalAlignment
,HasHorizontalAlignment
,HasVisibility
,HasWordWrap
,IsWidget
- Direct Known Subclasses:
DateLabel
,NumberLabel
public class ValueLabel<T>
extends LabelBase<T>
implements TakesValue<T>, IsEditor<LeafValueEditor<T>>
A label displaying its value through a renderer.
-
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.user.client.ui.HasHorizontalAlignment
HasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant
-
Field Summary
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
ModifierConstructorDescriptionprotected
ValueLabel
(Element element, Renderer<? super T> renderer) This constructor may be used by subclasses to explicitly use an existing element.ValueLabel
(Renderer<? super T> renderer) Creates an empty value label. -
Method Summary
Modifier and TypeMethodDescriptionasEditor()
Returns the Editor encapsulated by the view object.getValue()
Returns the current value.void
Sets the value.static <T> ValueLabel
<T> Creates a ValueLabel widget that wraps an existing <span> element.static <T> ValueLabel
<T> Creates a ValueLabel widget that wraps an existing <span> element.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
-
Constructor Details
-
ValueLabel
public ValueLabel()
-
-
Method Details
-
asEditor
Description copied from interface:IsEditor
Returns the Editor encapsulated by the view object. -
getValue
Description copied from interface:TakesValue
Returns the current value.- Specified by:
getValue
in interfaceTakesValue<T>
- Returns:
- the value as an object of type V
- See Also:
-
setValue
Description copied from interface:TakesValue
Sets the value.- Specified by:
setValue
in interfaceTakesValue<T>
- Parameters:
value
- a value object of type V- See Also: