goog.Disposable | |
goog.events.EventTarget | goog.Disposable |
goog.ui.PopupBase | goog.events.EventTarget |
goog.ui.Popup | goog.ui.PopupBase |
goog.ui.Tooltip | goog.ui.Popup |
goog.ui.HoverCard | goog.ui.AdvancedTooltip |
goog.ui.AdvancedTooltip | goog.ui.Tooltip |
opt_el
: Element | string=
Element to display tooltip for, either
element reference or string id.
|
opt_str
: ?string=
Text message to display in tooltip.
|
opt_domHelper
: goog.dom.DomHelper=
Optional DOM helper.
|
![]()
Attach to element. Tooltip will be displayed when the cursor is over the
element or when the element has been active for a few milliseconds.
|
code » | |||
![]()
Looks for an active tooltip whose element contains this tooltip's anchor.
This allows us to prevent hides until they are really necessary.
|
code » | |||
![]()
Helper method called to clear the close timer.
|
code » | |||
![]()
Helper method called to clear the show timer.
|
code » | |||
![]()
Detach from element(s).
Arguments:
|
code » | |||
![]()
Detach from element.
Arguments:
|
code » | |||
![]()
No description.
|
code » | |||
No description.
Returns: Element
Active element reference.
|
code » | |||
Find anchor containing the given element, if any.
|
code » | |||
No description.
Returns: goog.ui.Tooltip
Active tooltip in a child element, or 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 » | |||
No description.
Returns: goog.structs.Set
Elements this widget is attached to.
|
code » | |||
No description.
Returns: number
The delay in milliseconds before tooltip is hidden once the
cursor leaves the element.
|
code » | |||
No description.
Returns: string
The tooltip message as HTML as plain string.
|
code » | |||
Return a Position instance for repositioning the tooltip. Override in
subclasses to customize the way repositioning is done.
Arguments:
Returns: !goog.positioning.AbstractPosition
The position object used
to position the tooltip.
|
code » | |||
No description.
Returns: number
The delay in milliseconds before tooltip is displayed for an
element.
|
code » | |||
![]()
No description.
Returns: goog.ui.Tooltip.State
Current state of tooltip.
|
code » | |||
No description.
Returns: string
The tooltip message as plain text.
|
code » | |||
![]()
Handler for focus events.
Arguments:
|
code » | |||
![]()
Handler for mouse move events.
Arguments:
|
code » | |||
![]()
Handler for mouse out and blur events.
Arguments:
|
code » | |||
![]()
Handler for mouse over events.
Arguments:
|
code » | |||
![]()
Handler for mouse out events for the tooltip element.
Arguments:
|
code » | |||
![]()
Handler for mouse over events for the tooltip element.
Arguments:
|
code » | |||
No description.
Returns: boolean
Whether tooltip element contains an active child tooltip,
and should thus not be hidden. When the child tooltip is hidden, it
will check if the parent should be hidden, too.
|
code » | |||
Returns true if the coord is in the tooltip.
Arguments:
Returns: boolean
Whether the coord is in the tooltip.
|
code » | |||
![]()
Called by timer from mouse out handler. Hides tooltip if cursor is still
outside element and tooltip, or if a child of tooltip has the focus.
Arguments:
|
code » | |||
![]()
Called by timer from mouse over handler. Shows tooltip if cursor is still
over the same element.
Arguments:
|
code » | |||
Called before the popup is shown.
Returns: boolean
Whether tooltip should be shown.
|
code » | |||
![]()
Called after the popup is hidden.
|
code » | |||
![]()
Sets tooltip position and shows it.
Arguments:
|
code » | |||
![]()
Saves the current mouse cursor position to
this.cursorPosition .
Arguments:
|
code » | |||
![]()
No description.
Arguments:
|
code » | |||
![]()
Sets tooltip element.
Arguments:
|
code » | |||
![]()
Sets delay in milliseconds before tooltip is hidden once the cursor leavs
the element.
Arguments:
|
code » | |||
![]()
Sets tooltip message as HTML markup.
using goog.html.SafeHtml are in place.
Arguments:
|
code » | |||
![]()
Sets whether tooltip requires the mouse to have moved or the anchor receive
focus before the tooltip will be shown.
Arguments:
|
code » | |||
![]()
Sets tooltip message as HTML markup.
Arguments:
|
code » | |||
![]()
Sets delay in milliseconds before tooltip is displayed for an element.
Arguments:
|
code » | |||
![]()
Sets tooltip message as plain text.
Arguments:
|
code » | |||
![]()
Shows tooltip for a specific element.
Arguments:
|
code » | |||
![]()
Helper method called to start the close timer.
|
code » | |||
![]()
Helper method, starts timer that calls maybeShow. Parameters are passed to
the maybeShow method.
Arguments:
|
code » |
Returns the margin to place around the popup.
Returns: ?goog.math.Box
The margin.
|
code » | |||||
![]()
Returns the corner of the popup to used in the positioning algorithm.
Returns: goog.positioning.Corner
The popup corner used for positioning.
|
code » | |||||
No description.
Returns: goog.positioning.AbstractPosition
The position helper object
associated with the popup.
|
code » | |||||
![]()
Repositions the popup according to the current state.
|
code » | |||||
![]()
Sets the margin to place around the popup.
Arguments:
|
code » | |||||
![]()
Sets the corner of the popup to used in the positioning algorithm.
Arguments:
|
code » | |||||
![]()
Sets the position helper object associated with the popup.
Arguments:
|
code » |
![]()
Mouse events that occur within an autoHide partner will not hide a popup
set to autoHide.
Arguments:
|
code » | |||
![]()
Continues hiding the popup. This is a continuation from hide_. It is
a separate method so that we can add a transition before hiding.
Arguments:
|
code » | |||
![]()
No description.
|
code » | |||
![]()
Helper to throw exception if the popup is showing.
|
code » | |||
Returns whether the Popup dismisses itself when the user clicks outside of
it.
Returns: boolean
Whether the Popup autohides on an external click.
|
code » | |||
Returns the region inside which the Popup dismisses itself when the user
clicks, or null if it's the entire document.
Returns: Element
The DOM element for autohide, or null if it hasn't been
set.
|
code » | |||
Returns the dom element that should be used for the popup.
Returns: Element
The popup element.
|
code » | |||
No description.
Returns: boolean
Whether cross iframe dismissal is enabled.
|
code » | |||
Returns the event handler for the popup. All event listeners belonging to
this handler are removed when the tooltip is hidden. Therefore,
the recommended usage of this handler is to listen on events in
#onShow_ .
Returns: goog.events.EventHandler.<T>
Event handler for this popup.
|
code » | |||
No description.
Returns: boolean
Whether the Popup autohides on the escape key.
|
code » | |||
Returns the time when the popup was last hidden.
Returns: number
time in ms since epoch when the popup was last hidden, or
-1 if the popup was never hidden or is currently showing.
|
code » | |||
Returns the time when the popup was last shown.
Returns: number
time in ms since epoch when the popup was last shown, or
-1 if the popup was never shown.
|
code » | |||
![]()
No description.
Returns: goog.ui.PopupBase.Type
The type of popup this is.
|
code » | |||
![]()
Hides the popup element.
|
code » | |||
Hides the popup. This call is idempotent.
Arguments:
Returns: boolean
Whether the popup was hidden and not cancelled.
|
code » | |||
Returns whether the popup is currently visible or was visible within about
150 ms ago. This is used by clients to handle a very specific, but common,
popup scenario. The button that launches the popup should close the popup
on mouse down if the popup is alrady open. The problem is that the popup
closes itself during the capture phase of the mouse down and thus the button
thinks it's hidden and this should show it again. This method provides a
good heuristic for clients. Typically in their event handler they will have
code that is:
if (menu.isOrWasRecentlyVisible()) {
menu.setVisible(false);
} else {
... // code to position menu and initialize other state
menu.setVisible(true);
}
Returns: boolean
Whether the popup is currently visible or was visible
within about 150 ms ago.
|
code » | |||
No description.
|
code » | |||
Returns whether the popup is currently visible.
Returns: boolean
whether the popup is currently visible.
|
code » | |||
No description.
|
code » | |||
![]()
Hides the popup by moving it offscreen.
|
code » | |||
Called before the popup is hidden. Derived classes can override to hook this
event but should make sure to call the parent class method.
Arguments:
Returns: boolean
If anyone called preventDefault on the event object (or
if any of the handlers returns false this will also return false.
|
code » | |||
Called before the popup is shown. Derived classes can override to hook this
event but should make sure to call the parent class method.
Returns: boolean
If anyone called preventDefault on the event object (or
if any of the handlers returns false this will also return false.
|
code » | |||
![]()
Deactivate handler(IE) and blur handler (other browsers) for document.
Used to hide the popup for auto-hide mode.
Arguments:
|
code » | |||
![]()
Handles key-downs on the document to handle the escape key.
Arguments:
|
code » | |||
![]()
Mouse down handler for the document on capture phase. Used to hide the
popup for auto-hide mode.
Arguments:
|
code » | |||
![]()
Called after the popup is hidden. Derived classes can override to hook this
event but should make sure to call the parent class method.
Arguments:
|
code » | |||
![]()
Called after the popup is shown. Derived classes can override to hook this
event but should make sure to call the parent class method.
|
code » | |||
![]()
Removes a previously registered auto hide partner.
Arguments:
|
code » | |||
![]()
Repositions the popup according to the current state.
Should be overriden by subclases.
|
code » | |||
![]()
Sets whether the Popup dismisses itself when the user clicks outside of it.
Arguments:
|
code » | |||
![]()
Sets the region inside which the Popup dismisses itself when the user
clicks.
Arguments:
|
code » | |||
![]()
Specifies the dom element that should be used for the popup.
Arguments:
|
code » | |||
![]()
Sets whether clicks in other iframes should dismiss this popup. In some
cases it should be disabled, because it can cause spurious
Arguments:
|
code » | |||
![]()
Sets whether the Popup dismisses itself on the escape key.
Arguments:
|
code » | |||
![]()
Sets whether the popup should hide itself asynchronously using a timeout
instead of synchronously.
Arguments:
|
code » | |||
![]()
Sets transition animation on showing and hiding the popup.
Arguments:
|
code » | |||
![]()
Specifies the type of popup to use.
Arguments:
|
code » | |||
![]()
Sets whether the popup should be visible. After this method
returns, isVisible() will always return the new state, even if
there is a transition.
Arguments:
|
code » | |||
No description.
Returns: boolean
Whether the time since last show is less than the debounce
delay.
|
code » | |||
Returns whether the popup should hide itself asynchronously using a timeout
instead of synchronously.
Returns: boolean
Whether to hide async.
|
code » | |||
![]()
Shows the popup element.
|
code » | |||
![]()
Does the work to show the popup.
|
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 » |
![]()
Active element reference. Used by the delayed show functionality to keep
track of the element the mouse is over or the element with focus.
|
Code » | |
![]()
Element that triggered the tooltip. Note that if a second element triggers
this tooltip, anchor becomes that second element, even if its show is
cancelled and the original tooltip survives.
|
Code » | |
If this tooltip's element contains another tooltip that becomes active, this
property identifies that tooltip so that we can check if this tooltip should
not be hidden because the nested tooltip is active.
|
Code » | |
![]()
CSS class name for tooltip.
|
Code » | |
![]()
No description.
|
Code » | |
Cursor position relative to the page.
|
Code » | |
Dom Helper
|
Code » | |
Elements this widget is attached to.
|
Code » | |
![]()
Delay in milliseconds before tooltips are hidden.
|
Code » | |
![]()
Timer for when to hide.
|
Code » | |
If this tooltip is inside another tooltip's element, then it may have
prevented that tooltip from hiding. When this tooltip hides, we'll need
to check if the parent should be hidden as well.
|
Code » | |
![]()
Whether the cursor must have moved before the tooltip will be shown.
|
Code » | |
![]()
Whether the anchor has seen the cursor move or has received focus since the
tooltip was last shown. Used to ignore mouse over events triggered by view
changes and UI updates.
|
Code » | |
![]()
Delay in milliseconds since the last mouseover or mousemove before the
tooltip is displayed for an element.
|
Code » | |
![]()
Timer for when to show.
|
Code » |
![]()
Mouse events without auto hide partner elements will not dismiss the popup.
|
Code » | |
![]()
Clicks outside the popup but inside this element will cause the popup to
hide if autoHide_ is true. If this is null, then the entire document is used.
For example, you can use a body-size div so that clicks on the browser
scrollbar do not dismiss the popup.
|
Code » | |
![]()
Whether the Popup dismisses itself it the user clicks outside of it or the
popup loses focus
|
Code » | |
![]()
No description.
|
Code » | |
![]()
The popup dom element that this Popup wraps.
|
Code » | |
![]()
Whether to enable cross-iframe dismissal.
|
Code » | |
An event handler to manage the events easily
|
Code » | |
![]()
Whether to hide when the escape key is pressed.
|
Code » | |
Transition to play on hiding the popup.
|
Code » | |
![]()
Whether the popup is currently being shown.
|
Code » | |
![]()
The time when the popup was last hidden.
|
Code » | |
![]()
The time when the popup was last shown.
|
Code » | |
![]()
Whether the popup should hide itself asynchrously. This was added because
there are cases where hiding the element in mouse down handler in IE can
cause textinputs to get into a bad state if the element that had focus is
hidden.
|
Code » | |
Transition to play on showing the popup.
|
Code » | |
![]()
The type of popup
|
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 » |
![]()
List of active (open) tooltip widgets. Used to prevent multiple tooltips
from appearing at once.
|
Code » | |
![]()
No description.
|
Code » |
![]()
Popup activation types. Used to select a positioning strategy.
Constants:
|
Code » | ||||||
![]()
Possible states for the tooltip to be in.
Constants:
|
Code » |