- Known Subclasses:
-
Plugin.Inspector
Real-time attribute inspector widget.
Constructor
Inspector
(
config
)
- Parameters:
-
config
<Object>
Configuration object.
Methods
protected
void
_afterCollapsedChange
(
e
)
Handles collaspedChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterDraggableChange
(
e
)
Handles draggableChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterExcludeChange
(
e
)
Handles excludeChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterFilterChange
(
e
)
Handles filterChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterHostAttrsChange
(
e
)
Handles hostAttrsChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterHostAttrValueChange
(
name
,
e
)
Handles [attribute]Change
events on the host.
- Parameters:
-
name
<String>
Attribute name.
-
e
<EventFacade>
- Returns:
void
protected
void
_afterHostDestroyedChange
(
e
)
Handles destroyedChange
events on the host.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterIncludeChange
(
e
)
Handles includeChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_afterPausedChange
(
e
)
Handles pausedChange
events.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_bindHostValueChangeEvents
(
)
Sets up event handlers for host attribute value change events.
protected
void
_formatValue
(
value
)
Formats a value for display based on its type.
- Parameters:
-
value
<Any>
The value to format.
- Returns:
void
protected
void
_onCollapseClick
(
e
)
Handles click
events on the collapse button.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_onFilter
(
e
)
Handles valueChange
events on the filter input.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_onFilterEscapeKey
(
e
)
Handles esc
keyUp
events on the filter input.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_onPauseClick
(
e
)
Handles click
events on the pause checkbox.
- Parameters:
-
e
<EventFacade>
- Returns:
void
protected
void
_purgeEvents
(
events
)
Detaches all event handles in the given array.
- Parameters:
-
events
<Array>
Array of event handles.
- Returns:
void
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
protected
void
_renderAttrs
(
)
Renders all rows (name column only) for all attributes.
protected
void
_renderBody
(
)
Renders the body section of the UI. Intended for use only during the
render lifecycle.
protected
void
_renderFoot
(
)
Renders the footer section of the UI. Intended for use only during the
render lifecycle.
protected
void
_renderHead
(
)
Renders the header section of the UI. Intended for use only during the
render lifecycle.
protected
void
_syncAttrs
(
)
Syncs the host's attributes with the Inspector instance and applies any
include
or exclude
filters.
protected
void
_uiFilterAttrs
(
value
)
Filters visible attributes by the given filter value.
- Parameters:
-
value
<String>
Filter value.
- Returns:
void
protected
void
_uiSetAttrValue
(
name
,
value
)
Sets the value for the given attribute name.
- Parameters:
-
name
<String>
Attribute name.
-
value
<Any>
Attribute value.
- Returns:
void
protected
void
_uiSetAttrValues
(
)
Sets the value for all attributes.
protected
void
_uiSetCollapsed
(
collapsed
)
Sets the UI collapsed state.
- Parameters:
-
collapsed
<Boolean>
Whether the UI should be collapsed.
- Returns:
void
protected
void
_uiSetDraggable
(
draggable
)
Sets the UI draggable state.
- Parameters:
-
draggable
<Boolean>
Whether the UI should be draggable.
- Returns:
void
protected
void
_uiSetFilter
(
value
)
Sets the UI filter input witht the given filter value.
- Parameters:
-
value
<String>
Filter value.
- Returns:
void
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
protected
void
_uiSetHostDestroyed
(
)
Sets the host destroyed state in the UI.
protected
void
_uiSetPaused
(
paused
)
Sets the UI paused state.
- Parameters:
-
paused
<Boolean>
Whether the UI should be paused.
- Returns:
void
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.
protected
void
_uiSyncAttrs
(
)
Mini lifecycle for updating all attributes. Purges existing host events,
re-renders all attributes, then binds new host events.
Events
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
(
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
(
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
(
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
(
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
(
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
(
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
(
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
(
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
(
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
If true
, Inspector will initially render collapsed.
Default Value: false
If true
Inspector will be draggable, with the header
node as the drag handle.
Default Value: true
Array of attribute names to exclude from being displayed.
Name/value pairs of the host object's attributes.
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.
If true
, Inspector will intitally be paused.
Default Value: false
Translatable strings used by Inspector.