ui.AnimatedZippy Extends goog.ui.Zippy
Zippy widget. Expandable/collapsible container, clicking the header toggles the visibility of the content.

Inheritance

Constructor

goog.ui.AnimatedZippy(headercontentopt_expanded)

Parameters

header :
(Element | null | string)
Header element, either element reference, string id or null if no header exists.
content :
(Element | null | string)
Content element, either element reference or string id.
opt_expanded :
(boolean | undefined)
Initial expanded/visibility state. Defaults to false.

Instance Methods

Public Protected Private
isBusy()
No description.
Returns:   Whether the zippy is in the process of being expanded or collapsed.
code »
onAnimate_(e)
Called during animation
Arguments:
e :
The event.
code »
onAnimationCompleted_(expanded)
Called once the expand/collapse animation has completed.
Arguments:
expanded :
Expanded/visibility state.
code »
setExpanded(expanded)
Sets expanded state.
Arguments:
expanded :
Expanded/visibility state.
code »
Defined in goog.ui.Zippy
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:
header :
(Element | null)
The header element.
code »
enableMouseEventsHandling_(header)
Enables mouse events handling for the passed header element.
Arguments:
header :
(Element | null)
The header element.
code »
expand()
Expands content pane.
code »
getAriaRole()
goog.dom.a11y.Role.<string>
No description.
Returns: 
goog.dom.a11y.Role.<string>
  The ARIA role to be applied to Zippy element.
code »
getContentElement()
(Element | null)
No description.
Returns: 
(Element | null)
  The content element.
code »
getVisibleHeaderElement()
(Element | null)
No description.
Returns: 
(Element | null)
  The visible header element.
code »
isExpanded()
No description.
Returns:   Whether the zippy is expanded.
code »
isHandleKeyEvents()
No description.
Returns:   Whether the Zippy handles its own mouse events.
code »
isHandleMouseEvents()
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:
event :
Click event.
code »
onHeaderKeyDown_(event)
KeyDown event handler for header element. Enter and space toggles expanded state.
Arguments:
event :
KeyDown event.
code »
setExpanded(expanded)
Sets expanded state.
Arguments:
expanded :
Expanded/visibility state.
code »
setExpandedInternal(expanded)
Sets expanded internal state.
Arguments:
expanded :
Expanded/visibility state.
code »
setHandleKeyboardEvents(enable)
Sets whether the Zippy handles it's own keyboard events.
Arguments:
enable :
Whether the Zippy handles keyboard events.
code »
setHandleMouseEvents(enable)
Sets whether the Zippy handles it's own mouse events.
Arguments:
enable :
Whether the Zippy handles mouse events.
code »
toggle()
Toggles expanded state.
code »
updateHeaderClassName(expanded)
Updates the header element's className and ARIA (accessibility) EXPANDED state.
Arguments:
expanded :
Expanded/visibility state.
code »
addEventListener(typehandleropt_captureopt_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:
type :
The type of the event to listen for.
handler :
(Object | null)
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture :
(boolean | undefined)
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope :
(Object | null | undefined)
Object in whose scope to call the listener.
code »
dispatchEvent(e)
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:
e :
(Object | goog.events.Event | null | string)
Event object.
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 »
getParentEventTarget()
Returns the parent of this event target to use for bubbling.
Returns:   The parent EventTarget or null if there is no parent.
code »
removeEventListener(typehandleropt_captureopt_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:
type :
The type of the event to listen for.
handler :
(Object | null)
The function to handle the event. The handler can also be an object that implements the handleEvent method which takes the event object as argument.
opt_capture :
(boolean | undefined)
In DOM-compliant browsers, this determines whether the listener is fired during the capture or bubble phase of the event.
opt_handlerScope :
(Object | null | undefined)
Object in whose scope to call the listener.
code »
setParentEventTarget(parent)
Sets the parent of this event target to use for bubbling.
Arguments:
parent :
Parent EventTarget (null if none).
code »
dispose()
undefined
Disposes of the object. If the object hasn&amp;#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&amp;#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, &#39;disposeInternal&#39;);
// Dispose logic specific to MyClass.
...
};
code »
getDisposed()
Use #isDisposed instead. No description.
Returns:   Whether the object has been disposed of.
code »
isDisposed()
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:
disposable :
that will be disposed when this object is disposed.
code »

Instance Properties

anim_ :
Reference to animation or null if animation is not active.
Code »
animationAcceleration :
Acceleration function for expand/collapse animation.
Code »
animationDuration :
Duration of expand/collapse animation, in milliseconds.
Code »
elWrapper_ :
(Element | null)
Content wrapper, used for animation.
Code »
Defined in goog.ui.Zippy
DomHelper used to interact with the document, allowing components to be created in a different window.
Code »
elContent_ :
(Element | null)
Content element.
Code »
elExpandedHeader_ :
(Element | null)
When present, the header to use when the zippy is expanded.
Code »
elHeader_ :
(Element | null)
Header element or null if no header exists.
Code »
expanded_ :
Expanded state.
Code »
handleKeyEvents_ :
Whether to listen for and handle key events; defaults to true.
Code »
handleMouseEvents_ :
Whether to listen for and handle mouse events; defaults to true.
Code »
keyboardEventHandler_ :
A keyboard events handler. If there are two headers it is shared for both.
Code »
mouseEventHandler_ :
A mouse events handler. If there are two headers it is shared for both.
Code »
customEvent_ :
Used to tell if an event is a real event in goog.events.listen() so we don't get listen() calling addEventListener() and vice-versa.
Code »
parentEventTarget_ :
Parent event target, used during event bubbling.
Code »
dependentDisposables_ :
(Array | null)
Disposables that should be disposed when this object is disposed.
Code »
disposed_ :
Whether the object has been disposed of.
Code »

Package ui

Package Reference