com.github.gwtbootstrap.client.ui
Class ValueListBox<T>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.github.gwtbootstrap.client.ui.ValueListBox<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
HasAlternateSize, HasId, HasSize, HasStyle, IsResponsive, IsSearchQuery, IsEditor<TakesValueEditor<T>>, HasAttachHandlers, HasValueChangeHandlers<T>, HasHandlers, EventListener, TakesValue<T>, HasConstrainedValue<T>, HasEnabled, HasName, HasValue<T>, HasVisibility, IsRenderable, IsWidget

public class ValueListBox<T>
extends Composite
implements HasConstrainedValue<T>, IsEditor<TakesValueEditor<T>>, HasName, HasId, HasEnabled, HasSize, HasAlternateSize, IsSearchQuery, IsResponsive, HasStyle

The TW Bootstrap style ValueListBox

Since:
2.0.4.0
Author:
ohashi keisuke

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.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ValueListBox(Renderer<T> renderer)
           
ValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider)
           
 
Method Summary
 void addStyle(Style style)
          Adds the provided style to the widget.
 HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
           
 TakesValueEditor<T> asEditor()
          Returns a TakesValueEditor backed by the ValueListBox.
 String getId()
          Get ID
 String getName()
           
 T getValue()
           
 boolean isEnabled()
           
 boolean isSearchQuery()
          is the element search-query style?
 void removeStyle(Style style)
          Removes the provided style from the widget.
 void setAcceptableValues(Collection<T> newValues)
           
 void setAlternateSize(AlternateSize size)
          
 void setEnabled(boolean enabled)
          
 void setHideOn(Device device)
          Sets the kind of device, this widget is hidden on.
 void setId(String id)
          Set ID
 void setName(String name)
           
 void setSearchQuery(boolean searchQuery)
          Set search-query style to the element.
 void setShowOn(Device device)
          Sets the kind of device, this widget is shown on.
 void setSize(int size)
          Sets the widget's size.
 void setStyle(Style style)
          Replaces the widet's style with the provided one.
 void setValue(T value)
          Set the value and display it in the select element.
 void setValue(T value, boolean fireEvents)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
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, unsinkEvents
 
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

ValueListBox

public ValueListBox(Renderer<T> renderer)

ValueListBox

public ValueListBox(Renderer<T> renderer,
                    ProvidesKey<T> keyProvider)
Method Detail

setName

public void setName(String name)
Specified by:
setName in interface HasName

getName

public String getName()
Specified by:
getName in interface HasName

addValueChangeHandler

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
Specified by:
addValueChangeHandler in interface HasValueChangeHandlers<T>

asEditor

public TakesValueEditor<T> asEditor()
Returns a TakesValueEditor backed by the ValueListBox.

Specified by:
asEditor in interface IsEditor<TakesValueEditor<T>>

getValue

public T getValue()
Specified by:
getValue in interface TakesValue<T>
Specified by:
getValue in interface HasValue<T>

setAcceptableValues

public void setAcceptableValues(Collection<T> newValues)
Specified by:
setAcceptableValues in interface HasConstrainedValue<T>

setValue

public void setValue(T value)
Set the value and display it in the select element. Add the value to the acceptable set if it is not already there.

Specified by:
setValue in interface TakesValue<T>
Specified by:
setValue in interface HasValue<T>

setValue

public void setValue(T value,
                     boolean fireEvents)
Specified by:
setValue in interface HasValue<T>

getId

public String getId()
Get ID

Specified by:
getId in interface HasId
Returns:
ID

setId

public void setId(String id)
Set ID

Specified by:
setId in interface HasId
Parameters:
id - set id

setSearchQuery

public void setSearchQuery(boolean searchQuery)
Set search-query style to the element.

Specified by:
setSearchQuery in interface IsSearchQuery
Parameters:
searchQuery - true:add search-query css-class/false:remove search-query css-class

isSearchQuery

public boolean isSearchQuery()
is the element search-query style?

Specified by:
isSearchQuery in interface IsSearchQuery
Returns:
true:has search-query css-class/false:has no search-query cass-class.

setAlternateSize

public void setAlternateSize(AlternateSize size)

Specified by:
setAlternateSize in interface HasAlternateSize

setSize

public void setSize(int size)
Sets the widget's size.

Specified by:
setSize in interface HasSize
Parameters:
size - the size of the widget in the Bootstrap grid system

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface HasEnabled

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface HasEnabled

setShowOn

public void setShowOn(Device device)
Sets the kind of device, this widget is shown on.

The widget is not shown on any other device.

Only works if responsive design is turned on!

Specified by:
setShowOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setHideOn(Device)

setHideOn

public void setHideOn(Device device)
Sets the kind of device, this widget is hidden on.

The widget is not hidden on any other device.

Only works if responsive design is turned on!

Specified by:
setHideOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setShowOn(Device)

setStyle

public void setStyle(Style style)
Replaces the widet's style with the provided one.

Specified by:
setStyle in interface HasStyle
Parameters:
style - the style to be applied to the Widget.

addStyle

public void addStyle(Style style)
Adds the provided style to the widget.

Specified by:
addStyle in interface HasStyle
Parameters:
style - the style to be added to the Widget.

removeStyle

public void removeStyle(Style style)
Removes the provided style from the widget.

Specified by:
removeStyle in interface HasStyle
Parameters:
style - the style to be removed from the Widget.


Copyright © 2012 gwtbootstrap. All Rights Reserved.