Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.util.dnd
Class DragDropManager

java.lang.Object
  extended by oracle.ide.util.dnd.DragDropManager

public class DragDropManager
extends java.lang.Object

This class handles delegating to DragHelper and DropHelper objects for drag-and-drop operations in the navigators.

Intersted helpers must register with this manager, supplying the node type they are interested in.


Method Summary
 java.util.Iterator getDragHelpers(java.lang.Class registeredClass)
          Returns an iterator that includes all the drag helpers registered for the supplied Class.
 java.util.Iterator getDropHelpers(java.lang.Class registeredClass)
          Returns an iterator that includes all the DropHelpers registered for the supplied Class.
static DragDropManager getInstance()
          Returns an instance of the DragDropManager.
 void registerDragHelperForInstance(DragHelper helper, java.lang.Class supportedClass)
          Registers the DragHelper for use in drag operations on objects whose type is assignable to a variable of the type specified by the supplied Class.
 void registerDragHelperForType(DragHelper helper, java.lang.Class supportedClass)
          Registers a DragHelper for use in drag operations on objects whose type is the same as the supplied Class.
 void registerDropHelperForInstance(DropHelper helper, java.lang.Class supportedClass)
          Registers the DropHelper to handle data transfer operations where the drop target object is an instanceof the type specified by the Class parameter.
 void registerDropHelperForType(DropHelper helper, java.lang.Class supportedClass)
          Registers the DropHelper to handle data transfer operations where the drop target object is the same type as the type specified by the Class parameter.
 void unRegisterDragHelperForInstance(DragHelper helper, java.lang.Class dragClass)
          Updates the registry to remove the association between the the supplied DragHelper and any instance of the supplied Class.
 void unRegisterDragHelperForType(DragHelper helper, java.lang.Class cls)
          Updates the registry to remove the association between the the supplied DragHelper and the supplied Class.
 void unRegisterDropHelperForInstance(DropHelper helper, java.lang.Class registeredClass)
          Updates the registry to remove the association between the the supplied DropHelper and any instance of the supplied Class.
 void unRegisterDropHelperForType(DropHelper helper, java.lang.Class registeredClass)
          Updates the registry to remove the association between the the supplied DropHelper and the supplied Class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DragDropManager getInstance()
Returns an instance of the DragDropManager.

Returns:
the singleton

registerDragHelperForInstance

public void registerDragHelperForInstance(DragHelper helper,
                                          java.lang.Class supportedClass)
Registers the DragHelper for use in drag operations on objects whose type is assignable to a variable of the type specified by the supplied Class.

Typically, when you register a drag helper, you should also register a DropHelper to handle transfering the data from your DragHelper to a drop target.

Parameters:
helper - the DragHelper to register
supportedClass - if non-null, the supplied DragHelper will be used if the drag selection includes one or more objects whose type is assignable to a variable whose type is of the specified Class.
See Also:
registerDragHelperForType(DragHelper, Class), registerDropHelperForInstance(DropHelper, Class), registerDropHelperForType(DropHelper, Class)

registerDragHelperForType

public void registerDragHelperForType(DragHelper helper,
                                      java.lang.Class supportedClass)
Registers a DragHelper for use in drag operations on objects whose type is the same as the supplied Class.

Typically, when you register a drag helper, you should also register a DropHelper to handle transfering the data from your DragHelper to a drop target

Parameters:
helper - the DragHelper to register
supportedClass - if non-null, the supplied DragHelper will be used if the drag selection includes one or more objects whose type is the same as the type of the supplied Class.
See Also:
registerDragHelperForInstance(DragHelper, Class), registerDropHelperForInstance(DropHelper, Class), registerDropHelperForType(DropHelper, Class)

unRegisterDragHelperForInstance

public void unRegisterDragHelperForInstance(DragHelper helper,
                                            java.lang.Class dragClass)
Updates the registry to remove the association between the the supplied DragHelper and any instance of the supplied Class.

Parameters:
helper - a DragHelper
dragClass - the Class with which the DragHelper is registered
See Also:
registerDragHelperForInstance(DragHelper, Class), registerDragHelperForType(DragHelper, Class), unRegisterDragHelperForType(DragHelper, Class)

unRegisterDragHelperForType

public void unRegisterDragHelperForType(DragHelper helper,
                                        java.lang.Class cls)
Updates the registry to remove the association between the the supplied DragHelper and the supplied Class.

Parameters:
helper - a DragHelper
cls - the Class with which the DragHelper is registered
See Also:
registerDragHelperForInstance(DragHelper, Class), registerDragHelperForType(DragHelper, Class), unRegisterDragHelperForInstance(DragHelper, Class)

getDragHelpers

public java.util.Iterator getDragHelpers(java.lang.Class registeredClass)
Returns an iterator that includes all the drag helpers registered for the supplied Class. The helpers are in order by those that registered interest for a specific class, followed by helpers that registered interest in any instance of the supplied class.

Parameters:
registeredClass - the Class with which Helpers have registered
Returns:
an iterator over the registered DragHelpers
See Also:
registerDragHelperForInstance(oracle.ide.util.dnd.DragHelper, java.lang.Class), registerDragHelperForType(oracle.ide.util.dnd.DragHelper, java.lang.Class)

registerDropHelperForInstance

public void registerDropHelperForInstance(DropHelper helper,
                                          java.lang.Class supportedClass)
Registers the DropHelper to handle data transfer operations where the drop target object is an instanceof the type specified by the Class parameter. The supplied Class cannot be null.

Only one DropHelper can handle the data transfer. In the case where more than one helper is registered, the helper with the heavier weight gets priority.

Parameters:
helper - the DropHelper to register
supportedClass - the drop target must be an instanceof this Class
See Also:
registerDragHelperForType(DragHelper, Class), registerDragHelperForInstance(DragHelper, Class), registerDropHelperForType(DropHelper, Class)

registerDropHelperForType

public void registerDropHelperForType(DropHelper helper,
                                      java.lang.Class supportedClass)
Registers the DropHelper to handle data transfer operations where the drop target object is the same type as the type specified by the Class parameter. The supplied Class cannot be null.

Only one DropHelper can handle the data transfer. In the case where more than one helper is registered, the helper with the heavier weight gets priority.

Parameters:
helper - the DropHelper to register
supportedClass - the drop target must be an instanceof this Class
See Also:
registerDragHelperForType(DragHelper, Class), registerDragHelperForInstance(DragHelper, Class), registerDropHelperForInstance(DropHelper, Class)

unRegisterDropHelperForInstance

public void unRegisterDropHelperForInstance(DropHelper helper,
                                            java.lang.Class registeredClass)
Updates the registry to remove the association between the the supplied DropHelper and any instance of the supplied Class.

Parameters:
helper - a DropHelper
registeredClass - the Class with which the DropHelper is registered
See Also:
unRegisterDragHelperForType(DragHelper, Class)

unRegisterDropHelperForType

public void unRegisterDropHelperForType(DropHelper helper,
                                        java.lang.Class registeredClass)
Updates the registry to remove the association between the the supplied DropHelper and the supplied Class.

Parameters:
helper - a DropHelper
registeredClass - the Class with which the DropHelper is registered
See Also:
unRegisterDropHelperForInstance(DropHelper, Class)

getDropHelpers

public java.util.Iterator getDropHelpers(java.lang.Class registeredClass)
Returns an iterator that includes all the DropHelpers registered for the supplied Class. The helpers are in order by those that registered interest for a specific class, followed by helpers that registered interest in any instance of the supplied class.

Because only one DropHelper can handle a data transfer operation, if more than one is found that can handle the same drop, the helper with the heavier weight gets priority.

Parameters:
registeredClass - the Class with which Helpers have registered
Returns:
an iterator over the registered DropHelpers
See Also:
registerDropHelperForInstance(oracle.ide.util.dnd.DropHelper, java.lang.Class), registerDropHelperForType(oracle.ide.util.dnd.DropHelper, java.lang.Class), DropHelper.getWeight()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.