goog.Disposable | |
goog.events.EventTarget | goog.Disposable |
goog.ui.Component | goog.events.EventTarget |
goog.ui.Container | goog.ui.Component |
goog.ui.Menu | goog.ui.Container |
goog.ui.FilteredMenu | goog.ui.Menu |
opt_renderer
: goog.ui.MenuRenderer=
Renderer used to render filtered
menu; defaults to
goog.ui.MenuRenderer . |
opt_domHelper
: goog.dom.DomHelper=
Optional DOM helper.
|
![]()
Updates the content of the given menu item, bolding the part of its caption
from start and through the next len characters.
Arguments:
|
code » | ||||
![]()
No description.
|
code » | ||||
![]()
No description.
|
code » | ||||
![]()
No description.
|
code » | ||||
![]()
Shows/hides elements based on the supplied filter.
Arguments:
|
code » | ||||
No description.
Returns: boolean
Whether multiple items can be entered comma separated.
|
code » | ||||
![]()
No description.
|
code » | ||||
Gets a list of items entered in the search box.
|
code » | ||||
Returns the filter string.
Returns: string
Current filter or an an empty string.
|
code » | ||||
Returns the index of first item that is affected by the filter.
Returns: number
Index of first item that is affected by filter.
|
code » | ||||
Returns the filter input element.
Returns: Element
Input element.
|
code » | ||||
No description.
Returns: string
The filter label.
|
code » | ||||
![]()
Handles filter input events.
Arguments:
|
code » | ||||
Handles the menu's behavior for a key event. The highlighted menu item will
be given the opportunity to handle the key behavior.
Arguments:
Returns: boolean
Whether the event was handled.
|
code » | ||||
Returns whether the specified child should be affected (shown/hidden) by the
filter criteria.
Arguments:
Returns: boolean
Whether the menu item is persistent.
|
code » | ||||
![]()
Helper method that initializes the filter input element.
|
code » | ||||
![]()
Handles clicks on the filter label. Focuses the input element.
Arguments:
|
code » | ||||
![]()
Sets whether multiple items can be entered comma separated.
Arguments:
|
code » | ||||
![]()
Sets the filter string.
Arguments:
|
code » | ||||
![]()
Sets the index of first item that should be affected by the filter. Menu
items with a lower index will not be affected by the filter.
Arguments:
|
code » | ||||
![]()
Sets the filter label (the label displayed in the filter input element if no
text has been entered).
Arguments:
|
code » | ||||
![]()
Sets the highlighted index, unless the HIGHLIGHT event is intercepted and
cancelled. -1 = no highlight. Also scrolls the menu item into view.
Arguments:
|
code » | ||||
![]()
Sets whether the specified child should be affected (shown/hidden) by the
filter criteria.
Arguments:
|
code » | ||||
![]()
Sets up listeners and prepares the filter functionality.
|
code » | ||||
![]()
No description.
|
code » | ||||
![]()
Tears down listeners and resets the filter functionality.
|
code » |
![]()
Use
#addChild instead, with true for the second argument.
Adds a new menu item at the end of the menu.
Arguments:
|
code » | |||
![]()
Use
#addChildAt instead, with true for the third
argument.
Adds a new menu item at a specific index in the menu.
Arguments:
|
code » | |||
![]()
No description.
|
code » | |||
Returns whether the provided element is to be considered inside the menu for
purposes such as dismissing the menu on an event. This is so submenus can
make use of elements outside their own DOM.
|
code » | |||
![]()
Decorate menu items located in any descendent node which as been explicitly
marked as a 'content' node.
Arguments:
|
code » | |||
![]()
No description.
|
code » | |||
No description.
Returns: boolean
Whether the menu can automatically move focus to its key
event target when it is set to visible.
|
code » | |||
No description.
Returns: boolean
Whether the menu will highlight disabled menu items or skip
to the next active item.
|
code » | |||
Use getRenderer().getCssClass().
Returns the CSS class applied to menu elements, also used as the prefix for
derived styles, if any. Subclasses should override this method as needed.
Considered protected.
Returns: string
The CSS class applied to menu elements.
|
code » | |||
Use
#getChildAt instead.
Returns a reference to the menu item at a given index.
Arguments:
Returns: goog.ui.MenuHeader | goog.ui.MenuItem | goog.ui.MenuSeparator | null
Reference to the menu item.
|
code » | |||
Use
#getChildCount instead.
Returns the number of items in the menu (including separators).
Returns: number
The number of items in the menu.
|
code » | |||
Use getChildAt, forEachChild, and getChildCount.
Returns an array containing the menu items contained in the menu.
|
code » | |||
Gets the page offset of the menu, or null if the menu isn't visible
Returns: ?goog.math.Coordinate
Object holding the x-y coordinates of the
menu or null if the menu is not visible.
|
code » | |||
![]()
No description.
|
code » | |||
![]()
No description.
|
code » | |||
Highlights the next item that begins with the specified string. If no
(other) item begins with the given string, the selection is unchanged.
|
code » | |||
![]()
Use
#removeChild instead.
Removes an item from the menu and disposes of it.
Arguments:
|
code » | |||
![]()
Use
#removeChildAt instead.
Removes a menu item at a given index in the menu and disposes of it.
Arguments:
|
code » | |||
![]()
Sets whether the menu can automatically move focus to its key event target
when it is set to visible.
Arguments:
|
code » | |||
![]()
Sets whether the menu will highlight disabled menu items or skip to the next
active item.
Arguments:
|
code » | |||
![]()
No description.
|
code » | |||
![]()
Sets the position of the menu relative to the view port.
Arguments:
|
code » | |||
![]()
No description.
Arguments:
|
code » |
![]()
Adds the specified control as the last child of this container. See
goog.ui.Container#addChildAt for detailed semantics.
Arguments:
|
code » | ||||
![]()
Adds the control as a child of this container at the given 0-based index.
Overrides
goog.ui.Component#addChildAt by also updating the
container's highlight index. Since goog.ui.Component#addChild uses
#addChildAt internally, we only need to override this method.
Arguments:
|
code » | ||||
Returns true if the given element can be decorated by this container.
Overrides
goog.ui.Component#canDecorate .
|
code » | ||||
Returns whether the given item can be highlighted.
Arguments:
Returns: boolean
Whether the item can be highlighted.
|
code » | ||||
![]()
Creates the container's DOM.
|
code » | ||||
![]()
Decorates the given element with this container. Overrides
goog.ui.Component#decorateInternal . Considered protected.
Arguments:
|
code » | ||||
![]()
No description.
|
code » | ||||
![]()
Sets up listening for events applicable to focusable containers.
Arguments:
|
code » | ||||
![]()
Configures the container after its DOM has been rendered, and sets up event
handling. Overrides
goog.ui.Component#enterDocument .
|
code » | ||||
![]()
Cleans up the container before its DOM is removed from the document, and
removes event handlers. Overrides
goog.ui.Component#exitDocument .
|
code » | ||||
Overrides
goog.ui.Container#getChild to make it clear that it
only returns goog.ui.Control s.
Arguments:
Returns: goog.ui.Control
The child with the given ID; null if none.
|
code » | ||||
Overrides
goog.ui.Container#getChildAt to make it clear that it
only returns goog.ui.Control s.
Arguments:
Returns: goog.ui.Control
The child with the given ID; null if none.
|
code » | ||||
Returns the DOM element into which child components are to be rendered,
or null if the container itself hasn't been rendered yet. Overrides
goog.ui.Component#getContentElement by delegating to the renderer.
Returns: Element
Element to contain child elements (null if none).
|
code » | ||||
Returns the currently highlighted item (if any).
Returns: ?goog.ui.Control
Highlighted item (null if none).
|
code » | ||||
Returns the index of the currently highlighted item (-1 if none).
Returns: number
Index of the currently highlighted item.
|
code » | ||||
Returns the DOM element on which the container is listening for keyboard
events (null if none).
Returns: Element
Element on which the container is listening for key
events.
|
code » | ||||
Returns the keyboard event handler for this container, lazily created the
first time this method is called. The keyboard event handler listens for
keyboard events on the container's key event target, as determined by its
renderer.
Returns: !goog.events.KeyHandler
Keyboard event handler for this container.
|
code » | ||||
Returns the currently open (expanded) control in the container (null if
none).
Returns: ?goog.ui.Control
The currently open control.
|
code » | ||||
![]()
Returns the container's orientation.
Returns: ?goog.ui.Container.Orientation
Container orientation.
|
code » | ||||
Returns the child control that owns the given DOM node, or null if no such
control is found.
Arguments:
Returns: ?goog.ui.Control
Control hosted in the container to which the node
belongs (if found).
|
code » | ||||
Returns the renderer used by this container to render itself or to decorate
an existing element.
Returns: goog.ui.ContainerRenderer
Renderer used by the container.
|
code » | ||||
![]()
Handles blur events raised when the container's key event target loses
keyboard focus. The default implementation clears the highlight index.
Arguments:
|
code » | ||||
![]()
Handles mouse events originating from nodes belonging to the controls hosted
in the container. Locates the child control based on the DOM node that
dispatched the event, and forwards the event to the control for handling.
Arguments:
|
code » | ||||
![]()
Handles CLOSE events dispatched by items in the container when they are
closed.
Arguments:
|
code » | ||||
![]()
Handles mouseup events over the document. The default implementation
clears the "mouse button pressed" flag.
Arguments:
|
code » | ||||
Handles ENTER events raised by child controls when they are navigated to.
Arguments:
Returns: boolean
Whether to prevent handleMouseOver from handling
the event.
|
code » | ||||
![]()
Handles focus events raised when the container's key event target receives
keyboard focus.
Arguments:
|
code » | ||||
![]()
Handles HIGHLIGHT events dispatched by items in the container when
they are highlighted.
Arguments:
|
code » | ||||
Attempts to handle a keyboard event, if the control is enabled, by calling
handleKeyEventInternal . Considered protected; should only be used
within this package and by subclasses.
Arguments:
Returns: boolean
Whether the key event was handled.
|
code » | ||||
Attempts to handle a keyboard event; returns true if the event was handled,
false otherwise. If the container is enabled, and a child is highlighted,
calls the child control's
handleKeyEvent method to give the control
a chance to handle the event first.
Arguments:
Returns: boolean
Whether the event was handled by the container (or one of
its children).
|
code » | ||||
![]()
Handles mousedown events over the container. The default implementation
sets the "mouse button pressed" flag and, if the container is focusable,
grabs keyboard focus.
Arguments:
|
code » | ||||
![]()
Handles OPEN events dispatched by items in the container when they are
opened.
Arguments:
|
code » | ||||
![]()
Handles UNHIGHLIGHT events dispatched by items in the container when
they are unhighlighted.
Arguments:
|
code » | ||||
![]()
Highlights the first highlightable item in the container
|
code » | ||||
Helper function that manages the details of moving the highlight among
child controls in response to keyboard events.
|
code » | ||||
![]()
Highlights the last highlightable item in the container.
|
code » | ||||
![]()
Highlights the next highlightable item (or the first if nothing is currently
highlighted).
|
code » | ||||
![]()
Highlights the previous highlightable item (or the last if nothing is
currently highlighted).
|
code » | ||||
Returns true if the container is enabled, false otherwise.
Returns: boolean
Whether the container is enabled.
|
code » | ||||
Returns true if the container is focusable, false otherwise. The default
is true. Focusable containers always have a tab index and allocate a key
handler to handle keyboard events while focused.
Returns: boolean
Whether the component is focusable.
|
code » | ||||
Returns true if the container allows children to be focusable, false
otherwise. Only effective if the container is not focusable.
Returns: boolean
Whether children should be focusable.
|
code » | ||||
Returns true if the mouse button is pressed, false otherwise.
Returns: boolean
Whether the mouse button is pressed.
|
code » | ||||
No description.
Returns: boolean
Whether highlighting a child component should also open it.
|
code » | ||||
Returns true if the container's visibility is set to visible, false if
it is set to hidden. A container that is set to hidden is guaranteed
to be hidden from the user, but the reverse isn't necessarily true.
A container may be set to visible but can otherwise be obscured by another
element, rendered off-screen, or hidden using direct CSS manipulation.
Returns: boolean
Whether the container is set to be visible.
|
code » | ||||
![]()
Creates a DOM ID for the child control and registers it to an internal
hash table to be able to find it fast by id.
Arguments:
|
code » | ||||
Removes a child control. Overrides
goog.ui.Component#removeChild by
updating the highlight index. Since goog.ui.Component#removeChildAt
uses #removeChild internally, we only need to override this method.
Arguments:
Returns: goog.ui.Control
The removed control, if any.
|
code » | ||||
![]()
Enables/disables the container based on the
enable argument.
Dispatches an ENABLED or DISABLED event prior to changing
the container's state, which may be caught and canceled to prevent the
container from changing state. Also enables/disables child controls.
Arguments:
|
code » | ||||
![]()
Sets whether the container is focusable. The default is true. Focusable
containers always have a tab index and allocate a key handler to handle
keyboard events while focused.
Arguments:
|
code » | ||||
![]()
Sets whether the container allows children to be focusable, false
otherwise. Only effective if the container is not focusable.
Arguments:
|
code » | ||||
![]()
Highlights the given item if it exists and is a child of the container;
otherwise un-highlights the currently highlighted item.
Arguments:
|
code » | ||||
![]()
Highlights the item at the given 0-based index (if any). If another item
was previously highlighted, it is un-highlighted.
Arguments:
|
code » | ||||
![]()
Helper method that sets the highlighted index to the given index in response
to a keyboard event. The base class implementation simply calls the
#setHighlightedIndex method, but subclasses can override this
behavior as needed.
Arguments:
|
code » | ||||
![]()
Attaches an element on which to listen for key events.
Arguments:
|
code » | ||||
![]()
Sets or clears the "mouse button pressed" flag.
Arguments:
|
code » | ||||
![]()
Sets whether highlighting a child component should also open it.
Arguments:
|
code » | ||||
![]()
Sets the container's orientation.
Arguments:
|
code » | ||||
![]()
Registers the given renderer with the container. Changing renderers after
the container has already been rendered or decorated is an error.
Arguments:
|
code » | ||||
Shows or hides the container. Does nothing if the container already has
the requested visibility. Otherwise, dispatches a SHOW or HIDE event as
appropriate, giving listeners a chance to prevent the visibility change.
|
code » |
![]()
Adds the specified component as the last child of this component. See
goog.ui.Component#addChildAt for detailed semantics.
Arguments:
|
code » | ||||
![]()
Adds the specified component as a child of this component at the given
0-based index.
Both
addChild and addChildAt assume the following contract
between parent and child components:
parent.addChild(child) will throw an error if the
child component is already in the document, but the parent isn't.
Clients of this API may call addChild and addChildAt with
opt_render set to true. If opt_render is true, calling these
methods will automatically render the child component's element into the
parent component's element. If the parent does not yet have an element, then
createDom will automatically be invoked on the parent before
rendering the child.
Invoking parent.addChild(child, true) will throw an error if the
child component is already in the document, regardless of the parent's DOM
state.
If opt_render is true and the parent component is not already
in the document, enterDocument will not be called on this component
at this point.
Finally, this method also throws an error if the new child already has a
different parent, or the given index is out of bounds.
Arguments:
Returns: void
Nada.
|
code » | ||||
Determines if a given element can be decorated by this type of component.
This method should be overridden by inheriting objects.
|
code » | ||||
![]()
Creates the initial DOM representation for the component. The default
implementation is to set this.element_ = div.
|
code » | ||||
![]()
Decorates the element for the UI component. If the element is in the
document, the enterDocument method will be called.
If goog.ui.Component.ALLOW_DETACHED_DECORATION is false, the caller must
pass an element that is in the document.
Arguments:
|
code » | ||||
![]()
Actually decorates the element. Should be overridden by inheriting objects.
This method can assume there are checks to ensure the component has not
already been rendered have occurred and that enter document will be called
afterwards. This method is considered protected.
Arguments:
|
code » | ||||
![]()
Disposes of the component. Calls
exitDocument , which is expected to
remove event handlers and clean up the component. Propagates the call to
the component's children, if any. Removes the component's DOM from the
document unless it was decorated.
|
code » | ||||
![]()
Called when the component's element is known to be in the document. Anything
using document.getElementById etc. should be done at this stage.
If the component contains child components, this call is propagated to its
children.
|
code » | ||||
![]()
Called by dispose to clean up the elements and listeners created by a
component, or by a parent component/application who has removed the
component from the document but wants to reuse it later.
If the component contains child components, this call is propagated to its
children.
It should be possible for the component to be rendered again once this method
has been called.
|
code » | ||||
![]()
Calls the given function on each of this component's children in order. If
opt_obj is provided, it will be used as the 'this' object in the
function when called. The function should take two arguments: the child
component and its 0-based index. The return value is ignored.
Arguments:
|
code » | ||||
Returns the child with the given ID, or null if no such child exists.
Arguments:
Returns: ?goog.ui.Component
The child with the given ID; null if none.
|
code » | ||||
Returns the child at the given index, or null if the index is out of bounds.
Arguments:
Returns: ?goog.ui.Component
The child at the given index; null if none.
|
code » | ||||
Returns the number of children of this component.
Returns: number
The number of children.
|
code » | ||||
Returns an array containing the IDs of the children of this component, or an
empty array if the component has no children.
|
code » | ||||
Returns the DOM element into which child components are to be rendered,
or null if the component itself hasn't been rendered yet. This default
implementation returns the component's root element. Subclasses with
complex DOM structures must override this method.
Returns: Element
Element to contain child elements (null if none).
|
code » | ||||
Returns the dom helper that is being used on this component.
Returns: !goog.dom.DomHelper
The dom helper used on this component.
|
code » | ||||
Gets the component's element.
Returns: Element
The element for the component.
|
code » | ||||
Returns the first element in this component's DOM with the provided
className.
|
code » | ||||
Helper function for returning an element in the document with a unique id
generated using makeId().
|
code » | ||||
Gets the component's element. This differs from getElement in that
it assumes that the element exists (i.e. the component has been
rendered/decorated) and will cause an assertion error otherwise (if
assertion is enabled).
Returns: !Element
The element for the component.
|
code » | ||||
![]()
Returns an array of all the elements in this component's DOM with the
provided className.
Arguments:
Returns: !goog.array.ArrayLike
The items found with the class name provided.
|
code » | ||||
Helper function for returning the fragment portion of an id generated using
makeId().
|
code » | ||||
Returns the event handler for this component, lazily created the first time
this method is called.
|
code » | ||||
Gets the unique ID for the instance of this component. If the instance
doesn't already have an ID, generates one on the fly.
Returns: string
Unique component ID.
|
code » | ||||
![]()
Returns the model associated with the UI component.
Returns: *
The model.
|
code » | ||||
Returns the component's parent, if any.
Returns: ?goog.ui.Component
The parent component.
|
code » | ||||
Similar to
getElementByClass except that it expects the
element to be present in the dom thus returning a required value. Otherwise,
will assert.
|
code » | ||||
Returns true if the component has children.
Returns: boolean
True if the component has children.
|
code » | ||||
Returns the 0-based index of the given child component, or -1 if no such
child is found.
Arguments:
Returns: number
0-based index of the child component; -1 if not found.
|
code » | ||||
Determines whether the component has been added to the document.
Returns: boolean
TRUE if rendered. Otherwise, FALSE.
|
code » | ||||
Returns true if the component is rendered right-to-left, false otherwise.
The first time this function is invoked, the right-to-left rendering property
is set if it has not been already.
Returns: boolean
Whether the control is rendered right-to-left.
|
code » | ||||
Helper function for subclasses that gets a unique id for a given fragment,
this can be used by components to generate unique string ids for DOM
elements.
|
code » | ||||
Makes a collection of ids. This is a convenience method for makeId. The
object's values are the id fragments and the new values are the generated
ids. The key will remain the same.
|
code » | ||||
Removes the given child from this component, and returns it. Throws an error
if the argument is invalid or if the specified child isn't found in the
parent component. The argument can either be a string (interpreted as the
ID of the child component to remove) or the child component itself.
If
opt_unrender is true, calls goog.ui.component#exitDocument
on the removed child, and subsequently detaches the child's DOM from the
document. Otherwise it is the caller's responsibility to clean up the child
component's DOM.
Arguments:
Returns: goog.ui.Component
The removed component, if any.
|
code » | ||||
Removes the child at the given index from this component, and returns it.
Throws an error if the argument is out of bounds, or if the specified child
isn't found in the parent. See
goog.ui.Component#removeChild for
detailed semantics.
Arguments:
Returns: goog.ui.Component
The removed component, if any.
|
code » | ||||
Removes every child component attached to this one and returns them.
Arguments:
|
code » | ||||
![]()
Renders the component. If a parent element is supplied, the component's
element will be appended to it. If there is no optional parent element and
the element doesn't have a parentNode then it will be appended to the
document body.
If this component has a parent component, and the parent component is
not in the document already, then this will not call
enterDocument
on this component.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
![]()
Renders the component before another element. The other element should be in
the document already.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
![]()
Renders the component. If a parent element is supplied, the component's
element will be appended to it. If there is no optional parent element and
the element doesn't have a parentNode then it will be appended to the
document body.
If this component has a parent component, and the parent component is
not in the document already, then this will not call
enterDocument
on this component.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
![]()
Sets the component's root element to the given element. Considered
protected and final.
This should generally only be called during createDom. Setting the element
does not actually change which element is rendered, only the element that is
associated with this UI component.
This should only be used by subclasses and its associated renderers.
Arguments:
|
code » | ||||
![]()
Assigns an ID to this component instance. It is the caller's responsibility
to guarantee that the ID is unique. If the component is a child of a parent
component, then the parent component's child index is updated to reflect the
new ID; this may throw an error if the parent already has a child with an ID
that conflicts with the new ID.
Arguments:
|
code » | ||||
![]()
Sets the model associated with the UI component.
Arguments:
|
code » | ||||
![]()
Sets the parent of this component to use for event bubbling. Throws an error
if the component already has a parent or if an attempt is made to add a
component to itself as a child. Callers must use
removeChild
or removeChildAt to remove components from their containers before
calling this method.
Arguments:
|
code » | ||||
![]()
Overrides
goog.events.EventTarget#setParentEventTarget to throw an
error if the parent component is set, and the argument is not the parent.
|
code » | ||||
![]()
Set is right-to-left. This function should be used if the component needs
to know the rendering direction during dom creation (i.e. before
#enterDocument is called and is right-to-left is set).
Arguments:
|
code » | ||||
No description.
Returns: boolean
Whether the component was decorated.
|
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 » |
![]()
Whether multiple items can be entered comma separated.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
List of items entered in the search box if multiple entries are allowed.
|
Code » | |
![]()
Index of first item that should be affected by the filter. Menu items with
a lower index will not be affected by the filter.
|
Code » | |
![]()
Filter input element.
|
Code » | |
![]()
Filter applied to the menu.
|
Code » | |
The input handler that provides the input event.
|
Code » | |
![]()
Label element.
|
Code » | |
![]()
Label displayed in the filter input when no text has been entered.
|
Code » | |
![]()
Maximum number of characters for filter input.
|
Code » | |
![]()
Map of child nodes that shouldn't be affected by filtering.
|
Code » |
![]()
Whether the menu can move the focus to its key event target when it is
shown. Default = true
|
Code » | |
![]()
Whether the menu should use windows syle behavior and allow disabled menu
items to be highlighted (though not selectable). Defaults to false
|
Code » | |
![]()
No description.
|
Code » | |
Coordinates of the mousedown event that caused this menu to be made visible.
Used to prevent the consequent mouseup event due to a simple click from
activating a menu item immediately. Considered protected; should only be used
within this package or by subclasses.
|
Code » |
![]()
Whether focus of child components should be allowed. Only effective if
focusable_ is set to false.
|
Code » | |
![]()
Map of DOM IDs to child controls. Each key is the DOM ID of a child
control's root element; each value is a reference to the child control
itself. Used for looking up the child control corresponding to a DOM
node in O(1) time.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Whether the container is enabled and reacting to keyboard and mouse events.
Defaults to true.
|
Code » | |
![]()
Whether the container supports keyboard focus. Defaults to true. Focusable
containers have a
tabIndex and can be navigated to via the keyboard.
|
Code » | |
![]()
The 0-based index of the currently highlighted control in the container
(-1 if none).
|
Code » | |
![]()
Allows an alternative element to be set to receive key events, otherwise
defers to the renderer's element choice.
|
Code » | |
Keyboard event handler.
|
Code » | |
![]()
Whether the mouse button is held down. Defaults to false. This flag is set
when the user mouses down over the container, and remains set until they
release the mouse button.
|
Code » | |
![]()
Whether highlighting a child component should also open it.
|
Code » | |
The currently open (expanded) control in the container (null if none).
|
Code » | |
![]()
Container orientation; determines layout and default keyboard navigation.
|
Code » | |
Renderer for the container. Defaults to
goog.ui.ContainerRenderer .
|
Code » | |
![]()
Whether the container is set to be visible. Defaults to true.
|
Code » |
![]()
Map of child component IDs to child components. Used for constant-time
random access to child components by ID. Lazily initialized on first use.
Must be kept in sync with
children_ . This property is strictly
private and must not be accessed directly outside of this class!
We use a plain Object, not a goog.structs.Map , for simplicity.
This means components can't have children with IDs such as 'constructor' or
'valueOf', but this shouldn't really be an issue in practice, and if it is,
we can always fix it later without changing the API.
|
Code » | |
![]()
Array of child components. Lazily initialized on first use. Must be kept in
sync with
childIndex_ . This property is strictly private and must
not be accessed directly outside of this class!
|
Code » | |
![]()
No description.
|
Code » | |
DomHelper used to interact with the document, allowing components to be
created in a different window.
|
Code » | |
![]()
The DOM element for the component.
|
Code » | |
Event handler.
TODO(user): rename it to handler_ after all component subclasses in
inside Google have been cleaned up.
Code search: http://go/component_code_search
|
Code » | |
Generator for unique IDs.
|
Code » | |
![]()
Unique ID of the component, lazily initialized in
goog.ui.Component#getId if needed. This property is strictly private and
must not be accessed directly outside of this class!
|
Code » | |
![]()
Whether the component is in the document.
|
Code » | |
![]()
Arbitrary data object associated with the component. Such as meta-data.
|
Code » | |
Parent component to which events will be propagated. This property is
strictly private and must not be accessed directly outside of this class!
|
Code » | |
![]()
Whether the component is rendered right-to-left. Right-to-left is set
lazily when
#isRightToLeft is called the first time, unless it has
been set by calling #setRightToLeft explicitly.
|
Code » | |
![]()
Flag used to keep track of whether a component decorated an already existing
element or whether it created the DOM itself.
If an element is decorated, dispose will leave the node in the document.
It is up to the app to remove the node.
If an element was rendered, dispose will remove the node automatically.
|
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 » |
![]()
No description.
|
Code » |