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

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.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.PopupPanel
                      extended by com.vaadin.terminal.gwt.client.ui.VOverlay
                          extended by com.vaadin.terminal.gwt.client.ui.combobox.VFilterSelect.SuggestionPopup
All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.PopupPanel.PositionCallback, com.google.gwt.user.client.ui.SourcesPopupEvents, Iterable<com.google.gwt.user.client.ui.Widget>
Enclosing class:
VFilterSelect

public class VFilterSelect.SuggestionPopup
extends VOverlay
implements com.google.gwt.user.client.ui.PopupPanel.PositionCallback, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>

Represents the popup box with the selection options. Wraps a suggestion menu.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.terminal.gwt.client.ui.VOverlay
VOverlay.ShadowAnimation
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
protected  VFilterSelect.SuggestionMenu menu
           
 
Fields inherited from class com.vaadin.terminal.gwt.client.ui.VOverlay
CLASSNAME_SHADOW
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Method Summary
 boolean isJustClosed()
          Was the popup just closed?
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
 void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
           
 void selectNextItem()
          Selects the next item in the filtered selections
 void selectPrevItem()
          Selects the previous item in the filtered selections
 void setPagingEnabled(boolean paging)
          Should paging be enabled.
 void setPosition(int offsetWidth, int offsetHeight)
           
 void showSuggestions(Collection<VFilterSelect.FilterSelectSuggestion> currentSuggestions, int currentPage, int totalSuggestions)
          Shows the popup where the user can see the filtered options
 void updateStyleNames(UIDL uidl, ComponentState componentState)
          Updates style names in suggestion popup to help theme building.
 
Methods inherited from class com.vaadin.terminal.gwt.client.ui.VOverlay
getOwner, isShadowEnabled, isSinkShadowEvents, onDetach, setHeight, setOwner, setPopupPosition, setShadowEnabled, setShadowStyle, setSinkShadowEvents, setVisible, setWidth, setZIndex, show, sinkEvents, updateShadowSizeAndPosition
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setWidget, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

menu

protected final VFilterSelect.SuggestionMenu menu
Method Detail

showSuggestions

public void showSuggestions(Collection<VFilterSelect.FilterSelectSuggestion> currentSuggestions,
                            int currentPage,
                            int totalSuggestions)
Shows the popup where the user can see the filtered options

Parameters:
currentSuggestions - The filtered suggestions
currentPage - The current page number
totalSuggestions - The total amount of suggestions

selectNextItem

public void selectNextItem()
Selects the next item in the filtered selections


selectPrevItem

public void selectPrevItem()
Selects the previous item in the filtered selections


onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

setPagingEnabled

public void setPagingEnabled(boolean paging)
Should paging be enabled. If paging is enabled then only a certain amount of items are visible at a time and a scrollbar or buttons are visible to change page. If paging is turned of then all options are rendered into the popup menu.

Parameters:
paging - Should the paging be turned on?

setPosition

public void setPosition(int offsetWidth,
                        int offsetHeight)
Specified by:
setPosition in interface com.google.gwt.user.client.ui.PopupPanel.PositionCallback

isJustClosed

public boolean isJustClosed()
Was the popup just closed?

Returns:
true if popup was just closed

onClose

public void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
Specified by:
onClose in interface com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
Overrides:
onClose in class VOverlay

updateStyleNames

public void updateStyleNames(UIDL uidl,
                             ComponentState componentState)
Updates style names in suggestion popup to help theme building.

Parameters:
uidl - UIDL for the whole combo box
componentState - shared state of the combo box


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