org.eaglei.suggest.client
Class AbstractSearchBox

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.Composite
              extended by org.eaglei.suggest.client.AbstractSearchBox
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public abstract class AbstractSearchBox
extends com.google.gwt.user.client.ui.Composite


Nested Class Summary
static interface AbstractSearchBox.SearchHandler
          Add a search handler which will be called when a search should be executed.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
protected  com.google.gwt.user.client.ui.SuggestBox sbSearch
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
AbstractSearchBox(java.lang.String suggestBaseURL, java.lang.String style)
           
AbstractSearchBox(com.google.gwt.user.client.ui.SuggestOracle oracle, java.lang.String style)
           
 
Method Summary
 void addSearchHandler(AbstractSearchBox.SearchHandler handler, boolean notifyOnListSelect, boolean notifyOnEnter)
           
 void addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<com.google.gwt.user.client.ui.SuggestOracle.Suggestion> handler)
           
abstract  java.lang.String getDefaultText()
           
abstract  java.lang.String getSearchBaseURL()
           
 AbstractSearchBox.SearchHandler getSearchHandler()
           
protected  SearchSuggestion getSuggestMatch()
          Checks whether the current text matches an item in the suggest list.
 java.lang.String getText()
          Trims leading/trailing whitespace.
 void setDefaultText()
           
 void setText(java.lang.String text)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sbSearch

protected final com.google.gwt.user.client.ui.SuggestBox sbSearch
Constructor Detail

AbstractSearchBox

public AbstractSearchBox(java.lang.String suggestBaseURL,
                         java.lang.String style)

AbstractSearchBox

public AbstractSearchBox(com.google.gwt.user.client.ui.SuggestOracle oracle,
                         java.lang.String style)
Method Detail

getSearchHandler

public AbstractSearchBox.SearchHandler getSearchHandler()

addSelectionHandler

public void addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<com.google.gwt.user.client.ui.SuggestOracle.Suggestion> handler)

addSearchHandler

public void addSearchHandler(AbstractSearchBox.SearchHandler handler,
                             boolean notifyOnListSelect,
                             boolean notifyOnEnter)

getSuggestMatch

protected SearchSuggestion getSuggestMatch()
Checks whether the current text matches an item in the suggest list.

Returns:
SearchSuggestion or null

getDefaultText

public abstract java.lang.String getDefaultText()

getSearchBaseURL

public abstract java.lang.String getSearchBaseURL()

getText

public java.lang.String getText()
Trims leading/trailing whitespace. Returns an empty string if the current text is the default string.

Returns:

setDefaultText

public void setDefaultText()

setText

public void setText(java.lang.String text)


Copyright © 2009-2011 Eagle-I. All Rights Reserved.