| goog.Disposable | |
| goog.events.EventTarget | goog.Disposable |
| goog.ui.Zippy | goog.events.EventTarget |
| goog.ui.AnimatedZippy | goog.ui.Zippy |
|
header
:
Header element, either element reference, string id or null if no header exists.
|
|
content
:
Content element, either element reference or string id.
|
|
opt_expanded
:
Initial expanded/visibility state. Defaults to false.
|
|
No description.
Returns:
Whether the zippy is in the process of being expanded or collapsed.
|
code » | ||
onAnimate_(e)
Called during animation
Arguments:
|
code » | ||
onAnimationCompleted_(expanded)
Called once the expand/collapse animation has completed.
Arguments:
|
code » | ||
setExpanded(expanded)
Sets expanded state.
Arguments:
|
code » |
collapse()
Collapses content pane.
|
code » | ||
dispatchActionEvent_()
Dispatch an ACTION event whenever there is user interaction with the header.
Please note that after the zippy state change is completed a TOGGLE event
will be dispatched. However, the TOGGLE event is dispatch on every toggle,
including programmatic call to
#toggle.
|
code » | ||
disposeInternal()
No description.
|
code » | ||
enableKeyboardEventsHandling_(header)
Enables keyboard events handling for the passed header element.
Arguments:
|
code » | ||
enableMouseEventsHandling_(header)
Enables mouse events handling for the passed header element.
Arguments:
|
code » | ||
expand()
Expands content pane.
|
code » | ||
|
No description.
Returns:
goog.dom.a11y.Role.<string>
The ARIA role to be applied to Zippy element.
|
code » | ||
|
No description.
Returns:
The content element.
|
code » | ||
|
No description.
Returns:
The visible header element.
|
code » | ||
|
No description.
Returns:
Whether the zippy is expanded.
|
code » | ||
|
No description.
Returns:
Whether the Zippy handles its own mouse events.
|
code » | ||
|
No description.
Returns:
Whether the Zippy handles its own key events.
|
code » | ||
lazyCreateFunc_()
Function that will create the content element, or false if there is no such
function.
|
code » | ||
onHeaderClick_(event)
Click event handler for header element.
Arguments:
|
code » | ||
onHeaderKeyDown_(event)
KeyDown event handler for header element. Enter and space toggles expanded
state.
Arguments:
|
code » | ||
setExpanded(expanded)
Sets expanded state.
Arguments:
|
code » | ||
setExpandedInternal(expanded)
Sets expanded internal state.
Arguments:
|
code » | ||
setHandleKeyboardEvents(enable)
Sets whether the Zippy handles it's own keyboard events.
Arguments:
|
code » | ||
setHandleMouseEvents(enable)
Sets whether the Zippy handles it's own mouse events.
Arguments:
|
code » | ||
toggle()
Toggles expanded state.
|
code » | ||
updateHeaderClassName(expanded)
Updates the header element's className and ARIA (accessibility) EXPANDED
state.
Arguments:
|
code » |
addEventListener(type, handler, opt_capture, opt_handlerScope)
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.
Supported for legacy but use goog.events.listen(src, type, handler) instead.
Arguments:
|
code » | |||||
|
Dispatches an event (or event like object) and calls all listeners
listening for events of this type. The type of the event is decided by the
type property on the event object.
If any of the listeners returns false OR calls preventDefault then this
function will return false. If one of the capture listeners calls
stopPropagation, then the bubble listeners won't fire.
Arguments:
Returns:
If anyone called preventDefault on the event object (or if any of the handlers returns false this will also return false.
|
code » | |||||
disposeInternal()
Unattach 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, it should be something like this:
MyClass.prototype.disposeInternal = function() {
MyClass.superClass_.disposeInternal.call(this);
// Dispose logic for MyClass
};
|
code » | |||||
|
Returns the parent of this event target to use for bubbling.
Returns:
The parent EventTarget or null if there is no parent.
|
code » | |||||
removeEventListener(type, handler, opt_capture, opt_handlerScope)
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 » | |||||
setParentEventTarget(parent)
Sets the parent of this event target to use for bubbling.
Arguments:
|
code » |
dispose()
⇒ undefined
Disposes of the object. If the object hasn&#39;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:
undefined
Nothing.
|
code » | ||
disposeInternal()
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&#39; disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() {
goog.base(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);
mypackage.MyClass.prototype.disposeInternal = function() {
goog.base(this, 'disposeInternal');
// Dispose logic specific to MyClass.
...
};
|
code » | ||
|
Use #isDisposed instead.
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
|
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
|
DomHelper used to interact with the document, allowing components to be
created in a different window.
|
Code » | |
|
Content element.
|
Code » | |
|
When present, the header to use when the zippy is expanded.
|
Code » | |
|
Header element or null if no header exists.
|
Code » | |
|
Expanded state.
|
Code » | |
|
Whether to listen for and handle key events; defaults to true.
|
Code » | |
|
Whether to listen for and handle mouse events; defaults to true.
|
Code » | |
|
A keyboard events handler. If there are two headers it is shared for both.
|
Code » | |
|
A mouse events handler. If there are two headers it is shared for both.
|
Code » |