com.vaadin.terminal.gwt.client.ui.twincolselect
Class VTwinColSelect

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.Composite
              extended by com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroupBase
                  extended by com.vaadin.terminal.gwt.client.ui.twincolselect.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.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, Focusable, Field, SubPartAware

public class VTwinColSelect
extends VOptionGroupBase
implements com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.DoubleClickHandler, SubPartAware


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
           
 
Fields inherited from class com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroupBase
CLASSNAME_OPTION, client, cols, container, disabled, immediate, multiselect, newItemButton, newItemField, nullSelectionAllowed, nullSelectionItemAvailable, optionsContainer, paintableId, readonly, rows, 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 getNavigationSelectKey()
          Get the key that selects an item in the table.
 com.google.gwt.user.client.ui.HTML getOptionsCaption()
           
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.
 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)
           
protected  void setTabIndex(int tabIndex)
           
protected  void updateCaptions(UIDL uidl)
           
 
Methods inherited from class com.vaadin.terminal.gwt.client.ui.optiongroup.VOptionGroupBase
getColumns, getRows, getSelectedItem, isDisabled, isImmediate, isMultiselect, isNullSelectionAllowed, isNullSelectionItemAvailable, isReadonly, onChange, onKeyPress
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, 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, 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
 

Field Detail

ATTRIBUTE_LEFT_CAPTION

public static final String ATTRIBUTE_LEFT_CAPTION
See Also:
Constant Field Values

ATTRIBUTE_RIGHT_CAPTION

public static final String ATTRIBUTE_RIGHT_CAPTION
See Also:
Constant Field Values
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()

updateCaptions

protected void updateCaptions(UIDL uidl)

buildOptions

protected void buildOptions(UIDL uidl)
Specified by:
buildOptions in class VOptionGroupBase

getSelectedItems

protected String[] getSelectedItems()
Specified by:
getSelectedItems in class VOptionGroupBase

onClick

public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
Specified by:
onClick in interface com.google.gwt.event.dom.client.ClickHandler
Overrides:
onClick in class VOptionGroupBase

setTabIndex

protected void setTabIndex(int tabIndex)
Specified by:
setTabIndex in class VOptionGroupBase

focus

public void focus()
Description copied from interface: Focusable
Sets focus to this widget.

Specified by:
focus in interface Focusable

getNavigationSelectKey

protected int getNavigationSelectKey()
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.

Returns:

onKeyDown

public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent event)
Specified by:
onKeyDown in interface com.google.gwt.event.dom.client.KeyDownHandler

onMouseDown

public void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
Specified by:
onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandler

onDoubleClick

public void onDoubleClick(com.google.gwt.event.dom.client.DoubleClickEvent event)
Specified by:
onDoubleClick in interface com.google.gwt.event.dom.client.DoubleClickHandler

getSubPartElement

public com.google.gwt.user.client.Element getSubPartElement(String subPart)
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.

Specified by:
getSubPartElement in interface SubPartAware
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.

getSubPartName

public String getSubPartName(com.google.gwt.user.client.Element subElement)
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.

Specified by:
getSubPartName in interface SubPartAware
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.


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.