control.js
No description.

File Location

/goog/ui/control.js

Classes

goog.ui.Control
Base class for UI controls. Extends goog.ui.Component by adding the following:
  • a goog.events.KeyHandler, to simplify keyboard handling,
  • a pluggable renderer framework, to simplify the creation of simple controls without the need to subclass this class,
  • the notion of component content, like a text caption or DOM structure displayed in the component (e.g. a button label),
  • getter and setter for component content, as well as a getter and setter specifically for caption text (for convenience),
  • support for hiding/showing the component,
  • fine-grained control over supported states and state transition events, and
  • default mouse and keyboard event handling.
This class has sufficient built-in functionality for most simple UI controls. All controls dispatch SHOW, HIDE, ENTER, LEAVE, and ACTION events on show, hide, mouseover, mouseout, and user action, respectively. Additional states are also supported. See closure/demos/control.html for example usage.

Public Protected Private

Global Functions

goog.ui.Control.decorate(element) ?goog.ui.Control
Use goog.ui.decorate instead. Takes an element, and decorates it with a goog.ui.Control instance if a suitable decorator is found.
Arguments:
element : Element
Element to decorate.
Returns: ?goog.ui.Control  New control instance that decorates the element (null if none).
code »
goog.ui.Control.getDecorator(element) ?goog.ui.Control
Use goog.ui.registry.getDecorator instead. Takes an element and returns a new instance of goog.ui.Control or a subclass, suitable to decorate it (based on the element's CSS class).
Arguments:
element : Element
Element to decorate.
Returns: ?goog.ui.Control  New control instance to decorate the element (null if none).
code »
goog.ui.Control.isMouseEventWithinElement_(eelem) boolean
Checks if a mouse event (mouseover or mouseout) occured below an element.
Arguments:
e : goog.events.BrowserEvent
Mouse event (should be mouseover or mouseout).
elem : Element
The ancestor element.
Returns: boolean  Whether the event has a relatedTarget (the element the mouse is coming from) and it's a descendent of elem.
code »
goog.ui.Control.registerDecorator(classNamedecoratorFunction)
Use goog.ui.registry.setDecoratorByClassName instead. Maps a CSS class name to a function that returns a new instance of goog.ui.Control or a subclass thereof, suitable to decorate an element that has the specified CSS class. UI components that extend goog.ui.Control and want goog.ui.Containers to be able to discover and decorate elements using them should register a factory function via this API.
Arguments:
className : string
CSS class name.
decoratorFunction : Function
Function that takes no arguments and returns a new instance of a control to decorate an element with the given class.
code »

Global Variables

function%82 :
No description.
Code »

Directory ui

File Reference