Component.Controller
Base Controller class for KISSY Component. xclass: 'controller'.
parents: Component.UIBase, Component.UIBase.Box
defined in: controller.js
Class
Attributes
- active {Boolean} Whether this component is activated.
- activeable {Boolean} Whether this component can be activated.
- children {Component.Controller[]} Array of child components
- disabled {Boolean} Whether this component is disabled.
- focusable {Boolean} Whether this component can get focus.
- focused {Boolean} Whether this component has focus.
- handleMouseEvents {Boolean} Enables or disables mouse event handling for the component.
- highlighted {Boolean} Whether this component is highlighted.
- parent {Component.Controller} This component's parent component.
- prefixCls {String} This component's prefix css class.
- view {Component.Render} Renderer used to render this component.
Methods
- addChild (c, index) Add the specified component as a child of current component at the given 0-based index.
- bindUI () From UIBase.
- createDom () From UIBase.
- getChildAt (index) Returns the child at the given index, or null if the index is out of bounds.
- getCssClassWithPrefix (classes) Get full class name for current component
- handleBlur (ev) Handles blur events.
- handleDblClick (ev) Handle dblclick events.
- handleFocus (ev) Handles focus events.
- handleKeydown (ev) Handle keydown events.
- handleKeyEventInternal (ev) Handle enter keydown event to Component.Controller#performActionInternal.
- handleMouseDown (ev) Handles mousedown events.
- handleMouseEnter (ev) Handle mouseenter events.
- handleMouseLeave (ev) Handle mouseleave events.
- handleMouseUp (ev) Handles mouseup events.
- initializer () From UIBase, Initialize this component.
- performActionInternal (ev) Performs the appropriate action when this component is activated by the user.
- removeChild (c, destroy) Removed the given child from this component,and returns it.
- removeChildren (destroy) Removes every child component attached to current component.
- renderUI () From UIBase.
- Methods borrowed from class Component.UIBase: create, destroy, render, syncUI
- Methods borrowed from class Base: set
- Methods borrowed from class Attribute: addAttr, addAttrs, get, getAttrs, getAttrVals, hasAttr, removeAttr, reset
- Methods borrowed from class Component.UIBase.Box: hide, show
Class Detail
-
Component.Controller ()Base Controller class for KISSY Component. xclass: 'controller'.
Attributes Detail
-
active {Boolean} Whether this component is activated.
-
activeable {Boolean} Whether this component can be activated. Default : true.
-
children {Component.Controller[]} Array of child components
-
disabled {Boolean} Whether this component is disabled.
-
focusable {Boolean} Whether this component can get focus. Default : true.
-
focused {Boolean} Whether this component has focus.
-
handleMouseEvents {Boolean} Enables or disables mouse event handling for the component. Containers may set this attribute to disable mouse event handling in their child component. Default : true.
-
highlighted {Boolean} Whether this component is highlighted.
-
parent {Component.Controller} This component's parent component.
-
prefixCls {String} This component's prefix css class.
-
view {Component.Render} Renderer used to render this component.
Methods Detail
-
addChild (c, index) view sourceAdd the specified component as a child of current component at the given 0-based index.
- Parameters
-
- c {Component.Controller|Object} Child component instance to be added or Object describe child component
- [ c.xclass ] {String} When c is a object, specify its child class.
- [ index ] {Number} 0-based index at which the new child component is to be inserted; If not specified , the new child component will be inserted at last position.
-
bindUI () view sourceFrom UIBase. Bind focus event if component is focusable.
-
createDom () view sourceFrom UIBase. Constructor(or get) view object to create ui elements.
-
getChildAt (index) view sourceReturns the child at the given index, or null if the index is out of bounds.
- Parameters
-
- index {Number} 0-based index.
- Returns
-
- {Component.Controller} The child at the given index; null if none.
-
getCssClassWithPrefix (classes) view sourceGet full class name for current component
- Parameters
-
- classes {String} class names without prefixCls. Separated by space.
- Returns
-
- {String} class name with prefixCls
-
handleBlur (ev) view sourceHandles blur events. Remove focused class.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleDblClick (ev) view sourceHandle dblclick events. By default, this performs its associated action by calling Component.Controller#performActionInternal.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleFocus (ev) view sourceHandles focus events. Style focused class.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleKeydown (ev) view sourceHandle keydown events. If the component is not disabled, call Component.Controller#handleKeyEventInternal
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleKeyEventInternal (ev) view sourceHandle enter keydown event to Component.Controller#performActionInternal.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleMouseDown (ev) view sourceHandles mousedown events. If the component is not disabled, If the component is activeable, then activate it. If the component is focusable, then focus it, else prevent it from receiving keyboard focus.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleMouseEnter (ev) view sourceHandle mouseenter events. If the component is not disabled, highlights it.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleMouseLeave (ev) view sourceHandle mouseleave events. If the component is not disabled, de-highlights it.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
handleMouseUp (ev) view sourceHandles mouseup events. If this component is not disabled, performs its associated action by calling Component.Controller#performActionInternal, then deactivates it.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
initializer () view sourceFrom UIBase, Initialize this component.
-
performActionInternal (ev) view sourcePerforms the appropriate action when this component is activated by the user.
- Parameters
-
- ev {Event.Object} DOM event to handle.
-
removeChild (c, destroy) view sourceRemoved the given child from this component,and returns it. If destroy is true, calls Component.UIBase.#destroy on the removed child component, 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.
- Parameters
-
- c {Component.Controller} The child component to be removed.
- [ destroy = false ] {Boolean} If true, calls Component.UIBase.#destroy on the removed child component.
- Returns
-
- {Component.Controller} The removed component.
-
removeChildren (destroy) view sourceRemoves every child component attached to current component.
- Parameters
-
- [ destroy ] {Boolean} If true, calls Component.UIBase.#destroy on the removed child component.
- See
-
renderUI () view sourceFrom UIBase. Call view object to render ui elements.
Classes
- Anim
- Anim.Easing
- Attribute
- Base
- Button
- ComboBox
- ComboBox.LocalDataSource
- ComboBox.RemoteDataSource
- Component
- Component.Container
- Component.Controller
- Component.Manager
- Component.Render
- Component.UIBase
- Component.UIBase.Align
- Component.UIBase.Box
- Component.UIBase.Close
- Component.UIBase.Constrain
- Component.UIBase.ContentBox
- Component.UIBase.Drag
- Component.UIBase.Loading
- Component.UIBase.Mask
- Component.UIBase.Position
- Component.UIBase.Resize
- Component.UIBase.StdMod
- Cookie
- DataLazyload
- DD
- DD.Constrain
- DD.DDM
- DD.Draggable
- DD.DraggableDelegate
- DD.Droppable
- DD.DroppableDelegate
- DD.Proxy
- DD.Scroll
- DOM
- Editor
- Editor.Range
- Editor.Utils
- Editor.Walker
- Event
- Event.Object
- Event.Target
- IO
- IO.XhrObject
- KISSY
- KISSY.Defer
- KISSY.Loader
- KISSY.Loader.Module
- KISSY.Loader.Package
- KISSY.Promise
- Menu
- Menu.FilterMenu
- Menu.Item
- Menu.PopupMenu
- Menu.Separator
- MenuButton
- MenuButton.Option
- MenuButton.Select
- MVC
- MVC.Collection
- MVC.Model
- MVC.Router
- MVC.View
- NodeList
- Overlay
- Overlay.Dialog
- Overlay.Popup
- Resizable
- Tree
- Tree.CheckNode
- Tree.CheckTree
- Tree.Node
- Waterfall
- Waterfall.Loader