Package com.google.gwt.user.client.ui
Class SuggestOracle
java.lang.Object
com.google.gwt.user.client.ui.SuggestOracle
- Direct Known Subclasses:
MultiWordSuggestOracle
A
SuggestOracle
can be used to create
suggestions associated with a specific query string. It is currently used by
SuggestBox
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Callback forSuggestOracle
.static class
ASuggestOracle
request.static class
SuggestOracle
response.static interface
Suggestion supplied by theSuggestOracle
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
ShouldSuggestOracle.Suggestion
display strings be treated as HTML? If true, this all suggestions' display strings will be interpreted as HTML, otherwise as text.void
requestDefaultSuggestions
(SuggestOracle.Request request, SuggestOracle.Callback callback) Generate aSuggestOracle.Response
based on a default request.abstract void
requestSuggestions
(SuggestOracle.Request request, SuggestOracle.Callback callback) Generate aSuggestOracle.Response
based on a specificSuggestOracle.Request
.
-
Constructor Details
-
SuggestOracle
public SuggestOracle()Constructor forSuggestOracle
.
-
-
Method Details
-
isDisplayStringHTML
public boolean isDisplayStringHTML()ShouldSuggestOracle.Suggestion
display strings be treated as HTML? If true, this all suggestions' display strings will be interpreted as HTML, otherwise as text.- Returns:
- by default, returns false
-
requestDefaultSuggestions
public void requestDefaultSuggestions(SuggestOracle.Request request, SuggestOracle.Callback callback) Generate aSuggestOracle.Response
based on a default request. The request query must be null as it represents the results the oracle should return based on no query string.After the
SuggestOracle.Response
is created, it is passed intoSuggestOracle.Callback.onSuggestionsReady(com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response)
.- Parameters:
request
- the requestcallback
- the callback to use for the response
-
requestSuggestions
public abstract void requestSuggestions(SuggestOracle.Request request, SuggestOracle.Callback callback) Generate aSuggestOracle.Response
based on a specificSuggestOracle.Request
. After theSuggestOracle.Response
is created, it is passed intoSuggestOracle.Callback.onSuggestionsReady(com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response)
.- Parameters:
request
- the requestcallback
- the callback to use for the response
-