Package org.geotools.swing.control
Class DnDListItemsTransferable<T>
- Object
-
- DnDListItemsTransferable<T>
-
- All Implemented Interfaces:
Transferable
public class DnDListItemsTransferable<T> extends Object implements Transferable
Implements the Transferable interface to carry list item data during drag and drop actions. This class is used by DnDList. Client code will not normally need to refer to it.- Since:
- 2.6
- Author:
- Michael Bedward
- See Also:
DnDList
-
-
Constructor Summary
Constructors Constructor Description DnDListItemsTransferable(Collection<T> stuff)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
getTransferData(DataFlavor flavor)
Returns a List of items to be transferred.DataFlavor[]
getTransferDataFlavors()
Description copies from interface:
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.boolean
isDataFlavorSupported(DataFlavor flavor)
Description copies from interface:
Returns whether or not the specified data flavor is supported for this object.
-
-
-
Constructor Detail
-
DnDListItemsTransferable
public DnDListItemsTransferable(Collection<T> stuff)
Constructor- Parameters:
stuff
- a Collection of list item data
-
-
Method Detail
-
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
Description copies from interface:
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).- Specified by:
getTransferDataFlavors
in interfaceTransferable
-
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
Description copies from interface:
Returns whether or not the specified data flavor is supported for this object.- Specified by:
isDataFlavorSupported
in interfaceTransferable
-
getTransferData
public List<T> getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
Returns a List of items to be transferred.- Specified by:
getTransferData
in interfaceTransferable
- Parameters:
flavor
- - required by the interface but ignored here- Throws:
IOException
- if the data is no longer available in the requested flavor.UnsupportedFlavorException
- if the requested data flavor is not supported.
-
-