|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DropHelper
Defines the interface for classes that can handle a data transfer (drop) operation.
Method Summary | |
---|---|
boolean |
canTransferData(java.lang.Object dropTarget, java.awt.datatransfer.DataFlavor[] transferFlavors, int action) Indicates whether a component would accept an import of the given set of data flavors prior to actually attempting to import it. |
float |
getWeight() Gets the sort weight for the helper. |
boolean |
transferData(java.lang.Object dropTarget, java.awt.datatransfer.Transferable[] transferablesForSelection, int action) Causes a transfer to a component from a clipboard or a drag-and-drop operation. |
Method Detail |
---|
boolean canTransferData(java.lang.Object dropTarget, java.awt.datatransfer.DataFlavor[] transferFlavors, int action)
dropTarget
- the object that will receive the transfertransferFlavors
- the DataFlavor
, or formats available for a transfer operationaction
- the current drop action as defined in DnDConstants
true
if the data can be inserted into the component, false
otherwiseDataFlavor
, DnDConstants
boolean transferData(java.lang.Object dropTarget, java.awt.datatransfer.Transferable[] transferablesForSelection, int action)
Transferable
represents the data to be imported into the component.dropTarget
- the object that will receive the transfertransferablesForSelection
- an array of Transferable
s for the drag selectionaction
- the current drop action as defined in DnDConstants
Transferable
, DnDConstants
float getWeight()
Because only one DropHelper
can be used to handle drops on a given drop target, weights are used to determine which drop helper to use. The higher weight values have priority over lower weight values. If two helpers have the same weight, the first one found will have priority.
The maximum weight is
.Float.MAX_VALUE
DropHelper
's weight
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |