com.vaadin.terminal.gwt.client.ui.combobox
Class VFilterSelect.SuggestionMenu

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.vaadin.terminal.gwt.client.ui.menubar.MenuBar
              extended by com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect.SuggestionMenu
All Implemented Interfaces:
com.google.gwt.event.dom.client.LoadHandler, 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.IsWidget, com.google.gwt.user.client.ui.PopupListener, SubPartAware
Enclosing class:
VFilterSelect

public class VFilterSelect.SuggestionMenu
extends MenuBar
implements SubPartAware, com.google.gwt.event.dom.client.LoadHandler

The menu where the suggestions are rendered


Nested Class Summary
 
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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Method Summary
 void doPostFilterSelectedItemAction()
          Triggered after a selection has been made
 void doSelectedItemAction()
          Send the current selection to the server.
 void fixHeightTo(int pagelenth)
          Fixes menus height to use same space as full page would use.
 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 onLoad(com.google.gwt.event.dom.client.LoadEvent event)
           
 void selectFirstItem()
           
 void selectLastItem()
           
protected  void setKeyboardSelectedItem(MenuItem firstItem)
           
 void setSuggestions(Collection<VFilterSelect.FilterSelectSuggestion> suggestions)
          Sets the suggestions rendered in the menu
 
Methods inherited from class com.vaadin.terminal.gwt.client.ui.menubar.MenuBar
addItem, addItem, addItem, addItem, addItem, clearItems, doItemAction, getAutoOpen, getItems, getSelectedItem, onBrowserEvent, onDetach, onPopupClosed, removeItem, selectItem, setAutoOpen
 
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, isAttached, isOrWasAttached, onAttach, 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, resolvePotentialElement, 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
 

Method Detail

fixHeightTo

public void fixHeightTo(int pagelenth)
Fixes menus height to use same space as full page would use. Needed to avoid height changes when quickly "scrolling" to last page


setSuggestions

public void setSuggestions(Collection<VFilterSelect.FilterSelectSuggestion> suggestions)
Sets the suggestions rendered in the menu

Parameters:
suggestions - The suggestions to be rendered in the menu

doSelectedItemAction

public void doSelectedItemAction()
Send the current selection to the server. Triggered when a selection is made or on a blur event.


doPostFilterSelectedItemAction

public void doPostFilterSelectedItemAction()
Triggered after a selection has been made


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.

onLoad

public void onLoad(com.google.gwt.event.dom.client.LoadEvent event)
Specified by:
onLoad in interface com.google.gwt.event.dom.client.LoadHandler

selectFirstItem

public void selectFirstItem()

setKeyboardSelectedItem

protected void setKeyboardSelectedItem(MenuItem firstItem)

selectLastItem

public void selectLastItem()


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