goog.structs.Map
interface.
goog.structs.Map | |
goog.ui.Dialog.ButtonSet | goog.structs.Map |
opt_domHelper
: goog.dom.DomHelper=
Optional DOM helper; see
goog.ui.Component for semantics. |
Adds a button (an object with a key and caption) to this button set. Buttons
will be displayed in the order they are added.
Arguments:
Returns: !goog.ui.Dialog.ButtonSet
The button set, to make it easy to chain
"addButton" calls and build new ButtonSets.
|
code » | |||||
![]()
Attaches the button set to an element, rendering it inside.
Arguments:
|
code » | |||||
![]()
Decorates the given element by adding any
button elements found
among its descendants to the button set. The first button found is assumed
to be the default and will receive focus when the button set is rendered.
If a button with a name of goog.ui.Dialog.DefaultButtonKeys.CANCEL
is found, it is assumed to have "Cancel" semantics.
TODO(attila): ButtonSet should be a goog.ui.Component. Really.
Arguments:
|
code » | |||||
![]()
Returns all the HTML Button elements in the button set container.
Returns: !NodeList
A live NodeList of the buttons.
|
code » | |||||
Returns the HTML Button element.
|
code » | |||||
Returns the cancel button.
Returns: ?string
The cancel button.
|
code » | |||||
Returns the default button.
Returns: ?string
The default button.
|
code » | |||||
Returns the dom helper that is being used on this component.
Returns: !goog.dom.DomHelper
The dom helper used on this component.
TODO(user): Remove after refactoring to goog.ui.Component.
|
code » | |||||
Gets the component's element.
Returns: Element
The element for the component.
TODO(user): Remove after refactoring to goog.ui.Component.
|
code » | |||||
![]()
Renders the button set inside its container element.
|
code » | |||||
Adds a button to the button set. Buttons will be displayed in the order they
are added.
Arguments:
Returns: !goog.ui.Dialog.ButtonSet
The button set, to make it easy to chain
"set" calls and build new ButtonSets.
|
code » | |||||
![]()
Enables or disables all of the buttons in this set.
Arguments:
|
code » | |||||
![]()
Enables or disables a button in this set by key. If the button is not found,
does nothing.
|
code » | |||||
![]()
Sets the cancel button.
Arguments:
|
code » | |||||
![]()
Sets the default button.
Arguments:
|
code » |
Returns an iterator that iterates over the values or the keys in the map.
This throws an exception if the map was mutated since the iterator was
created.
Arguments:
Returns: !goog.iter.Iterator
An iterator over the values or keys in the map.
|
code » | |||
![]()
Adds multiple key-value pairs from another goog.structs.Map or Object.
Arguments:
|
code » | |||
![]()
Cleans up the temp keys array by removing entries that are no longer in the
map.
|
code » | |||
![]()
Removes all key-value pairs from the map.
|
code » | |||
Clones a map and returns a new map.
Returns: !goog.structs.Map
A new map with the same key-value pairs.
|
code » | |||
Whether the map contains the given key.
Arguments:
Returns: boolean
Whether the map contains the key.
|
code » | |||
Whether the map contains the given value. This is O(n).
Arguments:
Returns: boolean
Whether the map contains the value.
|
code » | |||
Whether this map is equal to the argument map.
Arguments:
Returns: boolean
Whether the maps are equal.
|
code » | |||
![]()
Calls the given function on each entry in the map.
Arguments:
|
code » | |||
![]()
Returns the value for the given key. If the key is not found and the default
value is not given this will return
undefined .
Arguments:
Returns: V | DEFAULT
The value for the given key.
|
code » | |||
No description.
Returns: number
The number of key-value pairs in the map.
|
code » | |||
Returns an iterator that iterates over the keys in the map. Removal of keys
while iterating might have undesired side effects.
Returns: !goog.iter.Iterator
An iterator over the keys in the map.
|
code » | |||
Returns the keys of the map.
|
code » | |||
Returns an iterator that iterates over the values in the map. Removal of
keys while iterating might have undesired side effects.
Returns: !goog.iter.Iterator
An iterator over the values in the map.
|
code » | |||
Returns the values of the map.
|
code » | |||
No description.
Returns: boolean
Whether the map is empty.
|
code » | |||
Removes a key-value pair based on the key. This is O(logN) amortized due to
updating the keys array whenever the count becomes half the size of the keys
in the keys array.
Arguments:
Returns: boolean
Whether object was removed.
|
code » | |||
![]()
Adds a key-value pair to the map.
Arguments:
Returns: *
Some subclasses return a value.
|
code » | |||
No description.
Returns: !Object
Object representation of the map.
|
code » | |||
Returns a new map in which all the keys and values are interchanged
(keys become values and values become keys). If multiple keys map to the
same value, the chosen transposed value is implementation-dependent.
It acts very similarly to {goog.object.transpose(Object)}.
Returns: !goog.structs.Map
The transposed map.
|
code » |
![]()
The button whose action is associated with the escape key and the X button
on the dialog.
|
Code » | |
![]()
A CSS className for this component.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
The button that has default focus (references key in buttons_ map).
|
Code » | |
No description.
|
Code » | |
![]()
Optional container the button set should be rendered into.
|
Code » |
![]()
The number of key value pairs in the map.
|
Code » | |
![]()
An array of keys. This is necessary for two reasons:
1. Iterating the keys using for (var key in this.map_) allocates an
object for every key in IE which is really bad for IE6 GC perf.
2. Without a side data structure, we would need to escape all the keys
as that would be the only way we could tell during iteration if the
key was an internal key or a property of the object.
This array can contain deleted keys so it's necessary to check the map
as well to see if the key is still in the map (this doesn't require a
memory allocation in IE).
|
Code » | |
![]()
Underlying JS object used to implement the map.
|
Code » | |
![]()
Version used to detect changes while iterating.
|
Code » |
Creates a new ButtonSet with 'Continue', 'Save', and 'Cancel' (default)
buttons.
Returns: !goog.ui.Dialog.ButtonSet
The created ButtonSet.
|
code » | |
Creates a new ButtonSet with a single 'OK' button, which is also set with
cancel button semantics so that pressing escape will close the dialog.
Returns: !goog.ui.Dialog.ButtonSet
The created ButtonSet.
|
code » | |
Creates a new ButtonSet with 'OK' (default) and 'Cancel' buttons.
Returns: !goog.ui.Dialog.ButtonSet
The created ButtonSet.
|
code » | |
Creates a new ButtonSet with 'Yes' (default) and 'No' buttons.
Returns: !goog.ui.Dialog.ButtonSet
The created ButtonSet.
|
code » | |
Creates a new ButtonSet with 'Yes', 'No' (default), and 'Cancel' buttons.
Returns: !goog.ui.Dialog.ButtonSet
The created ButtonSet.
|
code » |
No description.
|
Code » | |
No description.
|
Code » | |
No description.
|
Code » | |
No description.
|
Code » | |
No description.
|
Code » | |
![]()
No description.
|
Code » |
![]()
The standard buttons (keys associated with captions).
Constants:
|
Code » |