(
config
)
- Parameters:
-
config <Object>
Object literal specifying widget configuration properties.
(
config
)
config
<Object>
Object literal specifying widget configuration properties.
String
String
String | Node
String
Object
static Object
static Object
{ // Set single Node references using selector syntax // (selector is run through node.one) titleNode: "span.yui-title", // Set NodeList references using selector syntax // (array indicates selector is to be run through node.all) listNodes: ["li.yui-item"], // Set other attribute types, using a parse function. // Context is set to the widget instance. label: function(contentBox) { return contentBox.one("span.title").get("innerHTML"); } }
static String
Currently used to apply class identifiers to the bounding box and to classify events fired by the widget.
static final String
- writeonce String | Node
- writeonce String | Node
- boolean
- boolean
- {String | Number}
- writeonce boolean | Node
- boolean
- writeonce String | Node
- Object
- Number
- {String | Number}
protected
Object
_applyParsedConfig
(
)
Object
protected
void
_applyParser
(
config
)
HTML_PARSER
configuration for the
instance, to retrieve config data values.
config
<Object>
User configuration object (will be populated with values from Node)
protected
void
_bindDOM
(
)
protected
void
_bindUI
(
)
protected
void
_defaultCB
(
)
protected
void
_defRenderFn
(
e
,
parentNode
)
e
<EventFacade>
The Event object
parentNode
<Node>
The parent node to render to, if passed in to the render
method
protected
Node
_getSrcNode
(
)
Node
protected
void
_getUIEventNode
(
)
protected
void
_guid
(
)
protected
void
_onDocFocus
(
evt
)
evt
<EventFacade>
The event facade for the DOM focus event
protected
void
_onDocMouseDown
(
evt
)
evt
<EventFacade>
The event facade for the DOM focus event
protected
void
_removeLoadingClassNames
(
)
protected
void
_renderBoxClassNames
(
)
protected
void
_renderUI
(
)
protected
String
_strSetter
(
strings
)
strings
<Object>
String
protected
void
_syncUI
(
)
protected
void
_uiSetDisabled
(
val
)
val
<boolean>
protected
void
_uiSetFocused
(
val
,
src
)
val
<boolean>
src
<string>
String representing the source that triggered an update to
the UI.
protected
void
_uiSetHeight
(
val
)
val
<String | Number>
protected
void
_uiSetTabIndex
(
Number
)
Number
<object>
protected
void
_uiSetVisible
(
val
)
val
<boolean>
protected
void
_uiSetWidth
(
val
)
val
<String | Number>
protected
void
_uiSizeCB
(
expand
)
expand
<boolean>
protected
void
_unbindDOM
(
)
protected
void
_unbindUI
(
)
protected
void
_validTabIndex
(
tabIndex
)
tabIndex
<Number>
protected
void
bindUI
(
)
void
blur
(
)
protected
void
destructor
(
)
void
disable
(
)
void
enable
(
)
void
focus
(
)
void
getClassName
(
args*
)
Y.config.classNamePrefix
attribute used by ClassNameManager
and
Widget.NAME.toLowerCase()
(e.g. "yui-widget-xxxxx-yyyyy", based on default values for
the prefix and widget class name).
The instance based version of this method can be used to generate standard prefixed classnames, based on the instances NAME, as opposed to Widget.NAME. This method should be used when you need to use a constant class name across different types instances.
args*
<String*>
0..n strings which should be concatenated, using the default separator defined by ClassNameManager, to create the class name
String
getSkinName
(
)
String
String
getString
(
key
)
key
<String>
String
void
hide
(
)
protected
void
initializer
(
config
)
config
<Object>
Configuration object literal for the widget
final
void
render
(
parentNode
)
This method should only be invoked once for an initialized widget.
It delegates to the widget specific renderer method to do the actual work.
parentNode
<Object | String>
Optional. The Node under which the
Widget is to be rendered. This can be a Node instance or a CSS selector string.
If the selector string returns more than one Node, the first node will be used as the parentNode. NOTE: This argument is required if both the boundingBox and contentBox are not currently in the document. If it's not provided, the Widget will be rendered to the body of the current document in this case.
protected
void
renderer
(
)
protected
void
renderUI
(
)
void
show
(
)
protected
void
syncUI
(
)
String
toString
(
)
String
static
Widget
Widget.getByNode
(
node
)
In the case of nested widgets, the nearest bounding box ancestor is used to return the widget instance.
node
<Node | String>
The node for which to return a Widget instance. If a selector
string is passed in, which selects more than one node, the first node found is used.
Widget
boundingBoxChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
contentBoxChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
disabledChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
focusedChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
heightChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
idChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
renderChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
renderedChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
srcNodeChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
stringsChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
tabIndexChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
visibleChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added:
widget:contentUpdate
(
e
)
e<EventFacade>
The Event Facade
widget:render
(
e
)
Subscribers to the "on" moment of this event, will be notified before the widget is rendered.
Subscribers to the "after" moment of this event, will be notified after rendering is complete.
e<EventFacade>
The Event Facade
widthChange
(
event
)
event<Event.Facade>
An Event Facade object with the following attribute specific properties added: