org.favabeans.base
Interface DnDTargetContainer

All Superinterfaces:
Facet
All Known Implementing Classes:
DefaultDnDTargetContainer, Defaults.DirectoryDnDTarget

public interface DnDTargetContainer
extends Facet

The DnDTargetContainer Facet of an object provides behaviors for accepting a Drag and Drop (DnD) operation.

Note regarding data types: Data types in this interface are specified in terms of java.awt.activation.DataFlavor. All data type information under the control of FavaBeans will be supplied in terms of Type objects, so a FavaBeans-only application may choose to simply ignore any other java.awt.activation.DataFlavor. An implementation that wishes to be more interoperable (for example, one that wishes to participate in native platform DnD) may, at its option, accept java.awt.activation.DataFlavors that are not Types.

See Also:
DnDSourceContainer, DataTransfer

Method Summary
 void copy(Object operand)
          Make a copy of the specified object and place it in this container.
 DataFlavor[] getSupportedDropFlavors(DnDAction action)
          Determine what data flavors are acceptable to this container for the specified action.
 void link(Object operand)
          Create a link to the specified object in this container.
 void move(Object operand)
          Move the specified object into this container.
 
Methods inherited from interface org.favabeans.base.Facet
getPrimaryObject
 

Method Detail

getSupportedDropFlavors

public DataFlavor[] getSupportedDropFlavors(DnDAction action)
Determine what data flavors are acceptable to this container for the specified action. An object may return empty arrays from this operation to indicate that it does not wish to participate as a target container in DnD operations.
Parameters:
action - the desired drag and drop action.
Returns:
the acceptable data flavors for the supplied action.

move

public void move(Object operand)
          throws DropException
Move the specified object into this container.
Parameters:
operand - the object to move.
Throws:
DropException - if there was a problem completing the operation.

copy

public void copy(Object operand)
          throws DropException
Make a copy of the specified object and place it in this container.
Parameters:
operand - the object to copy.
Throws:
DropException - if there was a problem completing the operation.

link

public void link(Object operand)
          throws DropException
Create a link to the specified object in this container.
Parameters:
operand - the object to link.
Throws:
DropException - if there was a problem completing the operation.


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.