org.geotools.swing.control
Class DnDListItemsTransferable<T>

Object
  extended by 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
Module:
modules/unsupported/swing (gt-swing.jar)

Constructor Summary
DnDListItemsTransferable(Collection<T> stuff)
          Constructor
 
Method Summary
 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.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface Transferable

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 interface Transferable

getTransferData

public List<T> getTransferData(DataFlavor flavor)
                        throws UnsupportedFlavorException,
                               IOException
Returns a List of items to be transferred.

Specified by:
getTransferData in interface Transferable
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.


Copyright © 1996-2010 Geotools. All Rights Reserved.