|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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>
T
- the value type.public class ValueLabel<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 | |
---|---|
|
ValueLabel()
|
protected |
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 | ||
---|---|---|
LeafValueEditor<T> |
asEditor()
Returns the Editor encapsulated by the view object. |
|
T |
getValue()
Returns the current value. |
|
void |
setValue(T value)
Sets the value. |
|
static
|
wrap(Element element,
Renderer<? super T> renderer)
Creates a ValueLabel widget that wraps an existing <span> element. |
|
static
|
wrap(Element element,
Renderer<? super T> renderer,
Parser<? extends T> parser)
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValueLabel()
@UiConstructor public ValueLabel(Renderer<? super T> renderer)
renderer
- protected ValueLabel(Element element, Renderer<? super T> renderer)
element
- the element to be usedMethod Detail |
---|
public static <T> ValueLabel<T> wrap(Element element, Renderer<? super T> renderer)
The ValueLabel's value will be null
, whether the element being
wrapped has content or not. Use wrap(Element, Renderer, Parser)
to
parse the initial element's content to initialize the ValueLabel's value.
This element must already be attached to the document. If the element is
removed from the document, you must call
RootPanel.detachNow(Widget)
.
element
- the element to be wrappedrenderer
- the renderer used to render values into the elementpublic static <T> ValueLabel<T> wrap(Element element, Renderer<? super T> renderer, Parser<? extends T> parser) throws java.text.ParseException
The ValueLabel's value will be initialized with the element's content,
passed through the parser
.
This element must already be attached to the document. If the element is
removed from the document, you must call
RootPanel.detachNow(Widget)
.
element
- the element to be wrappedrenderer
- the renderer used to render values into the elementparser
- the parser used to initialize the ValueLabel's value from the
element's content
java.text.ParseException
public LeafValueEditor<T> asEditor()
IsEditor
asEditor
in interface IsEditor<LeafValueEditor<T>>
Editor
of type Epublic T getValue()
TakesValue
getValue
in interface TakesValue<T>
TakesValue.setValue(V)
public void setValue(T value)
TakesValue
setValue
in interface TakesValue<T>
value
- a value object of type VTakesValue.getValue()
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |