com.vaadin.client.ui
Class VFilterSelect.SuggestionMenu

java.lang.Object
  extended by Widget
      extended by com.vaadin.client.ui.menubar.MenuBar
          extended by com.vaadin.client.ui.VFilterSelect.SuggestionMenu
All Implemented Interfaces:
SubPartAware
Enclosing class:
VFilterSelect

public class VFilterSelect.SuggestionMenu
extends MenuBar
implements SubPartAware

The menu where the suggestions are rendered


Method Summary
 void doPostFilterSelectedItemAction()
          Triggered after a selection has been made
 void doSelectedItemAction()
          Send the current selection to the server.
 void fixHeightTo(int pageItemsCount)
          Fixes menus height to use same space as full page would use.
 com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
          Locates an element inside a component using the identifier provided in subPart.
 java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
          Provides an identifier that identifies the element within the component.
 boolean isScrollActive()
          Returns true if the scroll is active on the menu element or if the menu currently displays the last page with less items then the maximum visibility (in which case the scroll is not active, but the scroll is active for any other page in general).
 void onLoad(LoadEvent event)
           
 void selectFirstItem()
          Deprecated. use VFilterSelect.SuggestionPopup.selectFirstItem() instead.
 void selectLastItem()
          Deprecated. use VFilterSelect.SuggestionPopup.selectLastItem() instead.
 void setKeyboardSelectedItem(MenuItem menuItem)
           
 void setSuggestions(java.util.Collection<VFilterSelect.FilterSelectSuggestion> suggestions)
          Sets the suggestions rendered in the menu
 
Methods inherited from class com.vaadin.client.ui.menubar.MenuBar
addItem, addItem, addItem, clearItems, doItemAction, getAutoOpen, getFirstItem, getItems, getLastItem, getPreferredHeight, getSelectedIndex, getSelectedItem, onBrowserEvent, onDetach, onPopupClosed, removeItem, scrollSelectionIntoView, selectItem, setAutoOpen, setScrollEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fixHeightTo

public void fixHeightTo(int pageItemsCount)
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(java.util.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(java.lang.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 java.lang.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(LoadEvent event)

setKeyboardSelectedItem

public void setKeyboardSelectedItem(MenuItem menuItem)

selectFirstItem

@Deprecated
public void selectFirstItem()
Deprecated. use VFilterSelect.SuggestionPopup.selectFirstItem() instead.


selectLastItem

@Deprecated
public void selectLastItem()
Deprecated. use VFilterSelect.SuggestionPopup.selectLastItem() instead.


isScrollActive

public boolean isScrollActive()
Returns true if the scroll is active on the menu element or if the menu currently displays the last page with less items then the maximum visibility (in which case the scroll is not active, but the scroll is active for any other page in general).

Overrides:
isScrollActive in class MenuBar
Returns:
true if the scroll is active, otherwise false.
Since:
7.2.6


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