|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay
public static class SuggestBox.DefaultSuggestionDisplay
The default implementation of SuggestBox.SuggestionDisplay
displays
suggestions in a PopupPanel
beneath the SuggestBox
.
Constructor Summary | |
---|---|
SuggestBox.DefaultSuggestionDisplay()
Construct a new SuggestBox.DefaultSuggestionDisplay . |
Method Summary | |
---|---|
protected PopupPanel |
createPopup()
Create the PopupPanel that will hold the list of suggestions. |
protected Widget |
decorateSuggestionList(Widget suggestionList)
Wrap the list of suggestions before adding it to the popup. |
protected SuggestOracle.Suggestion |
getCurrentSelection()
Get the currently selected SuggestOracle.Suggestion in the display. |
protected PopupPanel |
getPopupPanel()
Get the PopupPanel used to display suggestions. |
protected MenuBar |
getSuggestionMenu()
Get the MenuBar used to display suggestions. |
void |
hideSuggestions()
Hide the list of suggestions from view. |
boolean |
isAnimationEnabled()
Returns true if animations are enabled, false if not. |
(package private) boolean |
isAnimationEnabledImpl()
This is here for legacy reasons. |
boolean |
isSuggestionListHiddenWhenEmpty()
Check whether or not the suggestion list is hidden when there are no suggestions to display. |
boolean |
isSuggestionListShowing()
Check whether or not the list of suggestions is being shown. |
(package private) boolean |
isSuggestionListShowingImpl()
This is here for legacy reasons. |
protected void |
moveSelectionDown()
Highlight the suggestion directly below the current selection in the list. |
protected void |
moveSelectionUp()
Highlight the suggestion directly above the current selection in the list. |
protected void |
onEnsureDebugId(java.lang.String baseID)
Affected Elements: -popup = The popup that appears with suggestions. -item# = The suggested item at the specified index. |
void |
setAnimationEnabled(boolean enable)
Enable or disable animations. |
(package private) void |
setAnimationEnabledImpl(boolean enable)
This is here for legacy reasons. |
void |
setPopupStyleName(java.lang.String style)
Sets the style name of the suggestion popup. |
(package private) void |
setPopupStyleNameImpl(java.lang.String style)
This is here for legacy reasons. |
void |
setPositionRelativeTo(UIObject uiObject)
Sets the UI object where the suggestion display should appear next to. |
void |
setSuggestionListHiddenWhenEmpty(boolean hideWhenEmpty)
Set whether or not the suggestion list should be hidden when there are no suggestions to display. |
protected void |
showSuggestions(SuggestBox suggestBox,
java.util.Collection<? extends SuggestOracle.Suggestion> suggestions,
boolean isDisplayStringHTML,
boolean isAutoSelectEnabled,
SuggestBox.SuggestionCallback callback)
Update the list of visible suggestions. |
Methods inherited from class com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay |
---|
setMoreSuggestions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SuggestBox.DefaultSuggestionDisplay()
SuggestBox.DefaultSuggestionDisplay
.
Method Detail |
---|
public void hideSuggestions()
SuggestBox.SuggestionDisplay
hideSuggestions
in class SuggestBox.SuggestionDisplay
public boolean isAnimationEnabled()
HasAnimation
isAnimationEnabled
in interface HasAnimation
public boolean isSuggestionListHiddenWhenEmpty()
public boolean isSuggestionListShowing()
public void setAnimationEnabled(boolean enable)
HasAnimation
setAnimationEnabled
in interface HasAnimation
enable
- true to enable, false to disablepublic void setPopupStyleName(java.lang.String style)
style
- the new primary style nameUIObject.setStyleName(String)
public void setPositionRelativeTo(UIObject uiObject)
uiObject
- the uiObject used for positioning, or null to position
relative to the suggest boxpublic void setSuggestionListHiddenWhenEmpty(boolean hideWhenEmpty)
hideWhenEmpty
- true to hide when empty, false not toprotected PopupPanel createPopup()
protected Widget decorateSuggestionList(Widget suggestionList)
suggestionList
- the widget that contains the list of suggestions
protected SuggestOracle.Suggestion getCurrentSelection()
SuggestBox.SuggestionDisplay
SuggestOracle.Suggestion
in the display.
getCurrentSelection
in class SuggestBox.SuggestionDisplay
protected PopupPanel getPopupPanel()
PopupPanel
used to display suggestions.
protected MenuBar getSuggestionMenu()
MenuBar
used to display suggestions.
protected void moveSelectionDown()
SuggestBox.SuggestionDisplay
moveSelectionDown
in class SuggestBox.SuggestionDisplay
protected void moveSelectionUp()
SuggestBox.SuggestionDisplay
moveSelectionUp
in class SuggestBox.SuggestionDisplay
protected void onEnsureDebugId(java.lang.String baseID)
onEnsureDebugId
in class SuggestBox.SuggestionDisplay
baseID
- the baseID of the SuggestBox
UIObject.onEnsureDebugId(String)
protected void showSuggestions(SuggestBox suggestBox, java.util.Collection<? extends SuggestOracle.Suggestion> suggestions, boolean isDisplayStringHTML, boolean isAutoSelectEnabled, SuggestBox.SuggestionCallback callback)
SuggestBox.SuggestionDisplay
showSuggestions
in class SuggestBox.SuggestionDisplay
suggestBox
- the suggest box where the suggestions originatedsuggestions
- the suggestions to showisDisplayStringHTML
- should the suggestions be displayed as HTMLisAutoSelectEnabled
- if true, the first item should be selected
automaticallycallback
- the callback used when the user makes a suggestionboolean isAnimationEnabledImpl()
SuggestBox.SuggestionDisplay
isAnimationEnabledImpl
in class SuggestBox.SuggestionDisplay
boolean isSuggestionListShowingImpl()
SuggestBox.SuggestionDisplay
isSuggestionListShowingImpl
in class SuggestBox.SuggestionDisplay
void setAnimationEnabledImpl(boolean enable)
SuggestBox.SuggestionDisplay
setAnimationEnabledImpl
in class SuggestBox.SuggestionDisplay
enable
- true to enable animationvoid setPopupStyleNameImpl(java.lang.String style)
SuggestBox.SuggestionDisplay
setPopupStyleNameImpl
in class SuggestBox.SuggestionDisplay
style
- the style name
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |