public class ListPopupPanel extends com.google.gwt.user.client.ui.PopupPanel implements AdvancedWidget, com.google.gwt.event.dom.client.HasChangeHandlers
Modifier and Type | Class and Description |
---|---|
protected class |
ListPopupPanel.ClickSpyHandler
This handler spies for click events if the list is opened and hides it if there is any element clicked excepting
the combo box elements and list elements.
|
protected class |
ListPopupPanel.ItemClickHandler
This is a click handler required to dispatch click events.
|
protected class |
ListPopupPanel.ListMouseHandler
This listener is required to handle mouse moving events over the list.
|
protected class |
ListPopupPanel.ListScrollHandler
This scroll handler is invoked on any scrolling event caotured by the items list.
|
protected class |
ListPopupPanel.ListWindowResizeHandler
This handler is invoked on window resize and changes opened list popup panel position
according to new coordinates of the
ComboBox . |
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
Modifier | Constructor and Description |
---|---|
protected |
ListPopupPanel(ComboBox selectionTextBox)
Creates an instance of this class and sets the parent combo box value.
|
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
This method adds a handler that will be invoked on choice.
|
protected void |
adjustSize()
Adjusts drop down list sizes to make it take optimal area on the screen.
|
protected com.google.gwt.user.client.ui.FocusPanel |
adoptItemWidget(com.google.gwt.user.client.ui.Widget widget)
This method wraps the specified widget into the focus panel and adds necessary listeners.
|
void |
display()
Deprecated.
you don't have to invoke this method to display the widget any more
|
void |
ensureVisible(com.google.gwt.user.client.ui.Widget item)
Makes the item visible in the list according to the check done by the
isItemVisible(int) method. |
protected void |
fillList()
Fills the list of items starting from the current position and ending with rendering limits
See {2link #isRenderingLimitReached()} for additional details since it's used in the body of this method.
|
protected ComboBox |
getComboBox()
Getter for property 'comboBox'.
|
DropDownPosition |
getDropDownPosition()
Gets applied position of the drop down list.
|
int |
getHighlightRow()
Gets a currently highlight row.
|
com.google.gwt.user.client.ui.Widget |
getItem(int index)
Gets an item by its index
If index < 0 or index >=
getItemCount() it throws an exception. |
protected com.google.gwt.event.dom.client.ClickHandler |
getItemClickHandler()
Getter for property 'itemClickHandler'.
|
int |
getItemCount()
This method gets an actual number of items displayed in the drop down.
|
int |
getItemIndex(com.google.gwt.user.client.ui.Widget item)
Gets an item index if it's displayed in the drop down list.
|
protected com.google.gwt.user.client.ui.FlowPanel |
getList()
Getter for property 'list'.
|
com.google.gwt.event.dom.client.ScrollHandler |
getListScrollHandler()
Getter for property 'listScrollHandler'.
|
protected ListPopupPanel.ListMouseHandler |
getMouseEventsHandler()
Getter for property 'mouseEventsListener'.
|
com.google.gwt.user.client.ui.ScrollPanel |
getScrollPanel()
Getter for property 'scrollPanel'.
|
int |
getStartItemIndex() |
int |
getVisibleRows()
Gets a number of visible rows.
|
void |
hide() |
boolean |
isHidden()
Getter for property 'hidden'.
|
boolean |
isItemVisible(int index)
Checks whether the specified item is visible in the scroll area.
|
protected boolean |
isLazyRenderingEnabled()
Checks whether the lazy rendering option is enabled.
|
protected boolean |
isRenderingLimitReached(int previouslyRenderedRows)
This method checks whether the limit of displayed items reached.
|
protected void |
prepareList()
This method prepares the list of items for displaying.
|
protected void |
resetPosition()
Chooses and sets a mostly appropriate position of the drop down list
|
protected void |
selectRow(int newRow)
This method higlights a selected row.
|
void |
setDropDownPosition(DropDownPosition dropDownPosition)
Sets applied position of the drop down list.
|
protected void |
setHidden(boolean hidden)
Setter for property 'hidden'.
|
protected void |
setHighlightRow(int row)
Sets the highlight row number.
|
protected void |
setLazyRenderingEnabled(boolean lazyRenderingEnabled)
Enables or disables lazy rendering option.
|
void |
setStartItemIndex(int index)
Sets an item index that must be displayed on top.
|
void |
setVisibleRows(int visibleRows)
Sets visible rows number.
|
void |
show() |
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidget, setWidth, showRelativeTo
add, getWidget, iterator, remove, setWidget
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents
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
protected ListPopupPanel(ComboBox selectionTextBox)
selectionTextBox
- is a selection box value.public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
addChangeHandler
in interface com.google.gwt.event.dom.client.HasChangeHandlers
handler
- is a handler to be added.public boolean isHidden()
public int getHighlightRow()
public int getItemCount()
public com.google.gwt.user.client.ui.Widget getItem(int index)
getItemCount()
it throws an exception.index
- is an index of the item to get.IndexOutOfBoundsException
- if index is invalid.public int getItemIndex(com.google.gwt.user.client.ui.Widget item)
-1
.item
- an item that is required to return.-1
.protected void setHighlightRow(int row)
row
- is a row number to become highlight.public boolean isItemVisible(int index)
true
if whole item is visible.index
- is an index of the item.public void ensureVisible(com.google.gwt.user.client.ui.Widget item)
isItemVisible(int)
method.item
- is an item to check.public void hide()
hide
in class com.google.gwt.user.client.ui.PopupPanel
public void show()
show
in class com.google.gwt.user.client.ui.PopupPanel
public int getVisibleRows()
public void setVisibleRows(int visibleRows)
visibleRows
- is a number of rows to be displayed without scrolling.public void setStartItemIndex(int index)
index
- is an index of the element to display.public int getStartItemIndex()
public DropDownPosition getDropDownPosition()
public void setDropDownPosition(DropDownPosition dropDownPosition)
dropDownPosition
- is a drop down list position value.protected void adjustSize()
protected void resetPosition()
public void display()
display
in interface AdvancedWidget
protected boolean isLazyRenderingEnabled()
protected void setLazyRenderingEnabled(boolean lazyRenderingEnabled)
lazyRenderingEnabled
- is an option value.protected void prepareList()
protected void fillList()
protected boolean isRenderingLimitReached(int previouslyRenderedRows)
previouslyRenderedRows
- is a number of rows previously loaded in the list
(items count before filling the list).protected void selectRow(int newRow)
newRow
- a row for selection.protected com.google.gwt.user.client.ui.FocusPanel adoptItemWidget(com.google.gwt.user.client.ui.Widget widget)
widget
- is an item widget to be wraped.protected void setHidden(boolean hidden)
hidden
- Value to set for property 'hidden'.protected ComboBox getComboBox()
protected com.google.gwt.user.client.ui.FlowPanel getList()
public com.google.gwt.user.client.ui.ScrollPanel getScrollPanel()
protected com.google.gwt.event.dom.client.ClickHandler getItemClickHandler()
protected ListPopupPanel.ListMouseHandler getMouseEventsHandler()
public com.google.gwt.event.dom.client.ScrollHandler getListScrollHandler()
Copyright © 2008–2013. All rights reserved.