打印版式

Class Ext.dd.Registry

Package:Ext.dd
Class:Registry
Extends:Object
Defined In:Registry.js
Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.

This class is a singleton and cannot be created directly.

属性   -  方法   -  事件

公共属性

此类没有公共属性。

公共方法

方法 定义对象
  getHandle(String/HTMLElement id) : Object Registry
Returns the handle registered for a DOM Node by id
  getHandleFromEvent(Event e) : Object Registry
Returns the handle that is registered for the DOM node that is the target of the event
  getTarget(String/HTMLElement id) : Object Registry
Returns a custom data object that is registered for a DOM node by id
  getTargetFromEvent(Event e) : Object Registry
Returns a custom data object that is registered for the DOM node that is the target of the event
  register(String/HTMLElement) element, [Object data]) : void Registry
Resgister a drag drop element
  unregister(String/HTMLElement) element) : void Registry
Unregister a drag drop element

公共事件

此类没有公共事件。

方法详情

getHandle

public function getHandle(String/HTMLElement id)
Returns the handle registered for a DOM Node by id
参数:
  • id : String/HTMLElement
    The DOM node or id to look up
返回:
  • Object
    handle The custom handle data
This method is defined by Registry.

getHandleFromEvent

public function getHandleFromEvent(Event e)
Returns the handle that is registered for the DOM node that is the target of the event
参数:
  • e : Event
    The event
返回:
  • Object
    handle The custom handle data
This method is defined by Registry.

getTarget

public function getTarget(String/HTMLElement id)
Returns a custom data object that is registered for a DOM node by id
参数:
  • id : String/HTMLElement
    The DOM node or id to look up
返回:
  • Object
    data The custom data
This method is defined by Registry.

getTargetFromEvent

public function getTargetFromEvent(Event e)
Returns a custom data object that is registered for the DOM node that is the target of the event
参数:
  • e : Event
    The event
返回:
  • Object
    data The custom data
This method is defined by Registry.

register

public function register(String/HTMLElement) element, [Object data])
Resgister a drag drop element
参数:
  • element : String/HTMLElement)
    The id or DOM node to register
  • data : Object
    (可选) An custom data object that will be passed between the elements that are involved in drag drop operations. You can populate this object with any arbitrary properties that your own code knows how to interpret, plus there are some specific properties known to the Registry that should be populated in the data object (if applicable):
     Value Description
    --------- ------------------------------------------
    handles Array of DOM nodes that trigger dragging
    for the element being registered
    isHandle True if the element passed in triggers
    dragging itself, else false
返回:
  • void
This method is defined by Registry.

unregister

public function unregister(String/HTMLElement) element)
Unregister a drag drop element
参数:
  • element : String/HTMLElement)
    The id or DOM node to unregister
返回:
  • void
This method is defined by Registry.

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