| org.apache.ojb.tools.mapping.reversedb2.dnd2.DropPasteWorkerInterface
All known Subclasses: org.apache.ojb.tools.mapping.reversedb2.dnd2.RejectAllDropWorker, org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.ReverseDbNodesToOjbMetaDropWorker, org.apache.ojb.tools.mapping.reversedb2.dnd2.ReverseDbNodesDropWorker,
DropPasteWorkerInterface | public interface DropPasteWorkerInterface (Code) | | This interface is used by DropTargetHelper to determine whether a drop
can be performed and to import the data from the transferable into the
model of the component.
author: Florian Bruckner version: $Id: DropPasteWorkerInterface.java,v 1.1.2.1 2005/12/21 22:32:42 tomdz Exp $ |
getAcceptableActions | int getAcceptableActions(Component c, DataFlavor[] flavor)(Code) | | Returns a bitmaks of acceptable actions for the supplied Component
and DataFlavor. If more than one DataFlavor is queried, the resulting
bitmask should include all possible actions for all flavors.
a bitmask of actions this Worker can process with the suppliedflavors. Parameters: c - The component that is the possible drop target. Parameters: flavor - The DataFlavours that are associate with the drop action |
getAcceptableActions | int getAcceptableActions(Component c)(Code) | | Returns a bitmask of acceptable actions for this component. As this
method doesn't provide the DataFlavors in this action, all possible
acceptable actions should be returned. All possible actions are defined
in DnDWorkerConstants
a bitmask of actions this Worker capable of. Parameters: c - The component where the drop could occur. |
getSupportedDataFlavor | public DataFlavor getSupportedDataFlavor()(Code) | | the DataFlavor this Worker is going to accept. |
importData | boolean importData(Component c, Transferable t, int action)(Code) | | This is the method that is doing the real work. You get the Component
where the drop has occurred, the Transferable with the data and the
requested action.
true if the transfer was successful, false if not. If thereare more than one Workers are registered with the helper and thismethod returns false, the next helper is asked to do the import. If trueis returned, the action is supposed to be complete and no other workerwill be asked. So be careful what you return here, if you return false,no modification to the target model should have happened. Parameters: c - The component where the drop has occurred Parameters: t - The transferable that shall be imported Parameters: action - The action that should be performed. |
|
|