ui.tree.TypeAhead Extends
Constructs a TypeAhead object.

Inheritance

Constructor

goog.ui.tree.TypeAhead()

Instance Methods

Public Protected Private
clear()
Clears the typeahead buffer.
code »
handleNavigation(e) boolean
Handles navigation keys.
Arguments:
e : goog.events.BrowserEvent
The browser event.
Returns: boolean  The handled value.
code »
handleTypeAheadChar(e) boolean
Handles the character presses.
Arguments:
e : goog.events.BrowserEvent
The browser event. Expected event type is goog.events.KeyHandler.EventType.KEY.
Returns: boolean  The handled value.
code »
jumpToLabel_(typeAhead) boolean
Select the first matching node for the given typeahead.
Arguments:
typeAhead : string
Typeahead characters to match.
Returns: boolean  True iff a node is found.
code »
jumpTo_(offset) boolean
Select the next or previous node based on the offset.
Arguments:
offset : goog.ui.tree.TypeAhead.Offset
DOWN or UP.
Returns: boolean  Whether a node is found.
code »
removeNodeFromMap(node)
Removes the given node from the nodemap.
Arguments:
node : goog.ui.tree.BaseNode
Node to be removed.
code »
selectMatchingNode_(nodes) boolean
Given a nodes array reveals and selects the node while using node index.
Arguments:
nodes : ?Array.<goog.ui.tree.BaseNode>
Nodes array to select the node from.
Returns: boolean  Whether a matching node was found.
code »
setNodeInMap(node)
Adds or updates the given node in the nodemap. The label text is used as a key and the node id is used as a value. In the case that the key already exists, such as when more than one node exists with the same label, then this function creates an array to hold the multiple nodes.
Arguments:
node : goog.ui.tree.BaseNode
Node to be added or updated.
code »

Instance Properties

buffer_ :
Buffer for storing typeahead characters.
Code »
matchingLabelIndex_ :
Specifies the current index of the label from the latest typeahead search.
Code »
matchingLabels_ :
Matching labels from the latest typeahead search.
Code »
matchingNodeIndex_ :
Specifies the index into matching nodes when more than one node is found with the same label.
Code »
matchingNodes_ :
Matching nodes from the latest typeahead search. Used when more than one node is present with the same label text.
Code »
nodeMap_ : goog.structs.Trie
Map of tree nodes to allow for quick access by characters in the label text.
Code »

Enumerations

goog.ui.tree.TypeAhead.Offset :
Enum for offset values that are used for ctrl-key navigation among the multiple matches of a given typeahead buffer.
Constants:
DOWN
No description.
UP
No description.
Code »

Package ui.tree

Package Reference