src/share/classes/java/awt/datatransfer/Transferable.java

Print this page




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.datatransfer;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * Defines the interface for classes that can be used to provide data
  32  * for a transfer operation.
  33  * <p>
  34  * For information on using data transfer with Swing, see
  35  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
  36  * How to Use Drag and Drop and Data Transfer</a>,
  37  * a section in <em>The Java Tutorial</em>, for more information.
  38  *
  39  * @author      Amy Fowler
  40  */
  41 
  42 public interface Transferable {
  43 
  44     /**
  45      * Returns an array of DataFlavor objects indicating the flavors the data
  46      * can be provided in.  The array should be ordered according to preference
  47      * for providing the data (from most richly descriptive to least descriptive).
  48      * @return an array of data flavors in which this data can be transferred
  49      */
  50     public DataFlavor[] getTransferDataFlavors();
  51 
  52     /**
  53      * Returns whether or not the specified data flavor is supported for
  54      * this object.
  55      * @param flavor the requested flavor for the data


  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.awt.datatransfer;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * Defines the interface for classes that can be used to provide data
  32  * for a transfer operation.
  33  * <p>
  34  * For information on using data transfer with Swing, see
  35  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  36  * How to Use Drag and Drop and Data Transfer</a>,
  37  * a section in <em>The Java Tutorial</em>, for more information.
  38  *
  39  * @author      Amy Fowler
  40  */
  41 
  42 public interface Transferable {
  43 
  44     /**
  45      * Returns an array of DataFlavor objects indicating the flavors the data
  46      * can be provided in.  The array should be ordered according to preference
  47      * for providing the data (from most richly descriptive to least descriptive).
  48      * @return an array of data flavors in which this data can be transferred
  49      */
  50     public DataFlavor[] getTransferDataFlavors();
  51 
  52     /**
  53      * Returns whether or not the specified data flavor is supported for
  54      * this object.
  55      * @param flavor the requested flavor for the data