com.vaadin.terminal.gwt.client.ui.
Class VTwinColSelect
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.vaadin.terminal.gwt.client.ui.VTwinColSelect
All Implemented Interfaces:
com.google.gwt.event.dom.client.ChangeHandler, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.dom.client.DoubleClickHandler, com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget, Focusable, Paintable, Field, SubPartAware
- extends com.google.gwt.user.client.ui.Composite
- implements com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.DoubleClickHandler, SubPartAware
public class VTwinColSelect
Nested Class Summary | |
---|---|
class |
VTwinColSelect.DoubleClickListBox
A ListBox which catches double clicks |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
static String |
ATTRIBUTE_LEFT_CAPTION
|
static String |
ATTRIBUTE_RIGHT_CAPTION
|
static String |
CLASSNAME_OPTION
|
protected ApplicationConnection |
client
|
protected String |
id
|
protected com.google.gwt.user.client.ui.Widget |
optionsContainer
Widget holding the different options (e.g. |
protected Set<String> |
selectedKeys
|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VTwinColSelect()
|
Method Summary | |
---|---|
protected void |
buildOptions(UIDL uidl)
|
void |
focus()
Sets focus to this widget. |
protected int |
getColumns()
|
protected int |
getNavigationSelectKey()
Get the key that selects an item in the table. |
com.google.gwt.user.client.ui.HTML |
getOptionsCaption()
|
protected int |
getRows()
|
protected String |
getSelectedItem()
|
protected String[] |
getSelectedItems()
|
com.google.gwt.user.client.ui.HTML |
getSelectionsCaption()
|
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. |
protected boolean |
isDisabled()
|
protected boolean |
isImmediate()
|
protected boolean |
isMultiselect()
|
protected boolean |
isNullSelectionAllowed()
|
protected boolean |
isNullSelectionItemAvailable()
|
protected boolean |
isReadonly()
|
void |
onChange(com.google.gwt.event.dom.client.ChangeEvent event)
|
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 |
onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
|
void |
onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
|
void |
setHeight(String height)
|
protected void |
setTabIndex(int tabIndex)
|
void |
setWidth(String width)
|
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
ATTRIBUTE_LEFT_CAPTION
public static final String ATTRIBUTE_LEFT_CAPTION
See Also:
ATTRIBUTE_RIGHT_CAPTION
public static final String ATTRIBUTE_RIGHT_CAPTION
See Also:
CLASSNAME_OPTION
public static final String CLASSNAME_OPTION
See Also:
client
protected ApplicationConnection client
id
protected String id
selectedKeys
protected Set<String> selectedKeys
optionsContainer
protected com.google.gwt.user.client.ui.Widget optionsContainer
Widget holding the different options (e.g. ListBox or Panel for radio buttons) (optional, fallbacks to container Panel)
Constructor Detail |
---|
VTwinColSelect
public VTwinColSelect()
Method Detail |
---|
getOptionsCaption
public com.google.gwt.user.client.ui.HTML getOptionsCaption()
getSelectionsCaption
public com.google.gwt.user.client.ui.HTML getSelectionsCaption()
updateFromUIDL
public void updateFromUIDL(UIDL uidl,
ApplicationConnection client)
- Specified by:
updateFromUIDL
in interfacePaintable
buildOptions
protected void buildOptions(UIDL uidl)
getSelectedItems
protected String[] getSelectedItems()
onClick
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
- Specified by:
onClick
in interfacecom.google.gwt.event.dom.client.ClickHandler
setHeight
public void setHeight(String height)
- Overrides:
setHeight
in classcom.google.gwt.user.client.ui.UIObject
setWidth
public void setWidth(String width)
- Overrides:
setWidth
in classcom.google.gwt.user.client.ui.UIObject
setTabIndex
protected void setTabIndex(int tabIndex)
focus
public void focus()
Description copied from interface: Focusable
Sets focus to this widget.
getNavigationSelectKey
protected int getNavigationSelectKey()
- Returns:
Get the key that selects an item in the table. By default it is the Enter key but by overriding this you can change the key to whatever you want.
onKeyDown
public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
- Specified by:
onKeyDown
in interfacecom.google.gwt.event.dom.client.KeyDownHandler
onMouseDown
public void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
- Specified by:
onMouseDown
in interfacecom.google.gwt.event.dom.client.MouseDownHandler
onDoubleClick
public void onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
- Specified by:
onDoubleClick
in interfacecom.google.gwt.event.dom.client.DoubleClickHandler
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
- Specified by:
getSubPartElement
in interfaceSubPartAware
- Parameters:
subPart
- The identifier for the element inside the component- Returns:
- The element identified by subPart or null if the element could not be found.
Description copied from interface: SubPartAware
Locates an element inside a component using the identifier provided in
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.
getSubPartName
public String getSubPartName(com.google.gwt.user.client.Element subElement)
- Specified by:
getSubPartName
in interfaceSubPartAware
- Parameters:
subElement
- The element the identifier string should uniquely identify- Returns:
- An identifier that uniquely identifies
subElement
or null if no identifier could be provided.
Description copied from interface: SubPartAware
Provides an identifier that identifies the element within the component.
The subElement
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.
isImmediate
protected boolean isImmediate()
isMultiselect
protected boolean isMultiselect()
isDisabled
protected boolean isDisabled()
isReadonly
protected boolean isReadonly()
isNullSelectionAllowed
protected boolean isNullSelectionAllowed()
isNullSelectionItemAvailable
protected boolean isNullSelectionItemAvailable()
getColumns
protected int getColumns()
- Returns:
- "cols" specified in uidl, 0 if not specified
getRows
protected int getRows()
- Returns:
- "rows" specified in uidl, 0 if not specified
onChange
public void onChange(com.google.gwt.event.dom.client.ChangeEvent event)
- Specified by:
onChange
in interfacecom.google.gwt.event.dom.client.ChangeHandler
onKeyPress
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event)
- Specified by:
onKeyPress
in interfacecom.google.gwt.event.dom.client.KeyPressHandler
getSelectedItem
protected String getSelectedItem()