public class VTwinColSelect extends com.google.gwt.user.client.ui.Composite implements AbstractMultiSelectConnector.MultiSelectWidget, Field, com.google.gwt.event.dom.client.ClickHandler, Focusable, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.DoubleClickHandler, SubPartAware
| Modifier and Type | Class and Description |
|---|---|
class |
VTwinColSelect.DoubleClickListBox
A multiselect ListBox which catches double clicks.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME
Primary style name for twin col select.
|
| Constructor and Description |
|---|
VTwinColSelect()
Constructs a new VTwinColSelect.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> listener)
Adds a selection change listener the select.
|
void |
clearInternalHeights()
For internal use only.
|
void |
clearInternalWidths()
For internal use only.
|
void |
focus()
Sets focus to this widget.
|
com.google.gwt.user.client.ui.Widget |
getCaptionWrapper()
For internal use only.
|
protected int |
getNavigationSelectKey()
Get the key that selects an item in the table.
|
protected com.google.gwt.user.client.ui.HTML |
getOptionsCaption()
Gets the options caption HTML Widget.
|
int |
getRows()
Returns the number of visible items for the list boxes.
|
protected com.google.gwt.user.client.ui.HTML |
getSelectionsCaption()
Gets the selections caption HTML widget.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart. |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
boolean |
isEnabled() |
boolean |
isReadOnly()
Returns
true if this twin column select is in read only mode,
false if not. |
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event) |
void |
onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event) |
void |
onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event) |
void |
onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event) |
void |
setEnabled(boolean enabled) |
void |
setInternalHeights()
For internal use only.
|
void |
setInternalWidths()
For internal use only.
|
void |
setItems(List<elemental.json.JsonObject> items)
Sets the given items to the select.
|
void |
setReadOnly(boolean readOnly)
Sets this twin column select as read only, meaning selection cannot be
changed.
|
void |
setRows(int rows)
Sets the number of visible items for the list boxes.
|
void |
setTabIndex(int tabIndex)
Sets the tab index.
|
void |
updateCaptions(String leftCaption,
String rightCaption)
Updates the captions above the left (options) and right (selections)
columns.
|
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, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCaption, getIconUrl, getKey, isEnabled, isSelectedpublic static final String CLASSNAME
protected com.google.gwt.user.client.ui.HTML getOptionsCaption()
protected com.google.gwt.user.client.ui.HTML getSelectionsCaption()
public com.google.gwt.user.client.ui.Widget getCaptionWrapper()
public void setRows(int rows)
rows - the number of items to showListBox.setVisibleItemCount(int)public int getRows()
ListBox.setVisibleItemCount(int)public void updateCaptions(String leftCaption, String rightCaption)
leftCaption - the left caption to set, or null to clearrightCaption - the right caption to set, or null to clearpublic Registration addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> listener)
AbstractMultiSelectConnector.MultiSelectWidgetaddSelectionChangeListener in interface AbstractMultiSelectConnector.MultiSelectWidgetlistener - the listener to add, not nullpublic void setItems(List<elemental.json.JsonObject> items)
AbstractMultiSelectConnector.MultiSelectWidgetsetItems in interface AbstractMultiSelectConnector.MultiSelectWidgetitems - the items for the selectpublic void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick in interface com.google.gwt.event.dom.client.ClickHandlerpublic void clearInternalHeights()
public void setInternalHeights()
public void clearInternalWidths()
public void setInternalWidths()
public void setTabIndex(int tabIndex)
tabIndex - the tab index to setpublic void setReadOnly(boolean readOnly)
readOnly - true for read only, false for not read onlypublic boolean isReadOnly()
true if this twin column 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.HasEnabledpublic void focus()
Focusableprotected int getNavigationSelectKey()
public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandlerpublic void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandlerpublic void onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
onDoubleClick in interface com.google.gwt.event.dom.client.DoubleClickHandlerpublic com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identifysubElement or null
if no identifier could be provided.Copyright © 2023 Vaadin Ltd. All rights reserved.