Print Friendly

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.

Properties   -  Methods   -  Events

Public Properties

This class has no public properties.

Public Methods

Method Defined By
  getHandleString/HTMLElement id ) : Object Registry
Returns the handle registered for a DOM Node by id
  getHandleFromEventEvent e ) : Object Registry
Returns the handle that is registered for the DOM node that is the target of the event
  getTargetString/HTMLElement id ) : Object Registry
Returns a custom data object that is registered for a DOM node by id
  getTargetFromEventEvent e ) : Object Registry
Returns a custom data object that is registered for the DOM node that is the target of the event
  registerString/HTMLElement) element, [Object data] ) : void Registry
Register a drag drop element
  unregisterString/HTMLElement) element ) : void Registry
Unregister a drag drop element

Public Events

This class has no public events.

Method Details

getHandle

public function getHandle( String/HTMLElement id )
Returns the handle registered for a DOM Node by id
Parameters:
  • id : String/HTMLElement
    The DOM node or id to look up
Returns:
  • 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
Parameters:
  • e : Event
    The event
Returns:
  • 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
Parameters:
  • id : String/HTMLElement
    The DOM node or id to look up
Returns:
  • 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
Parameters:
  • e : Event
    The event
Returns:
  • Object
    data The custom data
This method is defined by Registry.

register

public function register( String/HTMLElement) element, [Object data] )
Register a drag drop element
Parameters:
  • element : String/HTMLElement)
    The id or DOM node to register
  • data : Object
    (optional) A 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
Returns:
  • void
This method is defined by Registry.

unregister

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

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