123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- goog.provide('goog.ui.ac.Remote');
- goog.require('goog.ui.ac.AutoComplete');
- goog.require('goog.ui.ac.InputHandler');
- goog.require('goog.ui.ac.RemoteArrayMatcher');
- goog.require('goog.ui.ac.Renderer');
- goog.ui.ac.Remote = function(url, input, opt_multi, opt_useSimilar) {
- var matcher = new goog.ui.ac.RemoteArrayMatcher(url, !opt_useSimilar);
- this.matcher_ = matcher;
- var renderer = new goog.ui.ac.Renderer();
- var inputhandler = new goog.ui.ac.InputHandler(null, null, !!opt_multi, 300);
- goog.ui.ac.AutoComplete.call(this, matcher, renderer, inputhandler);
- inputhandler.attachAutoComplete(this);
- inputhandler.attachInputs(input);
- };
- goog.inherits(goog.ui.ac.Remote, goog.ui.ac.AutoComplete);
- goog.ui.ac.Remote.prototype.setUseStandardHighlighting = function(
- useStandardHighlighting) {
- this.renderer_.setUseStandardHighlighting(useStandardHighlighting);
- };
- goog.ui.ac.Remote.prototype.getInputHandler = function() {
- return (this.selectionHandler_);
- };
- goog.ui.ac.Remote.prototype.setMethod = function(method) {
- this.matcher_.setMethod(method);
- };
- goog.ui.ac.Remote.prototype.setContent = function(content) {
- this.matcher_.setContent(content);
- };
- goog.ui.ac.Remote.prototype.setHeaders = function(headers) {
- this.matcher_.setHeaders(headers);
- };
- goog.ui.ac.Remote.prototype.setTimeoutInterval = function(interval) {
- this.matcher_.setTimeoutInterval(interval);
- };
|