goog.ui.Checkbox
Classgoog.ui.Checkbox
> goog.ui.Control
> goog.ui.Component
> goog.events.EventTarget
> goog.Disposable
goog.ui.Checkbox(opt_checked, opt_domHelper, opt_renderer)
3-state checkbox widget. Fires CHECK or UNCHECK events before toggled and CHANGE event after toggled by user. The checkbox can also be enabled/disabled and get focused and highlighted.
opt_checked
{goog.ui.Checkbox.State
=}
opt_domHelper
{goog.dom.DomHelper
=}
opt_renderer
{goog.ui.CheckboxRenderer
=}
goog.ui.Checkbox.State
EnumPossible checkbox states. … more
.addChild(child, opt_render)
Inherited from goog.ui.Component
.
Adds the specified component as the last child of this component. See {@link goog.ui.Component#addChildAt} for detailed semantics.
child
{goog.ui.Component
}
opt_render
{boolean
=}
.addChildAt(child, index, opt_render)
Inherited from goog.ui.Component
.
Adds the specified component as a child of this component at the given 0-based index. Both {@code addChild} and {@code addChildAt} assume the following contract between parent and child components:
child
{goog.ui.Component
}
index
{number
}
opt_render
{boolean
=}
void
}
.addClassName(className)
Inherited from goog.ui.Control
.
Adds the given class name to the list of classes to be applied to the component's root element.
className
{string
}
.addEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
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.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.canDecorate(element)
Inherited from goog.ui.Control
.
Returns true if the given element can be decorated by this component. Overrides {@link goog.ui.Component#canDecorate}.
element
{Element
}
boolean
}
.createDom()
Inherited from goog.ui.Control
.
Creates the control's DOM. Overrides {@link goog.ui.Component#createDom} by delegating DOM manipulation to the control's renderer.
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.decorate(element)
Inherited from goog.ui.Component
.
Decorates the element for the UI component.
element
{Element
}
.decorateInternal(element)
[protected]Inherited from goog.ui.Control
.
Decorates the given element with this component. Overrides {@link goog.ui.Component#decorateInternal} by delegating DOM manipulation to the control's renderer.
element
{Element
}
.dispatchEvent(e)
Inherited from goog.events.EventTarget
.
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.
e
{string
|Object
|goog.events.Event
}
boolean
}
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]Inherited from goog.ui.Control
.
Disposes of the component. Calls {@code 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.
.dom_
[protected] {!goog.dom.DomHelper
}Inherited from goog.ui.Component
.
DomHelper used to interact with the document, allowing components to be created in a different window.
.enableClassName(className, enable)
Inherited from goog.ui.Control
.
Adds or removes the given class name to/from the list of classes to be applied to the component's root element.
className
{string
}
enable
{boolean
}
.enterDocument()
Configures the component after its DOM has been rendered, and sets up event handling. Overrides {@link goog.ui.Component#enterDocument}.
.exitDocument()
Inherited from goog.ui.Control
.
Cleans up the component before its DOM is removed from the document, and removes event handlers. Overrides {@link goog.ui.Component#exitDocument} by making sure that components that are removed from the document aren't focusable (i.e. have no tab index).
.forEachChild(f, opt_obj)
Inherited from goog.ui.Component
.
Calls the given function on each of this component's children in order. If {@code 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.
f
{Function
}
opt_obj
{Object
=}
.getCaption()
Inherited from goog.ui.Control
.
string
}
.getChecked()
goog.ui.Checkbox.State
}
.getChild(id)
Inherited from goog.ui.Component
.
Returns the child with the given ID, or null if no such child exists.
id
{string
}
goog.ui.Component
?}
.getChildAt(index)
Inherited from goog.ui.Component
.
Returns the child at the given index, or null if the index is out of bounds.
index
{number
}
goog.ui.Component
?}
.getChildCount()
Inherited from goog.ui.Component
.
Returns the number of children of this component.
number
}
.getChildIds()
Inherited from goog.ui.Component
.
Returns an array containing the IDs of the children of this component, or an empty array if the component has no children.
Array
.<string
>}
.getContent()
Inherited from goog.ui.Control
.
Returns the text caption or DOM structure displayed in the component.
goog.ui.ControlContent
}
.getContentElement()
Inherited from goog.ui.Control
.
Returns the DOM element into which child components are to be rendered, or null if the control itself hasn't been rendered yet. Overrides {@link goog.ui.Component#getContentElement} by delegating to the renderer.
Element
}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getDomHelper()
Inherited from goog.ui.Component
.
Returns the dom helper that is being used on this component.
goog.dom.DomHelper
}
.getElement()
Inherited from goog.ui.Component
.
Gets the component's element.
Element
}
.getElementByClass(className)
Inherited from goog.ui.Component
.
Returns the first element in this component's DOM with the provided className.
className
{string
}
Element
}
.getElementByFragment(idFragment)
Inherited from goog.ui.Component
.
Helper function for returning an element in the document with a unique id generated using makeId().
idFragment
{string
}
Element
}
.getElementsByClass(className)
Inherited from goog.ui.Component
.
Returns an array of all the elements in this component's DOM with the provided className.
className
{string
}
goog.array.ArrayLike
}
.getExtraClassNames()
Inherited from goog.ui.Control
.
Returns any additional class name(s) to be applied to the component's root element, or null if no extra class names are needed.
Array
.<string
>?}
.getFragmentFromId(id)
Inherited from goog.ui.Component
.
Helper function for returning the fragment portion of an id generated using makeId().
id
{string
}
string
}
.getHandler()
[protected]Inherited from goog.ui.Component
.
Returns the event handler for this component, lazily created the first time this method is called.
goog.events.EventHandler
}
.getId()
Inherited from goog.ui.Component
.
Gets the unique ID for the instance of this component. If the instance doesn't already have an ID, generates one on the fly.
string
}
.getKeyEventTarget()
Inherited from goog.ui.Control
.
Returns the DOM element on which the control is listening for keyboard events (null if none).
Element
}
.getKeyHandler()
[protected]Inherited from goog.ui.Control
.
Returns the keyboard event handler for this component, lazily created the first time this method is called. Considered protected; should only be used within this package and by subclasses.
goog.events.KeyHandler
}
.getModel()
Inherited from goog.ui.Component
.
Returns the model associated with the UI component.
.getParent()
Inherited from goog.ui.Component
.
Returns the component's parent, if any.
goog.ui.Component
?}
.getParentEventTarget()
Inherited from goog.events.EventTarget
.
Returns the parent of this event target to use for bubbling.
goog.events.EventTarget
}
.getPreferredAriaRole()
Inherited from goog.ui.Control
.
Returns the control's preferred ARIA role. This can be used by a control to override the role that would be assigned by the renderer. This is useful in cases where a different ARIA role is appropriate for a control because of the context in which it's used. E.g., a {@link goog.ui.MenuButton} added to a {@link goog.ui.Select} should have an ARIA role of LISTBOX and not MENUITEM.
goog.dom.a11y.Role
}
.getRenderer()
Inherited from goog.ui.Control
.
Returns the renderer used by this component to render itself or to decorate an existing element.
goog.ui.ControlRenderer
|undefined
}
.getState()
Inherited from goog.ui.Control
.
Returns the component's state as a bit mask of {@link goog.ui.Component.State}s.
number
}
.handleBlur(e)
Inherited from goog.ui.Control
.
Handles blur events on the component's key event target element. Always deactivates the component. In addition, if the component is focusable, updates its state and styling to indicate that it no longer has keyboard focus. Considered protected; should only be used within this package and by subclasses. Warning: IE dispatches focus and blur events asynchronously!
e
{goog.events.Event
}
.handleContextMenu
Inherited from goog.ui.Control
.
Handles contextmenu events.
e
{goog.events.BrowserEvent
}
.handleDblClick(e)
Inherited from goog.ui.Control
.
Handles dblclick events. Should only be registered if the user agent is IE. If the component is enabled, performs its associated action by calling {@link performActionInternal}. This is used to allow more performant buttons in IE. In IE, no mousedown event is fired when that mousedown will trigger a dblclick event. Because of this, a user clicking quickly will only cause ACTION events to fire on every other click. This is a workaround to generate ACTION events for every click. Unfortunately, this workaround won't ever trigger the ACTIVE state. This is roughly the same behaviour as if this were a 'button' element with a listener on mouseup. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.Event
}
.handleFocus(e)
Inherited from goog.ui.Control
.
Handles focus events on the component's key event target element. If the component is focusable, updates its state and styling to indicate that it now has keyboard focus. Considered protected; should only be used within this package and by subclasses. Warning: IE dispatches focus and blur events asynchronously!
e
{goog.events.Event
}
.handleKeyEvent(e)
Inherited from goog.ui.Control
.
Attempts to handle a keyboard event, if the component is enabled and visible, by calling {@link handleKeyEventInternal}. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.KeyEvent
}
boolean
}
.handleKeyEventInternal(e)
[protected]Attempts to handle a keyboard event; returns true if the event was handled, false otherwise. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.KeyEvent
}
boolean
}
.handleMouseDown(e)
Inherited from goog.ui.Control
.
Handles mousedown events. If the component is enabled, highlights and activates it. If the component isn't configured for keyboard access, prevents it from receiving keyboard focus. Considered protected; should only be used within this package andy by subclasses.
e
{goog.events.Event
}
.handleMouseOut(e)
Inherited from goog.ui.Control
.
Handles mouseout events. Dispatches a LEAVE event; if the event isn't canceled, and the component supports auto-highlighting, deactivates and un-highlights the component. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.BrowserEvent
}
.handleMouseOver(e)
Inherited from goog.ui.Control
.
Handles mouseover events. Dispatches an ENTER event; if the event isn't canceled, the component is enabled, and it supports auto-highlighting, highlights the component. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.BrowserEvent
}
.handleMouseUp(e)
Inherited from goog.ui.Control
.
Handles mouseup events. If the component is enabled, highlights it. If the component has previously been activated, performs its associated action by calling {@link performActionInternal}, then deactivates it. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.Event
}
.hasChildren()
Inherited from goog.ui.Component
.
Returns true if the component has children.
boolean
}
.hasState(state)
Inherited from goog.ui.Control
.
Returns true if the component is in the specified state, false otherwise.
state
{goog.ui.Component.State
}
boolean
}
.indexOfChild(child)
Inherited from goog.ui.Component
.
Returns the 0-based index of the given child component, or -1 if no such child is found.
child
{goog.ui.Component
?}
number
}
.isActive()
Inherited from goog.ui.Control
.
Returns true if the component is active (pressed), false otherwise.
boolean
}
.isAllowTextSelection()
Inherited from goog.ui.Control
.
Returns true if the control allows text selection within its DOM, false otherwise. Controls that disallow text selection have the appropriate unselectable styling applied to their elements. Note that controls hosted in containers will report that they allow text selection even if their container disallows text selection.
boolean
}
.isAutoState(state)
Inherited from goog.ui.Control
.
Returns true if the component provides default event handling for the state, false otherwise.
state
{goog.ui.Component.State
}
boolean
}
.isChecked()
Returns true if the component is checked, false otherwise.
boolean
}
.isDispatchTransitionEvents(state)
Inherited from goog.ui.Control
.
Returns true if the component is set to dispatch transition events for the given state, false otherwise.
state
{goog.ui.Component.State
}
boolean
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.isEnabled()
Inherited from goog.ui.Control
.
Returns true if the component is enabled, false otherwise.
boolean
}
.isFocused()
Inherited from goog.ui.Control
.
Returns true if the component is styled to indicate that it has keyboard focus, false otherwise. Note that {@code isFocused()} returning true doesn't guarantee that the component's key event target has keyborad focus, only that it is styled as such.
boolean
}
.isHandleMouseEvents()
Inherited from goog.ui.Control
.
Returns true if the control is configured to handle its own mouse events, false otherwise. Controls not hosted in {@link goog.ui.Container}s have to handle their own mouse events, but controls hosted in containers may allow their parent to handle mouse events on their behalf. Considered protected; should only be used within this package and by subclasses.
boolean
}
.isHighlighted()
Inherited from goog.ui.Control
.
Returns true if the component is currently highlighted, false otherwise.
boolean
}
.isInDocument()
Inherited from goog.ui.Component
.
Determines whether the component has been added to the document.
boolean
}
.isOpen()
Inherited from goog.ui.Control
.
Returns true if the component is open (expanded), false otherwise.
boolean
}
.isRightToLeft()
Inherited from goog.ui.Component
.
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.
boolean
}
.isSelected()
Inherited from goog.ui.Control
.
Returns true if the component is selected, false otherwise.
boolean
}
.isSupportedState(state)
Inherited from goog.ui.Control
.
Returns true if the component supports the specified state, false otherwise.
state
{goog.ui.Component.State
}
boolean
}
.isTransitionAllowed(state, enable)
[protected]Inherited from goog.ui.Control
.
Returns true if the transition into or out of the given state is allowed to proceed, false otherwise. A state transition is allowed under the following conditions:
state
{goog.ui.Component.State
}
enable
{boolean
}
boolean
}
.isUnchecked()
boolean
}
.isUndetermined()
boolean
}
.isVisible()
Inherited from goog.ui.Control
.
Returns true if the component's visibility is set to visible, false if it is set to hidden. A component that is set to hidden is guaranteed to be hidden from the user, but the reverse isn't necessarily true. A component may be set to visible but can otherwise be obscured by another element, rendered off-screen, or hidden using direct CSS manipulation.
boolean
}
.makeId(idFragment)
Inherited from goog.ui.Component
.
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.
idFragment
{string
}
string
}
.makeIds(object)
Inherited from goog.ui.Component
.
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.
object
{Object
}
Object
}
.performActionInternal(e)
[protected]Inherited from goog.ui.Control
.
Performs the appropriate action when the control is activated by the user. The default implementation first updates the checked and selected state of controls that support them, then dispatches an ACTION event. Considered protected; should only be used within this package and by subclasses.
e
{goog.events.Event
}
boolean
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.removeChild(child, opt_unrender)
Inherited from goog.ui.Component
.
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 {@code opt_unrender} is true, calls {@link 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.
child
{string
|goog.ui.Component
|null
}
opt_unrender
{boolean
=}
goog.ui.Component
}
.removeChildAt(index, opt_unrender)
Inherited from goog.ui.Component
.
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 {@link goog.ui.Component#removeChild} for detailed semantics.
index
{number
}
opt_unrender
{boolean
=}
goog.ui.Component
}
.removeChildren(opt_unrender)
Inherited from goog.ui.Component
.
Removes every child component attached to this one and returns them.
opt_unrender
{boolean
=}
Array
.<goog.ui.Component
>|undefined
}
.removeClassName(className)
Inherited from goog.ui.Control
.
Removes the given class name from the list of classes to be applied to the component's root element.
className
{string
}
.removeEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
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.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.render(opt_parentElement)
Inherited from goog.ui.Component
.
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 {@code enterDocument} on this component. Throws an Error if the component is already rendered.
opt_parentElement
{Element
=}
.renderBefore(sibling)
Inherited from goog.ui.Component
.
Renders the component before another element. The other element should be in the document already. Throws an Error if the component is already rendered.
sibling
{Node
}
.setActive(active)
Inherited from goog.ui.Control
.
Activates or deactivates the component. Does nothing if this state transition is disallowed.
active
{boolean
}
.setAllowTextSelection(allow)
Inherited from goog.ui.Control
.
Allows or disallows text selection within the control's DOM.
allow
{boolean
}
.setAutoStates(states, enable)
Inherited from goog.ui.Control
.
Enables or disables automatic event handling for the given state(s).
states
{number
}
enable
{boolean
}
.setCaption(caption)
Inherited from goog.ui.Control
.
Sets the text caption of the component.
caption
{string
}
.setChecked(checked)
Sets the checked state of the checkbox.
checked
{?boolean
}
.setCheckedInternal(checked)
Sets the checked state for the checkbox. Unlike {@link #setChecked}, doesn't update the checkbox's DOM. Considered protected; to be called only by renderer code during element decoration.
checked
{goog.ui.Checkbox.State
}
.setContent(content)
Inherited from goog.ui.Control
.
Sets the component's content to the given text caption, element, or array of nodes. (If the argument is an array of nodes, it must be an actual array, not an array-like object.)
content
{goog.ui.ControlContent
}
.setContentInternal(content)
[protected]Inherited from goog.ui.Control
.
Sets the component's content to the given text caption, element, or array of nodes. Unlike {@link #setContent}, doesn't modify the component's DOM. Called by renderers during element decoration. Considered protected; should only be used within this package and by subclasses.
content
{goog.ui.ControlContent
}
.setDispatchTransitionEvents(states, enable)
Inherited from goog.ui.Control
.
Enables or disables transition events for the given state(s). Controls handle state transitions internally by default, and only dispatch state transition events if explicitly requested to do so by calling this method.
states
{number
}
enable
{boolean
}
.setElementInternal(element)
[protected]Inherited from goog.ui.Component
.
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.
element
{Element
}
.setEnabled(enable)
Fix for tabindex not being updated so that disabled checkbox is not focusable. In particular this fails in Chrome. Note: in general tabIndex=-1 will prevent from keyboard focus but enables mouse focus, however in this case the control class prevents mouse focus.
enable
{boolean
}
.setFocused(focused)
Inherited from goog.ui.Control
.
Applies or removes styling indicating that the component has keyboard focus. Note that unlike the other "set" methods, this method is called as a result of the component's element having received or lost keyboard focus, not the other way around, so calling {@code setFocused(true)} doesn't guarantee that the component's key event target has keyboard focus, only that it is styled as such.
focused
{boolean
}
.setHandleMouseEvents(enable)
Inherited from goog.ui.Control
.
Enables or disables mouse event handling for the control. Containers may use this method to disable mouse event handling in their child controls. Considered protected; should only be used within this package and by subclasses.
enable
{boolean
}
.setHighlighted(highlight)
Inherited from goog.ui.Control
.
Highlights or unhighlights the component. Does nothing if this state transition is disallowed.
highlight
{boolean
}
.setId(id)
Inherited from goog.ui.Component
.
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.
id
{string
}
.setLabel(label)
Binds an HTML element to the checkbox which if clicked toggles the checkbox. Behaves the same way as the 'label' HTML tag. The label element has to be the direct or non-direct ancestor of the checkbox element because it will get the focus when keyboard support is implemented.
label
{Element
}
.setModel(obj)
Inherited from goog.ui.Component
.
Sets the model associated with the UI component.
obj
{*}
.setOpen(open)
Inherited from goog.ui.Control
.
Opens (expands) or closes (collapses) the component. Does nothing if this state transition is disallowed.
open
{boolean
}
.setParent(parent)
Inherited from goog.ui.Component
.
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 {@code removeChild} or {@code removeChildAt} to remove components from their containers before calling this method.
parent
{goog.ui.Component
}
.setParentEventTarget(parent)
Inherited from goog.ui.Component
.
Overrides {@link goog.events.EventTarget#setParentEventTarget} to throw an error if the parent component is set, and the argument is not the parent.
parent
{goog.events.EventTarget
?}
.setPreferredAriaRole(role)
Inherited from goog.ui.Control
.
Sets the control's preferred ARIA role. This can be used to override the role that would be assigned by the renderer. This is useful in cases where a different ARIA role is appropriate for a control because of the context in which it's used. E.g., a {@link goog.ui.MenuButton} added to a {@link goog.ui.Select} should have an ARIA role of LISTBOX and not MENUITEM.
role
{goog.dom.a11y.Role
}
.setRenderer(renderer)
Inherited from goog.ui.Control
.
Registers the given renderer with the component. Changing renderers after the component has entered the document is an error.
renderer
{goog.ui.ControlRenderer
}
.setRightToLeft(rightToLeft)
Inherited from goog.ui.Control
.
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 {@link #enterDocument} is called and is right-to-left is set).
rightToLeft
{boolean
}
.setSelected(select)
Inherited from goog.ui.Control
.
Selects or unselects the component. Does nothing if this state transition is disallowed.
select
{boolean
}
.setState(state, enable)
Inherited from goog.ui.Control
.
Sets or clears the given state on the component, and updates its styling accordingly. Does nothing if the component is already in the correct state or if it doesn't support the specified state. Doesn't dispatch any state transition events; use advisedly.
state
{goog.ui.Component.State
}
enable
{boolean
}
.setStateInternal(state)
[protected]Inherited from goog.ui.Control
.
Sets the component's state to the state represented by a bit mask of {@link goog.ui.Component.State}s. Unlike {@link #setState}, doesn't update the component's styling, and doesn't reject unsupported states. Called by renderers during element decoration. Considered protected; should only be used within this package and by subclasses.
state
{number
}
.setSupportedState(state, support)
Inherited from goog.ui.Control
.
Enables or disables support for the given state. Disabling support for a state while the component is in that state is an error.
state
{goog.ui.Component.State
}
support
{boolean
}
.setVisible(visible, opt_force)
Inherited from goog.ui.Control
.
Shows or hides the component. Does nothing if the component already has the requested visibility. Otherwise, dispatches a SHOW or HIDE event as appropriate, giving listeners a chance to prevent the visibility change. When showing a component that is both enabled and focusable, ensures that its key target has a tab index. When hiding a component that is enabled and focusable, blurs its key target and removes its tab index.
visible
{boolean
}
opt_force
{boolean
=}
boolean
}
.toggle()
Toggles the checkbox. State transitions:
.wasDecorated()
Inherited from goog.ui.Component
.
boolean
}