Yahoo! UI Library

gallery-inspector  0.1.0

Yahoo! UI Library > gallery-inspector > Inspector
Search:
 
Filters

Class Inspector - extends Widget - uses WidgetStack

Known Subclasses:
Plugin.Inspector
Real-time attribute inspector widget.

Constructor

Inspector ( config )
Parameters:
config <Object> Configuration object.

Methods

_afterCollapsedChange

protected void _afterCollapsedChange ( e )
Handles collaspedChange events.
Parameters:
e <EventFacade>
Returns: void

_afterDraggableChange

protected void _afterDraggableChange ( e )
Handles draggableChange events.
Parameters:
e <EventFacade>
Returns: void

_afterExcludeChange

protected void _afterExcludeChange ( e )
Handles excludeChange events.
Parameters:
e <EventFacade>
Returns: void

_afterFilterChange

protected void _afterFilterChange ( e )
Handles filterChange events.
Parameters:
e <EventFacade>
Returns: void

_afterHostAttrsChange

protected void _afterHostAttrsChange ( e )
Handles hostAttrsChange events.
Parameters:
e <EventFacade>
Returns: void

_afterHostAttrValueChange

protected void _afterHostAttrValueChange ( name , e )
Handles [attribute]Change events on the host.
Parameters:
name <String> Attribute name.
e <EventFacade>
Returns: void

_afterHostDestroyedChange

protected void _afterHostDestroyedChange ( e )
Handles destroyedChange events on the host.
Parameters:
e <EventFacade>
Returns: void

_afterIncludeChange

protected void _afterIncludeChange ( e )
Handles includeChange events.
Parameters:
e <EventFacade>
Returns: void

_afterPausedChange

protected void _afterPausedChange ( e )
Handles pausedChange events.
Parameters:
e <EventFacade>
Returns: void

_bindHostValueChangeEvents

protected void _bindHostValueChangeEvents ( )
Sets up event handlers for host attribute value change events.
Returns: void

_formatValue

protected void _formatValue ( value )
Formats a value for display based on its type.
Parameters:
value <Any> The value to format.
Returns: void

_onCollapseClick

protected void _onCollapseClick ( e )
Handles click events on the collapse button.
Parameters:
e <EventFacade>
Returns: void

_onFilter

protected void _onFilter ( e )
Handles valueChange events on the filter input.
Parameters:
e <EventFacade>
Returns: void

_onFilterEscapeKey

protected void _onFilterEscapeKey ( e )
Handles esc keyUp events on the filter input.
Parameters:
e <EventFacade>
Returns: void

_onPauseClick

protected void _onPauseClick ( e )
Handles click events on the pause checkbox.
Parameters:
e <EventFacade>
Returns: void

_purgeEvents

protected void _purgeEvents ( events )
Detaches all event handles in the given array.
Parameters:
events <Array> Array of event handles.
Returns: void

_renderAttr

protected void _renderAttr ( name , i )
Renders a single row (name column only) for the given attribute name.
Parameters:
name <String> Attribute name.
i <Number> Index.
Returns: void

_renderAttrs

protected void _renderAttrs ( )
Renders all rows (name column only) for all attributes.
Returns: void

_renderBody

protected void _renderBody ( )
Renders the body section of the UI. Intended for use only during the render lifecycle.
Returns: void

_renderFoot

protected void _renderFoot ( )
Renders the footer section of the UI. Intended for use only during the render lifecycle.
Returns: void

_renderHead

protected void _renderHead ( )
Renders the header section of the UI. Intended for use only during the render lifecycle.
Returns: void

_syncAttrs

protected void _syncAttrs ( )
Syncs the host's attributes with the Inspector instance and applies any include or exclude filters.
Returns: void

_uiFilterAttrs

protected void _uiFilterAttrs ( value )
Filters visible attributes by the given filter value.
Parameters:
value <String> Filter value.
Returns: void

_uiSetAttrValue

protected void _uiSetAttrValue ( name , value )
Sets the value for the given attribute name.
Parameters:
name <String> Attribute name.
value <Any> Attribute value.
Returns: void

_uiSetAttrValues

protected void _uiSetAttrValues ( )
Sets the value for all attributes.
Returns: void

_uiSetCollapsed

protected void _uiSetCollapsed ( collapsed )
Sets the UI collapsed state.
Parameters:
collapsed <Boolean> Whether the UI should be collapsed.
Returns: void

_uiSetDraggable

protected void _uiSetDraggable ( draggable )
Sets the UI draggable state.
Parameters:
draggable <Boolean> Whether the UI should be draggable.
Returns: void

_uiSetFilter

protected void _uiSetFilter ( value )
Sets the UI filter input witht the given filter value.
Parameters:
value <String> Filter value.
Returns: void

_uiSetHeight

protected void _uiSetHeight ( height )
Sets the height of the UI. Sets the body height to the specified height minus the combined heights of the header and footer. Overrides Widget.prototype._uiSetHeight.
Parameters:
height <Number> Height.
Returns: void

_uiSetHostDestroyed

protected void _uiSetHostDestroyed ( )
Sets the host destroyed state in the UI.
Returns: void

_uiSetPaused

protected void _uiSetPaused ( paused )
Sets the UI paused state.
Parameters:
paused <Boolean> Whether the UI should be paused.
Returns: void

_uiSetPosition

protected void _uiSetPosition ( )
Sets the UI position and zIndex, adjusting for the presence of other Inspector instances, such that they appear to stack. Intended to be called during the syncUI lifecycle event.
Returns: void

_uiSyncAttrs

protected void _uiSyncAttrs ( )
Mini lifecycle for updating all attributes. Purges existing host events, re-renders all attributes, then binds new host events.
Returns: void

Events

collapsedChange

collapsedChange ( event )
Fires when the value for the configuration attribute 'collapsed' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

draggableChange

draggableChange ( event )
Fires when the value for the configuration attribute 'draggable' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

excludeChange

excludeChange ( event )
Fires when the value for the configuration attribute 'exclude' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

filterChange

filterChange ( event )
Fires when the value for the configuration attribute 'filter' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

hostAttrsChange

hostAttrsChange ( event )
Fires when the value for the configuration attribute 'hostAttrs' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

hostChange

hostChange ( event )
Fires when the value for the configuration attribute 'host' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

includeChange

includeChange ( event )
Fires when the value for the configuration attribute 'include' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

nameChange

nameChange ( event )
Fires when the value for the configuration attribute 'name' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

pausedChange

pausedChange ( event )
Fires when the value for the configuration attribute 'paused' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

stringsChange

stringsChange ( event )
Fires when the value for the configuration attribute 'strings' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

collapsed - Boolean

If true, Inspector will initially render collapsed.
Default Value: false

draggable - Boolean

If true Inspector will be draggable, with the header node as the drag handle.
Default Value: true

exclude - Array

Array of attribute names to exclude from being displayed.

filter - String

Filter text value.

host - writeonce Object

The object to inspect.

hostAttrs - Object

Name/value pairs of the host object's attributes.

include - Array

Array of attribute names to include. Opposite of, and overrides exclude.

name - writeonce String

Display name of the Inspector instance. If not specified, the host object's name property will be used if present.

paused - Boolean

If true, Inspector will intitally be paused.
Default Value: false

strings - Object

Translatable strings used by Inspector.


Copyright © 2011 Yahoo! Inc. All rights reserved.