org.gwtbootstrap3.extras.select.client.ui
Class Select

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.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.gwtbootstrap3.client.ui.base.ComplexWidget
                      extended by org.gwtbootstrap3.extras.select.client.ui.Select
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, Focusable, HasEnabled, HasName, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, Iterable<Widget>, org.gwtbootstrap3.client.ui.base.HasId, org.gwtbootstrap3.client.ui.base.HasInlineStyle, org.gwtbootstrap3.client.ui.base.HasPull, org.gwtbootstrap3.client.ui.base.HasResponsiveness, HasLanguage

public class Select
extends org.gwtbootstrap3.client.ui.base.ComplexWidget
implements Focusable, HasEnabled, HasLanguage, HasName

Author:
godi

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.IndexedPanel
IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Select()
           
 
Method Summary
 HandlerRegistration addChangeHandler(ChangeHandler handler)
           
 void clearHeader()
           
 void clearSelectedTextFormat()
           
 void clearStyle()
           
 void clearVisibleSize()
           
 void deselectAll()
           
 List<String> getAllSelectedValues()
           
 String getHeader()
           
 int getItemCount()
          Gets the number of items present in the list box.
 SelectLanguage getLanguage()
           
 String getMaxOption()
           
 String getName()
           
 String getSelectedTextFormat()
           
protected  SelectElement getSelectElement()
           
 boolean getShowMenuArrow()
           
 boolean getShowSubtext()
           
 boolean getShowTick()
           
 String getStyle()
           
 int getTabIndex()
          
 String getValue()
           
 String getValue(int index)
           
 String getVisibleSize()
           
 String getWidth()
           
 void hide()
           
 boolean isEnabled()
          
 boolean isItemSelected(int index)
           
 boolean isLiveSearch()
           
 boolean isMobile()
           
 boolean isMultiple()
           
protected  void onLoad()
           
 void refresh()
          WHEN CHANGING ANY SETTINGS CALL REFRESH AFTER!!
 void render()
           
 void selectAll()
           
 void setAccessKey(char c)
          
 void setEnabled(boolean enabled)
          
 void setFocus(boolean b)
          
 void setHeader(String header)
           
 void setLanguage(SelectLanguage language)
           
 void setLiveSearch(boolean liveSearch)
           
 void setMaxOption(String maxOption)
          Sets the Max Number of selectable option of the select

 void setMobile(boolean mobile)
           
 void setMultiple(boolean multiple)
           
 void setName(String name)
           
 void setSelectedTextFormat(String format)
          Supported Values:

(1) values - default, comma delimited list (2) count - If one item is selected, then the value is shown, if more than one is selected then the number of selected items is displayed, eg 2 of 6 selected (3) count greater than x - Where X is the number of items selected when the display format changes from values to count

 void setShowMenuArrow(boolean showMenuArrow)
           
 void setShowSubtext(boolean showSubtext)
           
 void setShowTick(boolean showTick)
           
 void setStyle(org.gwtbootstrap3.client.ui.constants.ButtonType style)
           
 void setTabIndex(int i)
          
 void setValue(Option opt)
           
 void setValue(String value)
           
 void setValues(Option... opts)
           
 void setValues(String... values)
           
 void setVisibleSize(String size)
          Sets the number of lines to show before scrolling

Values:

(1) auto - (default) shows them all (2) x - shows x number of entries before scrolling

 void setWidth(String width)
          Sets the width of the select

!! use 'auto' to automatically adjust the width of the select to its widest option, or just use specific values (50px, 50%, etc...)

 void show()
           
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.ComplexWidget
add, getId, getPull, insert, setColor, setHiddenOn, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPull, setVisibleOn
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, 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, sinkBitlessEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Select

public Select()
Method Detail

onLoad

protected void onLoad()
Overrides:
onLoad in class Widget

addChangeHandler

public HandlerRegistration addChangeHandler(ChangeHandler handler)

setHeader

public void setHeader(String header)

getHeader

public String getHeader()

clearHeader

public void clearHeader()

setShowSubtext

public void setShowSubtext(boolean showSubtext)

getShowSubtext

public boolean getShowSubtext()

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface HasEnabled

isEnabled

public boolean isEnabled()

Specified by:
isEnabled in interface HasEnabled

setLanguage

public void setLanguage(SelectLanguage language)
Specified by:
setLanguage in interface HasLanguage

getLanguage

public SelectLanguage getLanguage()
Specified by:
getLanguage in interface HasLanguage

setVisibleSize

public void setVisibleSize(String size)
Sets the number of lines to show before scrolling

Values:

(1) auto - (default) shows them all (2) x - shows x number of entries before scrolling

Parameters:
size - String visible size

getVisibleSize

public String getVisibleSize()

clearVisibleSize

public void clearVisibleSize()

setWidth

public void setWidth(String width)
Sets the width of the select

!! use 'auto' to automatically adjust the width of the select to its widest option, or just use specific values (50px, 50%, etc...)

Overrides:
setWidth in class UIObject

getWidth

public String getWidth()

setMaxOption

public void setMaxOption(String maxOption)
Sets the Max Number of selectable option of the select


getMaxOption

public String getMaxOption()

setShowMenuArrow

public void setShowMenuArrow(boolean showMenuArrow)

getShowMenuArrow

public boolean getShowMenuArrow()

setShowTick

public void setShowTick(boolean showTick)

getShowTick

public boolean getShowTick()

setSelectedTextFormat

public void setSelectedTextFormat(String format)
Supported Values:

(1) values - default, comma delimited list (2) count - If one item is selected, then the value is shown, if more than one is selected then the number of selected items is displayed, eg 2 of 6 selected (3) count greater than x - Where X is the number of items selected when the display format changes from values to count

Parameters:
format - selected text format

getSelectedTextFormat

public String getSelectedTextFormat()

clearSelectedTextFormat

public void clearSelectedTextFormat()

setMultiple

public void setMultiple(boolean multiple)

isMultiple

public boolean isMultiple()

setMobile

public void setMobile(boolean mobile)

isMobile

public boolean isMobile()

setLiveSearch

public void setLiveSearch(boolean liveSearch)

isLiveSearch

public boolean isLiveSearch()

setStyle

public void setStyle(org.gwtbootstrap3.client.ui.constants.ButtonType style)

clearStyle

public void clearStyle()

getStyle

public String getStyle()

setValue

public void setValue(String value)

setValues

public void setValues(String... values)

setValue

public void setValue(Option opt)

setValues

public void setValues(Option... opts)

getValue

public String getValue()
Returns:
the selected value, if multiple it will return the first selected item see isItemSelected(int) and getValue(int) for getting all the values selected or getAllSelectedValues()

getAllSelectedValues

public List<String> getAllSelectedValues()

isItemSelected

public boolean isItemSelected(int index)

getValue

public String getValue(int index)

selectAll

public void selectAll()

deselectAll

public void deselectAll()

render

public void render()

refresh

public void refresh()
WHEN CHANGING ANY SETTINGS CALL REFRESH AFTER!!


hide

public void hide()

show

public void show()

getSelectElement

protected SelectElement getSelectElement()

getTabIndex

public int getTabIndex()

Specified by:
getTabIndex in interface Focusable

setAccessKey

public void setAccessKey(char c)

Specified by:
setAccessKey in interface Focusable

setFocus

public void setFocus(boolean b)

Specified by:
setFocus in interface Focusable

setTabIndex

public void setTabIndex(int i)

Specified by:
setTabIndex in interface Focusable

setName

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

getName

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

getItemCount

public int getItemCount()
Gets the number of items present in the list box.

Returns:
the number of items


Copyright © 2015. All rights reserved.