打印版式

Class Ext.EventManager

Package:Ext
Class:EventManager
Extends:Object
Defined In:EventManager.js
Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides several useful events directly. See Ext.EventObject for more details on normalized event objects.

This class is a singleton and cannot be created directly.

属性   -  方法   -  事件

公共属性

属性 定义对象
  ieDeferSrc : Object EventManager
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)

公共方法

方法 定义对象
  addListener(String/HTMLElement element, String eventName, Function fn, Object options) : void EventManager
加入一个事件处理器
  onDocumentReady(Function fn, Object scope, boolean options) : void EventManager
Fires when the document is ready (before onload and before images are loaded). Can be accessed shorthanded Ext.onRea...
  onTextResize(Function fn, Object scope, boolean options) : void EventManager
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
  onWindowResize(Function fn, Object scope, boolean options) : void EventManager
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and...
  removeListener(String/HTMLElement element, String eventName, Function fn) : Boolean EventManager
Removes an event handler
  removeResizeListener(Function fn, Object scope) : void EventManager
Removes the passed window resize listener.
  wrap(Function fn, Object scope, boolean override) : Function EventManager
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override t...

公共事件

此类没有公共事件。

属性详情

ieDeferSrc

public Object ieDeferSrc
Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
This property is defined by EventManager.

方法详情

addListener

public function addListener(String/HTMLElement element, String eventName, Function fn, Object options)
加入一个事件处理器
参数:
  • element : String/HTMLElement
    The html element or id to assign the event to
  • eventName : String
    The type of event to append
  • fn : Function
    事件调用的方法
  • options : Object
    An object with standard EventManager options
返回:
  • void
This method is defined by EventManager.

onDocumentReady

public function onDocumentReady(Function fn, Object scope, boolean options)
Fires when the document is ready (before onload and before images are loaded). Can be accessed shorthanded Ext.onReady().
参数:
  • fn : Function
    事件调用的方法
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
返回:
  • void
This method is defined by EventManager.

onTextResize

public function onTextResize(Function fn, Object scope, boolean options)
Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.
参数:
  • fn : Function
    事件调用的方法
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
返回:
  • void
This method is defined by EventManager.

onWindowResize

public function onWindowResize(Function fn, Object scope, boolean options)
Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.
参数:
  • fn : Function
    事件调用的方法
  • scope : Object
    An object that becomes the scope of the handler
  • options : boolean
返回:
  • void
This method is defined by EventManager.

removeListener

public function removeListener(String/HTMLElement element, String eventName, Function fn)
Removes an event handler
参数:
  • element : String/HTMLElement
    The id or html element to remove the event from
  • eventName : String
    The type of event
  • fn : Function
返回:
  • Boolean
    True if a listener was actually removed
This method is defined by EventManager.

removeResizeListener

public function removeResizeListener(Function fn, Object scope)
Removes the passed window resize listener.
参数:
  • fn : Function
    事件调用的方法
  • scope : Object
    The scope of handler
返回:
  • void
This method is defined by EventManager.

wrap

public function wrap(Function fn, Object scope, boolean override)
Deprecated. This is no longer needed and is deprecated. Places a simple wrapper around an event handler to override the browser event object with a Ext.EventObject
参数:
  • fn : Function
    事件调用的方法
  • scope : Object
    An object that becomes the scope of the handler
  • override : boolean
    If true, the obj passed in becomes the execution scope of the listener
返回:
  • Function
    The wrapped function
This method is defined by EventManager.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.