All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.dnd.TargetMulticaster

java.lang.Object
   |
   +----com.ibm.dnd.TargetMulticaster

public class TargetMulticaster
extends Object
implements DDTarget
A class implementing DDTarget that allows several DDTarget to handle events for single component. To do that it is necessary to associate a TargetMulticaster with the component by using DDUtilities.registerTarget() method and add the required DDTarget objects by using the TargetMulticaster's addTarget method.

DDTarget implementation methods loop through the added DDTargets and call the corresponding methods. The exceptions are dragOver and drop methods. They call the corresponding method of each DDTarget until the first one that returns true which means that the drag/drop can be accepted.


Constructor Index

 o TargetMulticaster()
TargetMulticaster constructor.

Method Index

 o addTarget(DDTarget)
Adds DDTarget to the list
 o dragEnter()
DDSource interface implementation method.
 o dragExit()
DDTarget interface implementation method.
 o dragOver(DataFlavorRecognizer, Point)
DDTarget interface implementation method.
 o drop(Transferable, Point)
DDTarget interface implementation method.
 o dropComplete()
DDTarget interface implementation method.
 o isEmpty()
Returns whether the list of DDTarget objects is empty
 o removeTarget(DDTarget)
Removes DDTarget from list

Constructors

 o TargetMulticaster
 public TargetMulticaster()
TargetMulticaster constructor.

Methods

 o addTarget
 public void addTarget(DDTarget target)
Adds DDTarget to the list

Parameters:
target - com.ibm.dnd.DDTarget
See Also:
removeTarget
 o dragEnter
 public void dragEnter()
DDSource interface implementation method. Calls dragEnter for each target

 o dragExit
 public void dragExit()
DDTarget interface implementation method. Calls dragExit method of each target.

See Also:
dragExit
 o dragOver
 public boolean dragOver(DataFlavorRecognizer dataFlavorRecognizer,
                         Point location)
DDTarget interface implementation method. Calls dragOver of each target until the first one that returns true.

See Also:
dragOver
 o drop
 public boolean drop(Transferable source,
                     Point point)
DDTarget interface implementation method. Calls drop of each target until the first one that returns true.

See Also:
drop
 o dropComplete
 public void dropComplete()
DDTarget interface implementation method. Calls drop for the target that accepted the drop

See Also:
dropComplete
 o isEmpty
 public boolean isEmpty()
Returns whether the list of DDTarget objects is empty

Returns:
boolean indicatin whether list of DDTarget objects is empty
 o removeTarget
 public void removeTarget(DDTarget target)
Removes DDTarget from list

Parameters:
target - com.ibm.dnd.DDTarget
See Also:
addTarget

All Packages  Class Hierarchy  This Package  Previous  Next  Index