|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
net.java.sip.communicator.util.swing.ExtendedTransferHandler
net.java.sip.communicator.impl.gui.main.contactlist.ContactListTransferHandler
public class ContactListTransferHandler
A TransferHandler that we use to handle DnD operations in our ContactList.
| Nested Class Summary | |
|---|---|
class |
ContactListTransferHandler.ContactListTransferable
Transferable for JList that enables drag and drop of contacts. |
| Nested classes/interfaces inherited from class net.java.sip.communicator.util.swing.ExtendedTransferHandler |
|---|
ExtendedTransferHandler.SelectedTextTransferable |
| Nested classes/interfaces inherited from class javax.swing.TransferHandler |
|---|
TransferHandler.DropLocation, TransferHandler.TransferSupport |
| Field Summary | |
|---|---|
protected static DataFlavor |
uiContactDataFlavor
The data flavor used when transferring UIContacts. |
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, LINK, MOVE, NONE |
| Constructor Summary | |
|---|---|
ContactListTransferHandler(DefaultTreeContactList contactList)
Creates an instance of ContactListTransferHandler passing the contactList which uses this TransferHandler. |
|
| Method Summary | |
|---|---|
boolean |
canImport(JComponent comp,
DataFlavor[] flavor)
Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it. |
Transferable |
createTransferable(JComponent component)
Creates a transferable for text pane components in order to enable drag and drop of text. |
Icon |
getVisualRepresentation(Transferable t)
Overrides TransferHandler.getVisualRepresentation(Transferable t) in order to return a custom drag icon. |
boolean |
importData(JComponent comp,
Transferable t)
Handles transfers to the contact list from the clip board or a DND drop operation. |
| Methods inherited from class net.java.sip.communicator.util.swing.ExtendedTransferHandler |
|---|
exportAsDrag, exportToClipboard, getSourceActions |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, exportDone, getCopyAction, getCutAction, getPasteAction, importData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final DataFlavor uiContactDataFlavor
| Constructor Detail |
|---|
public ContactListTransferHandler(DefaultTreeContactList contactList)
contactList - the DefaultContactList which uses this
TransferHandler| Method Detail |
|---|
public Transferable createTransferable(JComponent component)
createTransferable in class ExtendedTransferHandlercomponent - the component for which to create a
Transferable
public boolean canImport(JComponent comp,
DataFlavor[] flavor)
canImport in class ExtendedTransferHandlercomp - componentflavor - the data formats available
NullPointerException - if support is null
public boolean importData(JComponent comp,
Transferable t)
importData in class TransferHandlercomp - the component to receive the transfert - the data to import
TransferHandler.importData(JComponent, Transferable)public Icon getVisualRepresentation(Transferable t)
The default parent implementation of this method returns null.
getVisualRepresentation in class ExtendedTransferHandlert - the data to be transferred; this value is expected to have been
created by the createTransferable method
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||