The goog.ui.AutoComplete.Remote Class

goog.ui.AutoComplete.Remote
> goog.ui.ac.AutoComplete
> goog.events.EventTarget
> goog.Disposable

.addEventListener(type, handler, opt_capture, opt_handlerScope)

Inherited from goog.events.EventTarget .

Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched. Supported for legacy but use goog.events.listen(src, type, handler) instead.

type {string}
The type of the event to listen for.
handler {Function|Object}
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture {boolean=}
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope {Object=}
Object in whose scope to call the listener.

.addOnDisposeCallback(callback, opt_scope)

Inherited from goog.Disposable .

Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.

callback {!Function}
The callback function.
opt_scope {Object=}
An optional scope to call the callback in.

.attachInputWithAnchor(inputElement, anchorElement)

Inherited from goog.ui.ac.AutoComplete .

Attaches the autocompleter to a text area or text input element with an anchor element. The anchor element is the element the autocomplete box will be positioned against.

inputElement {Element}
The input element. May be 'textarea', text 'input' element, or any other element that exposes similar interface.
anchorElement {Element}
The anchor element.

.attachInputs(var_args)

Inherited from goog.ui.ac.AutoComplete .

Attach text areas or input boxes to the autocomplete by DOM reference. After elements are attached to the autocomplete, when a user types they will see the autocomplete drop down.

var_args {...Element}
Variable args: Input or text area elements to attach the autocomplete too.

.cancelDelayedDismiss()

Inherited from goog.ui.ac.AutoComplete .

Cancel the active delayed dismiss if there is one.

.creationStack {string}

Inherited from goog.Disposable .

If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.

.detachInputs(var_args)

Inherited from goog.ui.ac.AutoComplete .

Detach text areas or input boxes to the autocomplete by DOM reference.

var_args {...Element}
Variable args: Input or text area elements to detach from the autocomplete.

.dismiss()

Inherited from goog.ui.ac.AutoComplete .

Clears out the token, rows, and hilite, and calls renderer.dismiss()

.dismissOnDelay()

Inherited from goog.ui.ac.AutoComplete .

Call a dismiss after a delay, if there's already a dismiss active, ignore.

.dispatchEvent(e)

Inherited from goog.events.EventTarget .

Dispatches an event (or event like object) and calls all listeners listening for events of this type. The type of the event is decided by the type property on the event object. If any of the listeners returns false OR calls preventDefault then this function will return false. If one of the capture listeners calls stopPropagation, then the bubble listeners won't fire.

e {string|Object|goog.events.Event}
Event object.
returns {boolean}
If anyone called preventDefault on the event object (or if any of the handlers returns false this will also return false.

.dispose()

Inherited from goog.Disposable .

Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.

returns {void}
Nothing.

.getParentEventTarget()

Inherited from goog.events.EventTarget .

Returns the parent of this event target to use for bubbling.

returns {goog.events.EventTarget}
The parent EventTarget or null if there is no parent.

.getRenderer()

Inherited from goog.ui.ac.AutoComplete .

Returns the renderer that renders/shows/highlights/hides the autocomplete menu.

returns {goog.events.EventTarget}
Renderer used by the this widget.

.getRowCount()

Inherited from goog.ui.ac.AutoComplete .

returns {number}
Number of rows in the autocomplete.

.getTarget()

Inherited from goog.ui.ac.AutoComplete .

Gets the current target HTML node for displaying autocomplete UI.

returns {Element}
The current target HTML node for displaying autocomplete UI.

.handleEvent(e)

Inherited from goog.ui.ac.AutoComplete .

Generic event handler that handles any events this object is listening to.

e {goog.events.Event}
Event Object.

.hasHighlight()

Inherited from goog.ui.ac.AutoComplete .

Returns whether or not the autocomplete is open and has a highlighted row.

returns {boolean}
Whether an autocomplete row is highlighted.

.hiliteId(id)

Inherited from goog.ui.ac.AutoComplete .

Hilites the id if it's valid, otherwise does nothing.

id {number}
A row id (not index).
returns {boolean}
Whether the id was hilited.

.hiliteIndex(index)

Inherited from goog.ui.ac.AutoComplete .

Hilites the index, if it's valid, otherwise does nothing.

index {number}
The row's index.
returns {boolean}
Whether the index was hilited.

.hiliteNext()

Inherited from goog.ui.ac.AutoComplete .

Moves the hilite to the next row, or does nothing if we're already at the end of the current set of matches. Calls renderer.hiliteId() when there's something to do.

returns {boolean}
Returns true on a successful hilite.

.hilitePrev()

Inherited from goog.ui.ac.AutoComplete .

Moves the hilite to the previous row, or does nothing if we're already at the beginning of the current set of matches. Calls renderer.hiliteId() when there's something to do.

returns {boolean}
Returns true on a successful hilite.

.isDisposed()

Inherited from goog.Disposable .

returns {boolean}
Whether the object has been disposed of.

.isOpen()

Inherited from goog.ui.ac.AutoComplete .

returns {boolean}
Whether the autocomplete's renderer is open.

.registerDisposable(disposable)

Inherited from goog.Disposable .

Associates a disposable object with this object so that they will be disposed together.

disposable {goog.disposable.IDisposable}
that will be disposed when this object is disposed.

.removeEventListener(type, handler, opt_capture, opt_handlerScope)

Inherited from goog.events.EventTarget .

Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.

type {string}
The type of the event to listen for.
handler {Function|Object}
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture {boolean=}
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope {Object=}
Object in whose scope to call the listener.

.renderRows(rows, opt_options)

Inherited from goog.ui.ac.AutoComplete .

Renders the rows and adds highlighting.

rows {!Array}
Set of data that match the given token.
opt_options {(boolean|goog.ui.ac.RenderOptions)=}
If true, keeps the currently hilited (by index) element hilited. If false not. Otherwise a RenderOptions object.

.selectHilited()

Inherited from goog.ui.ac.AutoComplete .

If there are any current matches, this passes the hilited row data to selectionHandler.selectRow()

returns {boolean}
Whether there are any current matches.

.setAllowFreeSelect(allowFreeSelect)

Inherited from goog.ui.ac.AutoComplete .

Sets whether or not the up/down arrow can unhilite all rows.

allowFreeSelect {boolean}
true iff the up arrow can unhilite all rows.

.setAutoHilite(autoHilite)

Inherited from goog.ui.ac.AutoComplete .

Sets whether or not the first row should be highlighted by default.

autoHilite {boolean}
true iff the first row should be highlighted by default.

.setMaxMatches(max)

Inherited from goog.ui.ac.AutoComplete .

Sets the max number of matches to fetch from the Matcher.

max {number}
Max number of matches.

.setParentEventTarget(parent)

Inherited from goog.events.EventTarget .

Sets the parent of this event target to use for bubbling.

parent {goog.events.EventTarget?}
Parent EventTarget (null if none).

.setTarget(target)

Inherited from goog.ui.ac.AutoComplete .

Sets the current target HTML node for displaying autocomplete UI. Can be an implementation specific definition of how to display UI in relation to the target node. This target will be passed into renderer.renderRows()

target {Element}
The current target HTML node for displaying autocomplete UI.

.setToken(token, opt_fullString)

Inherited from goog.ui.ac.AutoComplete .

Sets the token to match against. This triggers calls to the Matcher to fetch the matches (up to maxMatches), and then it triggers a call to renderer.renderRows().

token {string}
The string for which to search in the Matcher.
opt_fullString {string=}
Optionally, the full string in the input field.

.setTriggerSuggestionsOnUpdate(triggerSuggestionsOnUpdate)

Inherited from goog.ui.ac.AutoComplete .

Sets whether or not to request new suggestions immediately after completion of a suggestion.

triggerSuggestionsOnUpdate {boolean}
true iff completion should fetch new suggestions.

.setWrap(wrap)

Inherited from goog.ui.ac.AutoComplete .

Sets whether or not selections can wrap around the edges.

wrap {boolean}
true iff sections should wrap around the edges.

.update(opt_force)

Inherited from goog.ui.ac.AutoComplete .

Forces an update of the display.

opt_force {boolean=}
Whether to force an update.