goog.Disposable | |
goog.events.EventTarget | goog.Disposable |
goog.ui.ac.Renderer | goog.events.EventTarget |
opt_parentNode
: Element=
optional reference to the parent element
that will hold the autocomplete elements. goog.dom.getDocument().body
will be used if this is null.
|
: ?({renderRow
No description.
|
opt_rightAlign
: boolean=
Determines if the autocomplete will always
be right aligned. False by default.
|
opt_useStandardHighlighting
: boolean=
Determines if standard
highlighting should be applied to each row of data. Standard highlighting
bolds every matching substring for a given token in each row. True by
default.
|
![]()
Hide the object.
|
code » | |||
![]()
Disposes of the renderer and its associated HTML.
|
code » | |||
![]()
No description.
Returns: goog.positioning.Corner
The anchor corner to position the popup at.
|
code » | |||
No description.
Returns: Element
The anchor element.
|
code » | |||
No description.
Returns: boolean
Whether the drop down will be autopositioned.
|
code » | |||
Gets the renderer's element.
Returns: Element
The main element that controls the rendered autocomplete.
|
code » | |||
No description.
Returns: boolean
Whether the autocomplete menu should be right aligned.
|
code » | |||
Given an event target looks up through the parents till it finds a div. Once
found it will then look to see if that is one of the childnodes, if it is
then the index is returned, otherwise -1 is returned.
|
code » | |||
No description.
Returns: Element
The target element.
|
code » | |||
Transforms a token into a string ready to be put into the regular expression
in hiliteMatchingText_.
|
code » | |||
No description.
Returns: boolean
Whether we should be aligning to the top of
the target element.
|
code » | |||
![]()
Handle the click events. These are redirected to the AutoComplete object
which then makes a callback to select the correct row.
Arguments:
|
code » | |||
![]()
Handle the mousedown event and prevent the AC from losing focus.
Arguments:
|
code » | |||
![]()
Handle the mousing events. These are redirected to the AutoComplete object
which then makes a callback to set the correctly highlighted row. This is
because the AutoComplete can move the focus as well, and there is no sense
duplicating the code
Arguments:
|
code » | |||
![]()
Sets the 'active' class of the item with a given id.
Arguments:
|
code » | |||
![]()
Goes through a node and all of its child nodes, replacing HTML text that
matches a token with token.
Arguments:
|
code » | |||
![]()
Removes the 'active' class from the currently selected row.
|
code » | |||
![]()
Sets the 'active' class of the nth item.
Arguments:
|
code » | |||
No description.
Returns: boolean
True if the object is visible.
|
code » | |||
![]()
If the main HTML element hasn't been made yet, creates it and appends it
to the parent.
|
code » | |||
![]()
Redraw (or draw if this is the first call) the rendered auto-complete drop
down.
|
code » | |||
![]()
Generic function that takes a row and renders a DOM structure for that row.
Normally this will only be matching a maximum of 20 or so items. Even with
40 rows, DOM this building is fine.
|
code » | |||
Render a row by creating a div and then calling row rendering callback or
default row handler
|
code » | |||
![]()
Render the autocomplete UI
|
code » | |||
![]()
Repositions the auto complete popup relative to the location node, if it
exists and the auto position has been set.
|
code » | |||
![]()
Sets the anchor element for the subsequent call to renderRows.
Arguments:
|
code » | |||
![]()
Sets whether the renderer should try to determine where to position the
drop down.
Arguments:
|
code » | |||
![]()
Set whether or not to highlight all matching tokens rather than just the
first.
Arguments:
|
code » | |||
![]()
No description.
Arguments:
|
code » | |||
![]()
Sets CSS classes on autocomplete conatainer element.
Arguments:
|
code » | |||
![]()
Sets the duration (in msec) of the fade animation when menu is shown/hidden.
Setting to 0 (default) disables animation entirely.
Arguments:
|
code » | |||
![]()
Set whether to align autocomplete to the right of the target element.
Arguments:
|
code » | |||
![]()
No description.
Arguments:
|
code » | |||
![]()
Set whether to align autocomplete to top of target element
Arguments:
|
code » | |||
![]()
Set whether or not standard highlighting should be used when rendering rows.
Arguments:
|
code » | |||
![]()
Sets the width provider element. The provider is only used on redraw and as
such will not automatically update on resize.
Arguments:
|
code » | |||
![]()
Show the object.
|
code » |
![]()
Use
#listen instead, when possible. Otherwise, use
goog.events.listen if you are passing Object
(instead of Function) as handler.
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.
Arguments:
|
code » | |||||
![]()
Asserts that the event target instance is initialized properly.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
Removes listeners from this object. Classes that extend EventTarget may
need to override this method in order to remove references to DOM Elements
and additional listeners.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
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.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
Use
#unlisten instead, when possible. Otherwise, use
goog.events.unlisten if you are passing Object
(instead of Function) as handler.
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.
Arguments:
|
code » | |||||
![]()
Sets the parent of this event target to use for capture/bubble
mechanism.
Arguments:
|
code » | |||||
![]()
Sets the target to be used for
event.target when firing
event. Mainly used for testing. For example, see
goog.testing.events.mixinListenable .
Arguments:
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » |
![]()
Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.
Arguments:
|
code » | |||
![]()
Disposes of the object. If the object hasn't already been disposed of, calls
#disposeInternal . Classes that extend goog.Disposable should
override #disposeInternal in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void
Nothing.
|
code » | |||
![]()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() { mypackage.MyClass.base(this, 'constructor'); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { // Dispose logic specific to MyClass. ... // Call superclass's disposeInternal at the end of the subclass's, like // in C++, to avoid hard-to-catch issues. mypackage.MyClass.base(this, 'disposeInternal'); }; |
code » | |||
Use
#isDisposed instead.
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
![]()
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
![]()
Class name for active row div. This must be a single valid class name.
Active row will have rowClassName & activeClassName &
legacyActiveClassName.
|
Code » | |
![]()
The anchor element to position the rendered autocompleter against.
|
Code » | |
Animation in progress, if any.
|
Code » | |
![]()
Classname for the main element. This must be a single valid class name.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Custom full renderer
|
Code » | |
Dom helper for the parent element's document.
|
Code » | |
![]()
Reference to the main element that controls the rendered autocomplete
|
Code » | |
![]()
Flag to set all tokens as highlighted in the autocomplete row.
|
Code » | |
![]()
Class name for the bold tag highlighting the matched part of the text.
|
Code » | |
![]()
The index of the currently highlighted row
|
Code » | |
![]()
The old class name for active row. This name is deprecated because its
name is generic enough that a typical implementation would require a
descendant selector.
Active row will have rowClassName & activeClassName &
legacyActiveClassName.
|
Code » | |
![]()
Flag to indicate whether matches should be done on whole words instead
of any string.
|
Code » | |
![]()
Duration (in msec) of fade animation when menu is shown/hidden.
Setting to 0 (default) disables animation entirely.
|
Code » | |
![]()
Reference to the parent element that will hold the autocomplete elements
|
Code » | |
![]()
Whether to reposition the autocomplete UI below the target node
|
Code » | |
![]()
Determines if the autocomplete will always be right aligned
|
Code » | |
![]()
Classname for row divs. This must be a single valid class name.
|
Code » | |
![]()
Array of the node divs that hold each result that is being displayed.
|
Code » | |
![]()
Array used to store the current set of rows being displayed
|
Code » | |
![]()
Whether we should limit the dropdown from extending past the bottom of the
screen and instead show a scrollbar on the dropdown.
|
Code » | |
![]()
The time that the rendering of the menu rows started
|
Code » | |
![]()
The current token that has been entered
|
Code » | |
![]()
Whether to align with top of target field
|
Code » | |
![]()
Flag to indicate whether standard highlighting should be applied.
this is set to true if left unspecified to retain existing
behaviour for autocomplete clients
|
Code » | |
![]()
Store the current state for the renderer
|
Code » | |
![]()
The element on which to base the width of the autocomplete.
|
Code » |
The object to use for event.target. Useful when mixing in an
EventTarget to another object.
|
Code » | |
![]()
No description.
|
Code » | |
Maps of event type to an array of listeners.
|
Code » | |
Parent event target, used during event bubbling.
TODO(user): Change this to goog.events.Listenable. This
currently breaks people who expect getParentEventTarget to return
goog.events.EventTarget.
|
Code » |
![]()
The delay before mouseover events are registered, in milliseconds
|
Code » | |
![]()
No description.
|
Code » |