|
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.Composite com.google.gwt.user.client.ui.ValueListBox<T>
T
- the value typepublic class ValueListBox<T>
Implementation of HasConstrainedValue
based on a
SelectElement
.
A Renderer
is used to get user-presentable strings to
display in the select element.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
ValueListBox()
|
|
ValueListBox(Renderer<? super T> renderer)
|
|
ValueListBox(Renderer<? super T> renderer,
ProvidesKey<T> keyProvider)
|
Method Summary | |
---|---|
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<T> handler)
Adds a ValueChangeEvent handler. |
TakesValueEditor<T> |
asEditor()
Returns a TakesValueEditor backed by the ValueListBox. |
int |
getTabIndex()
Gets the widget's position in the tab index. |
T |
getValue()
Gets this object's value. |
boolean |
isEnabled()
Returns true if the widget is enabled, false if not. |
void |
setAcceptableValues(java.util.Collection<T> newValues)
Set the acceptable values. |
void |
setAccessKey(char key)
Sets the widget's 'access key'. |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled. |
void |
setFocus(boolean focused)
Explicitly focus/unfocus this widget. |
void |
setTabIndex(int index)
Sets the widget's position in the tab index. |
void |
setValue(T value)
Set the value and display it in the select element. |
void |
setValue(T value,
boolean fireEvents)
Sets this object's value. |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget |
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, isOrWasAttached, 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, 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 |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public ValueListBox()
public ValueListBox(Renderer<? super T> renderer)
public ValueListBox(Renderer<? super T> renderer, ProvidesKey<T> keyProvider)
Method Detail |
---|
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
HasValueChangeHandlers
ValueChangeEvent
handler.
addValueChangeHandler
in interface HasValueChangeHandlers<T>
handler
- the handler
public TakesValueEditor<T> asEditor()
TakesValueEditor
backed by the ValueListBox.
asEditor
in interface IsEditor<TakesValueEditor<T>>
Editor
of type Epublic int getTabIndex()
Focusable
getTabIndex
in interface Focusable
public T getValue()
HasValue
getValue
in interface TakesValue<T>
getValue
in interface HasValue<T>
TakesValue.setValue(V)
public boolean isEnabled()
HasEnabled
isEnabled
in interface HasEnabled
public void setAcceptableValues(java.util.Collection<T> newValues)
HasConstrainedValue
setAcceptableValues
in interface HasConstrainedValue<T>
newValues
- the acceptible valuespublic void setAccessKey(char key)
Focusable
setAccessKey
in interface Focusable
key
- the widget's access keypublic void setEnabled(boolean enabled)
HasEnabled
setEnabled
in interface HasEnabled
enabled
- true
to enable the widget, false
to disable itpublic void setFocus(boolean focused)
Focusable
setFocus
in interface Focusable
focused
- whether this widget should take focus or release itpublic void setTabIndex(int index)
Focusable
-1
will cause this widget to
be removed from the tab order.
setTabIndex
in interface Focusable
index
- the widget's tab indexpublic void setValue(T value)
setValue
in interface TakesValue<T>
setValue
in interface HasValue<T>
value
- the object's new valueTakesValue.getValue()
public void setValue(T value, boolean fireEvents)
HasValue
ValueChangeEvent
when
fireEvents is true and the new value does not equal the existing value.
It is acceptable to fail assertions or throw (documented) unchecked exceptions in response to bad values.
setValue
in interface HasValue<T>
value
- the object's new valuefireEvents
- fire events if true and value is new
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |