|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.STextComponent
org.wings.STextField
org.wingx.XSuggest
public class XSuggest
Enhanced STextField that supports the user input by displaying suggestions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.wingx.XSuggestDataSource |
|---|
XSuggestDataSource.Entry |
| Field Summary |
|---|
| Fields inherited from class org.wings.STextField |
|---|
actionCommand, columns, maxColumns |
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
XSuggest()
Creates a text field that can display suggestions. |
|
XSuggest(String text)
Creates a text field that can display suggestions. |
|
| Method Summary | |
|---|---|
List<Map.Entry<String,String>> |
generateSuggestions(String lookupText)
Obtaines the list of suggestions from the data source, if there is one. |
XSuggestDataSource |
getDataSource()
returns the currently used data source |
int |
getInputDelay()
|
SDimension |
getSuggestBoxWidth()
|
int |
getTimeout()
|
void |
processLowLevelEvent(String action,
String[] values)
Deliver low level/http events (parameters). |
void |
setDataSource(XSuggestDataSource source)
set a new data source from which suggestions are generated |
void |
setInputDelay(int delay)
Fast typists can produce a lot of requests in a short time; this delay limits the requests to a certain time. |
void |
setSuggestBoxWidth(SDimension dim)
Configures the width of the suggest box. |
void |
setTimeout(int timeout)
Set Ajax request timeout. |
| Methods inherited from class org.wings.STextField |
|---|
addActionListener, fireActionEvent, fireActionPerformed, fireFinalEvents, getActionCommand, getActionListeners, getColumns, getMaxColumns, removeActionListener, setActionCommand, setCG, setColumns, setMaxColumns |
| Methods inherited from class org.wings.STextComponent |
|---|
addDocumentListener, append, changedUpdate, fireIntermediateEvents, getDocument, getDocumentListeners, getText, insertUpdate, isEditable, isEpochCheckEnabled, removeDocumentListener, removeUpdate, setDocument, setEditable, setEpochCheckEnabled, setText |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wings.LowLevelEventListener |
|---|
getLowLevelEventId, getName, isEnabled |
| Constructor Detail |
|---|
public XSuggest()
public XSuggest(String text)
text - initial content of the text field| Method Detail |
|---|
public void setDataSource(XSuggestDataSource source)
source - public XSuggestDataSource getDataSource()
setDataSource(XSuggestDataSource source)public void setTimeout(int timeout)
timeout - in mspublic int getTimeout()
setTimeout(int timeout)public void setInputDelay(int delay)
delay - in mspublic int getInputDelay()
setInputDelay(int delay)public void setSuggestBoxWidth(SDimension dim)
SDimension.AUTO automatically set the size in accordance to the content (default)SDimension.INHERIT inherits width from the suggest input box
dim - width of suggest box, height is ignoredpublic SDimension getSuggestBoxWidth()
public List<Map.Entry<String,String>> generateSuggestions(String lookupText)
generateSuggestions in interface XSuggestDataSourcelookupText -
{org.wingx.XSuggestDataSource.generateSugestions()}
public void processLowLevelEvent(String action,
String[] values)
LowLevelEventListener
processLowLevelEvent in interface LowLevelEventListenerprocessLowLevelEvent in class STextComponentaction - the name-value-pair's namevalues - the name-value-pair's values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||