AWT/Swing merge from GNU Classpath.
From-SVN: r56147
This commit is contained in:
parent
097684ce62
commit
7bde45b2eb
490 changed files with 86038 additions and 9753 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Transferable.java -- Data transfer source
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -41,52 +41,41 @@ package java.awt.datatransfer;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* This interface is implemented by classes that can transfer data.
|
||||
*
|
||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||
*/
|
||||
* This interface is implemented by classes that can transfer data.
|
||||
*
|
||||
* @author Aaron M. Renn <arenn@urbanophile.com>
|
||||
* @since 1.1
|
||||
* @status updated to 1.4
|
||||
*/
|
||||
public interface Transferable
|
||||
{
|
||||
/**
|
||||
* This method returns a list of available data flavors for the data being
|
||||
* transferred. The array returned will be sorted from most preferred
|
||||
* flavor at the beginning to least preferred at the end.
|
||||
*
|
||||
* @return adA list of data flavors for this data
|
||||
*/
|
||||
public abstract DataFlavor[] getTransferDataFlavors();
|
||||
|
||||
/**
|
||||
* Returns the data in the specified <code>DataFlavor</code>
|
||||
*
|
||||
* @param flavor The data flavor to return.
|
||||
*
|
||||
* @return The data in the appropriate flavor.
|
||||
*
|
||||
* @exception UnsupportedFlavorException If the flavor is not supported.
|
||||
* @exception IOException If the data is not available.
|
||||
*/
|
||||
public abstract Object
|
||||
getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,
|
||||
IOException;
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* This method returns a list of available data flavors for the
|
||||
* data being transferred. The array returned will be sorted from most
|
||||
* preferred flavor at the beginning to least preferred at the end.
|
||||
*
|
||||
* @return A list of data flavors for this data.
|
||||
*/
|
||||
public abstract DataFlavor[]
|
||||
getTransferDataFlavors();
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Tests whether or not this data can be delivered in the specified
|
||||
* data flavor.
|
||||
*
|
||||
* @param flavor The data flavor to test.
|
||||
*
|
||||
* @return <code>true</code> if the data flavor is supported,
|
||||
* <code>false</code> otherwise.
|
||||
*/
|
||||
public abstract boolean
|
||||
isDataFlavorSupported(DataFlavor flavor);
|
||||
/**
|
||||
* Tests whether or not this data can be delivered in the specified data
|
||||
* flavor.
|
||||
*
|
||||
* @param flavor the data flavor to test
|
||||
* @return true if the data flavor is supported
|
||||
*/
|
||||
public abstract boolean isDataFlavorSupported(DataFlavor flavor);
|
||||
|
||||
/**
|
||||
* Returns the data in the specified <code>DataFlavor</code>.
|
||||
*
|
||||
* @param flavor the data flavor to return
|
||||
* @return the data in the appropriate flavor
|
||||
* @throws UnsupportedFlavorException if the flavor is not supported
|
||||
* @throws IOException if the data is not available
|
||||
* @see DataFlavor#getRepresentationClass
|
||||
*/
|
||||
public abstract Object getTransferData(DataFlavor flavor)
|
||||
throws UnsupportedFlavorException, IOException;
|
||||
} // interface Transferable
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue