com.github.gwtbootstrap.client.ui
Class ListBox

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.FocusWidget
              extended by com.google.gwt.user.client.ui.ListBox
                  extended by com.github.gwtbootstrap.client.ui.ListBox
All Implemented Interfaces:
HasAlternateSize, HasId, HasSize, HasStyle, IsResponsive, IsSearchQuery, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasHandlers, HasDirectionEstimator, EventListener, Focusable, HasEnabled, HasFocus, HasName, HasVisibility, IsWidget, SourcesChangeEvents, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents

public class ListBox
extends ListBox
implements HasSize, HasAlternateSize, IsSearchQuery, HasId, IsResponsive, HasStyle

A ListBox for Bootstrap form.

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.ListBox
DEFAULT_DIRECTION_ESTIMATOR
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  ListBox()
          Creates an empty list box in single selection mode.
  ListBox(boolean isMultipleSelect)
          Creates an empty list box.
protected ListBox(Element element)
          This constructor may be used by subclasses to explicitly use an existing element.
 
Method Summary
 void addStyle(Style style)
          Adds the provided style to the widget.
 String getId()
          Get ID
 String getValue()
          Get Selected Value.
 boolean isSearchQuery()
          is the element search-query style?
 void removeStyle(Style style)
          Removes the provided style from the widget.
 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 setSearchQuery(boolean searchQuery)
          Set search-query style to the element.
 void setSelectedValue(String value)
          Selects item which has the given value.
 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.
 
Methods inherited from class com.google.gwt.user.client.ui.ListBox
addChangeHandler, addChangeListener, addItem, addItem, addItem, addItem, clear, getDirectionEstimator, getItemCount, getItemText, getName, getOptionText, getSelectedIndex, getValue, getVisibleItemCount, insertItem, insertItem, insertItem, insertItem, isItemSelected, isMultipleSelect, onEnsureDebugId, removeChangeListener, removeItem, setDirectionEstimator, setDirectionEstimator, setItemSelected, setItemText, setItemText, setMultipleSelect, setName, setOptionText, setSelectedIndex, setValue, setVisibleItemCount, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus, setTabIndex
 
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, isAttached, isOrWasAttached, onBrowserEvent, onDetach, 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, removeStyleDependentName, removeStyleName, resolvePotentialElement, 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

ListBox

public ListBox()
Creates an empty list box in single selection mode.


ListBox

public ListBox(boolean isMultipleSelect)
Creates an empty list box. The preferred way to enable multiple selections is to use this constructor rather than ListBox.setMultipleSelect(boolean).

Parameters:
isMultipleSelect - specifies if multiple selection is enabled

ListBox

protected ListBox(Element element)
This constructor may be used by subclasses to explicitly use an existing element. This element must be a <select> element.

Parameters:
element - the element to be used
Method Detail

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

getValue

public String getValue()
Get Selected Value.

If set multiple,return first selected value.

Returns:
Selected Value.(If there is nothing selected item,return null)

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.

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

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface HasEnabled
Overrides:
setEnabled in class FocusWidget

setSelectedValue

public void setSelectedValue(String value)
Selects item which has the given value. If value is not found, nothing is done.

Parameters:
value - to be selected (null-safe)

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.