public class VListSelect extends com.google.gwt.user.client.ui.Composite implements Field, Focusable, com.google.gwt.user.client.ui.HasEnabled, AbstractMultiSelectConnector.MultiSelectWidget
| Modifier and Type | Field and Description |
|---|---|
protected com.google.gwt.user.client.ui.FlowPanel |
container
Container for select.
|
protected com.google.gwt.user.client.ui.ListBox |
select
The select component.
|
| Constructor and Description |
|---|
VListSelect()
Constructs a simple ListSelect widget in multiselect mode.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> listener)
Adds a selection change listener the select.
|
void |
focus()
Sets focus to this widget.
|
int |
getRows()
Returns the number of visible items for the list select.
|
protected FastStringSet |
getSelectedItems()
Gets the currently selected item values.
|
int |
getTabIndex()
Gets the tab index.
|
boolean |
isEnabled() |
boolean |
isReadOnly()
Returns
true if this select is in read only mode, false
if not. |
void |
setEnabled(boolean enabled) |
void |
setHeight(String height) |
void |
setItems(List<JsonObject> items)
Sets the given items to the select.
|
void |
setReadOnly(boolean readOnly)
Sets this select as read only, meaning selection cannot be changed.
|
void |
setRows(int rows)
Sets the number of visible items for the list select.
|
void |
setStylePrimaryName(String style) |
void |
setTabIndex(int tabIndex)
Sets the tab index.
|
void |
setWidth(String width) |
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCaption, getIconUrl, getKey, isEnabled, isSelectedprotected final com.google.gwt.user.client.ui.FlowPanel container
protected final com.google.gwt.user.client.ui.ListBox select
public VListSelect()
public void setStylePrimaryName(String style)
setStylePrimaryName in class com.google.gwt.user.client.ui.UIObjectpublic void setRows(int rows)
rows - the number of items to showListBox.setVisibleItemCount(int)public int getRows()
ListBox.setVisibleItemCount(int)public Registration addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> listener)
AbstractMultiSelectConnector.MultiSelectWidgetaddSelectionChangeListener in interface AbstractMultiSelectConnector.MultiSelectWidgetlistener - the listener to add, not nullpublic void setItems(List<JsonObject> items)
AbstractMultiSelectConnector.MultiSelectWidgetsetItems in interface AbstractMultiSelectConnector.MultiSelectWidgetitems - the items for the selectprotected FastStringSet getSelectedItems()
public void setHeight(String height)
setHeight in class com.google.gwt.user.client.ui.UIObjectpublic void setWidth(String width)
setWidth in class com.google.gwt.user.client.ui.UIObjectpublic void setTabIndex(int tabIndex)
tabIndex - the tab index to setpublic int getTabIndex()
public void setReadOnly(boolean readOnly)
readOnly - true for read only, false for not read onlypublic boolean isReadOnly()
true if this select is in read only mode, false
if not.true for read only, false for not read onlypublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledpublic boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledCopyright © 2018 Vaadin Ltd. All rights reserved.