Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class ContactListTransferHandler.ContactListTransferable

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.ContactListTransferHandler.ContactListTransferable
All Implemented Interfaces:
Transferable
Enclosing class:
ContactListTransferHandler

public class ContactListTransferHandler.ContactListTransferable
extends Object
implements Transferable

Transferable for JList that enables drag and drop of contacts.


Constructor Summary
ContactListTransferHandler.ContactListTransferable(int index, Object o)
          Creates an instance of ContactListTransferable.
 
Method Summary
 Object getTransferData(DataFlavor flavor)
          Returns the selected text.
 DataFlavor[] getTransferDataFlavors()
          Returns supported flavors.
 int getTransferIndex()
          Returns the index of the transferred list cell.
 boolean isDataFlavorSupported(DataFlavor flavor)
          Returns true if the given flavor is supported, otherwise returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactListTransferHandler.ContactListTransferable

public ContactListTransferHandler.ContactListTransferable(int index,
                                                          Object o)
Creates an instance of ContactListTransferable.

Parameters:
index - the index of the transferred object in the list
o - the transferred list object
Method Detail

getTransferDataFlavors

public DataFlavor[] getTransferDataFlavors()
Returns supported flavors.

Specified by:
getTransferDataFlavors in interface Transferable
Returns:
an array of supported flavors

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor flavor)
Returns true if the given flavor is supported, otherwise returns false.

Specified by:
isDataFlavorSupported in interface Transferable
Parameters:
flavor - the data flavor to verify
Returns:
true if the given flavor is supported, otherwise returns false

getTransferData

public Object getTransferData(DataFlavor flavor)
                       throws UnsupportedFlavorException,
                              IOException
Returns the selected text.

Specified by:
getTransferData in interface Transferable
Parameters:
flavor - the flavor
Returns:
the selected text
Throws:
UnsupportedFlavorException - if the requested data flavor is not supported.
IOException - if the data is no longer available in the requested flavor.

getTransferIndex

public int getTransferIndex()
Returns the index of the transferred list cell.

Returns:
the index of the transferred list cell

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.