站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

AutoCompleteTextBoxAsync (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.brms.client.common
Class AutoCompleteTextBoxAsync

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.FocusWidget
              extended by com.google.gwt.user.client.ui.TextBoxBase
                  extended by com.google.gwt.user.client.ui.TextBox
                      extended by org.drools.brms.client.common.AutoCompleteTextBoxAsync
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasFocus, com.google.gwt.user.client.ui.HasName, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.KeyboardListener, com.google.gwt.user.client.ui.SourcesChangeEvents, com.google.gwt.user.client.ui.SourcesClickEvents, com.google.gwt.user.client.ui.SourcesFocusEvents, com.google.gwt.user.client.ui.SourcesKeyboardEvents

public class AutoCompleteTextBoxAsync
extends com.google.gwt.user.client.ui.TextBox
implements com.google.gwt.user.client.ui.KeyboardListener

This nifty utility provides auto completion. Drop in replacement for a text box. I recall lifting it from somewhere on http://del.icio.us/michaelneale/GWT, plus some small tweaks. If this gives any back chat, I will shut it down and we can just use a regular text box.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.TextBoxBase
com.google.gwt.user.client.ui.TextBoxBase.TextAlignConstant
 
Field Summary
protected  com.google.gwt.user.client.ui.ListBox choices
           
protected  com.google.gwt.user.client.ui.PopupPanel choicesPopup
           
protected  CompletionItemsAsync items
           
protected  boolean popupAdded
           
protected  boolean visible
           
 
Fields inherited from class com.google.gwt.user.client.ui.TextBoxBase
ALIGN_CENTER, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_RIGHT
 
Fields inherited from interface com.google.gwt.user.client.ui.KeyboardListener
KEY_ALT, KEY_BACKSPACE, KEY_CTRL, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ENTER, KEY_ESCAPE, KEY_HOME, KEY_LEFT, KEY_PAGEDOWN, KEY_PAGEUP, KEY_RIGHT, KEY_SHIFT, KEY_TAB, KEY_UP, MODIFIER_ALT, MODIFIER_CTRL, MODIFIER_SHIFT
 
Constructor Summary
AutoCompleteTextBoxAsync(CompletionItemsAsync comp)
          Default Constructor
 
Method Summary
protected  void complete()
           
protected  void downKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
protected  void enterKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
protected  void escapeKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
 CompletionItemsAsync getCompletionItems()
          Returns the used CompletionItems object
protected  void hideChoicesIfNeeded(String text)
           
 void onKeyDown(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
          Handle events that happen when keys are pressed.
 void onKeyPress(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
          Not used at all
 void onKeyUp(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
          Handle events that happen when keys are released.
protected  void otherKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
 void setCompletionItems(CompletionItemsAsync items)
          Sets an "algorithm" returning completion items You can define your own way how the textbox retrieves autocompletion items by implementing the CompletionItems interface and setting the according object
protected  void tabKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
protected  void updateChoices(String text)
           
protected  void updateChoices(String[] matches, String text)
           
protected  void upKey(com.google.gwt.user.client.ui.Widget arg0, char arg1, int arg2)
           
 
Methods inherited from class com.google.gwt.user.client.ui.TextBox
getMaxLength, getVisibleLength, setMaxLength, setVisibleLength
 
Methods inherited from class com.google.gwt.user.client.ui.TextBoxBase
addChangeListener, addClickListener, addKeyboardListener, cancelKey, getCursorPos, getImpl, getName, getSelectedText, getSelectionLength, getText, onBrowserEvent, removeChangeListener, removeClickListener, removeKeyboardListener, selectAll, setCursorPos, setKey, setName, setSelectionRange, setText, setTextAlignment
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addFocusListener, getFocusImpl, getTabIndex, isEnabled, removeFocusListener, setAccessKey, setEnabled, setFocus, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onDetach, onLoad, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

items

protected CompletionItemsAsync items

popupAdded

protected boolean popupAdded

visible

protected boolean visible

choicesPopup

protected com.google.gwt.user.client.ui.PopupPanel choicesPopup

choices

protected com.google.gwt.user.client.ui.ListBox choices
Constructor Detail

AutoCompleteTextBoxAsync

public AutoCompleteTextBoxAsync(CompletionItemsAsync comp)
Default Constructor

Method Detail

setCompletionItems

public void setCompletionItems(CompletionItemsAsync items)
Sets an "algorithm" returning completion items You can define your own way how the textbox retrieves autocompletion items by implementing the CompletionItems interface and setting the according object

Parameters:
items - CompletionItem implementation
See Also:
SimpleAutoCompletionItem

getCompletionItems

public CompletionItemsAsync getCompletionItems()
Returns the used CompletionItems object

Returns:
CompletionItems implementation

onKeyDown

public void onKeyDown(com.google.gwt.user.client.ui.Widget arg0,
                      char arg1,
                      int arg2)
Handle events that happen when keys are pressed.

Specified by:
onKeyDown in interface com.google.gwt.user.client.ui.KeyboardListener

onKeyPress

public void onKeyPress(com.google.gwt.user.client.ui.Widget arg0,
                       char arg1,
                       int arg2)
Not used at all

Specified by:
onKeyPress in interface com.google.gwt.user.client.ui.KeyboardListener

onKeyUp

public void onKeyUp(com.google.gwt.user.client.ui.Widget arg0,
                    char arg1,
                    int arg2)
Handle events that happen when keys are released.

Specified by:
onKeyUp in interface com.google.gwt.user.client.ui.KeyboardListener

downKey

protected void downKey(com.google.gwt.user.client.ui.Widget arg0,
                       char arg1,
                       int arg2)

upKey

protected void upKey(com.google.gwt.user.client.ui.Widget arg0,
                     char arg1,
                     int arg2)

enterKey

protected void enterKey(com.google.gwt.user.client.ui.Widget arg0,
                        char arg1,
                        int arg2)

tabKey

protected void tabKey(com.google.gwt.user.client.ui.Widget arg0,
                      char arg1,
                      int arg2)

escapeKey

protected void escapeKey(com.google.gwt.user.client.ui.Widget arg0,
                         char arg1,
                         int arg2)

otherKey

protected void otherKey(com.google.gwt.user.client.ui.Widget arg0,
                        char arg1,
                        int arg2)

hideChoicesIfNeeded

protected void hideChoicesIfNeeded(String text)

updateChoices

protected void updateChoices(String text)

updateChoices

protected void updateChoices(String[] matches,
                             String text)

complete

protected void complete()


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.