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.
-
TargetMulticaster()
- TargetMulticaster constructor.
-
addTarget(DDTarget)
- Adds DDTarget to the list
-
dragEnter()
- DDSource interface implementation method.
-
dragExit()
- DDTarget interface implementation method.
-
dragOver(DataFlavorRecognizer, Point)
- DDTarget interface implementation method.
-
drop(Transferable, Point)
- DDTarget interface implementation method.
-
dropComplete()
- DDTarget interface implementation method.
-
isEmpty()
- Returns whether the list of DDTarget objects is empty
-
removeTarget(DDTarget)
- Removes DDTarget from list
TargetMulticaster
public TargetMulticaster()
- TargetMulticaster constructor.
addTarget
public void addTarget(DDTarget target)
- Adds DDTarget to the list
- Parameters:
- target - com.ibm.dnd.DDTarget
- See Also:
- removeTarget
dragEnter
public void dragEnter()
- DDSource interface implementation method. Calls dragEnter for each target
dragExit
public void dragExit()
- DDTarget interface implementation method. Calls dragExit method of each target.
- See Also:
- dragExit
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
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
dropComplete
public void dropComplete()
- DDTarget interface implementation method.
Calls drop for the target that accepted the drop
- See Also:
- dropComplete
isEmpty
public boolean isEmpty()
- Returns whether the list of DDTarget objects is empty
- Returns:
- boolean indicatin whether list of DDTarget objects is empty
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