|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.SuggestOracle
com.xpn.xwiki.gwt.api.client.widgets.WordListSuggestOracle
public class WordListSuggestOracle
SuggestOracle to suggest a list of words with respect to a given list of separators.
The SuggestOracle used for a single word suggestion is set through
setWordOracle(com.google.gwt.user.client.ui.SuggestOracle)
and the separators through setSeparators(String).
Whether this oracle generates unique suggestions with respect to the already typed list, can
be configured through WordListSuggestOracle#isSuggestUnique().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.SuggestOracle |
|---|
com.google.gwt.user.client.ui.SuggestOracle.Callback, com.google.gwt.user.client.ui.SuggestOracle.Request, com.google.gwt.user.client.ui.SuggestOracle.Response, com.google.gwt.user.client.ui.SuggestOracle.Suggestion |
| Field Summary | |
|---|---|
protected java.lang.String |
separators
multiple words separator |
protected boolean |
suggestUnique
whether this oracle omits words that already are in the typed list or not |
protected com.google.gwt.user.client.ui.SuggestOracle |
wordOracle
oracle to use for suggesting a single word |
| Constructor Summary | |
|---|---|
WordListSuggestOracle()
Default constructor: builds an oracle with an empty SuggestOracle
and the space as a separator. |
|
WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle)
Builds an oracle with the specified SuggestOracle and
the space as a default separator. |
|
WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle,
java.lang.String separators)
Builds an wordOracle with the specified SuggestOracle
and separators. |
|
WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle,
java.lang.String separators,
boolean suggestUnique)
Builds an wordOracle with the specified SuggestOracle,
separators and specifying weather it suggests words that are already in the list or not. |
|
| Method Summary | |
|---|---|
java.lang.String |
getSeparators()
|
boolean |
getSuggestUnique()
|
com.google.gwt.user.client.ui.SuggestOracle |
getWordOracle()
|
boolean |
isDisplayStringHTML()
|
protected java.util.Set |
parseQueryString(java.lang.String queryString)
Parses the passed query string into a list of tokens, based on the instance separators. |
void |
requestSuggestions(com.google.gwt.user.client.ui.SuggestOracle.Request request,
com.google.gwt.user.client.ui.SuggestOracle.Callback callback)
Returns a list of suggestions for the last word in the list. |
void |
setSeparators(java.lang.String separators)
|
void |
setSuggestUnique(boolean suggestUnique)
|
void |
setWordOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle)
|
| Methods inherited from class com.google.gwt.user.client.ui.SuggestOracle |
|---|
requestDefaultSuggestions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected com.google.gwt.user.client.ui.SuggestOracle wordOracle
protected java.lang.String separators
protected boolean suggestUnique
| Constructor Detail |
|---|
public WordListSuggestOracle()
SuggestOracle
and the space as a separator.
By default, this oracle generates suggestions that duplicate existing words in the list.
public WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle)
SuggestOracle and
the space as a default separator. By default, this oracle generates suggestions that
duplicate existing words in the list.
wordOracle - the oracle to be used for predicting a single word.
public WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle,
java.lang.String separators)
SuggestOracle
and separators. By default, this oracle generates suggestions that duplicate existing words
in the list.
wordOracle - the wordOracle to be used for predicting a single wordseparators - the separators between the words in the word list
public WordListSuggestOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle,
java.lang.String separators,
boolean suggestUnique)
SuggestOracle,
separators and specifying weather it suggests words that are already in the list or not.
wordOracle - the wordOracle to be used for predicting a single wordseparators - the separators between the words in the word list| Method Detail |
|---|
public void requestSuggestions(com.google.gwt.user.client.ui.SuggestOracle.Request request,
com.google.gwt.user.client.ui.SuggestOracle.Callback callback)
requestSuggestions in class com.google.gwt.user.client.ui.SuggestOraclerequest - callback - protected java.util.Set parseQueryString(java.lang.String queryString)
queryString - the string to parse
public java.lang.String getSeparators()
public void setSeparators(java.lang.String separators)
public boolean isDisplayStringHTML()
isDisplayStringHTML in class com.google.gwt.user.client.ui.SuggestOraclepublic com.google.gwt.user.client.ui.SuggestOracle getWordOracle()
public void setWordOracle(com.google.gwt.user.client.ui.SuggestOracle wordOracle)
public boolean getSuggestUnique()
public void setSuggestUnique(boolean suggestUnique)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||