diff options
author | Yana Stamcheva <yana@jitsi.org> | 2010-09-13 18:26:51 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2010-09-13 18:26:51 +0000 |
commit | 4876c2b79cac9a4a39e7257af952d0c3ea8b95ce (patch) | |
tree | 9ba27e8bfc6dc7a3548e0f41a5e8e3987efa9749 /src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java | |
parent | 641158db881223701cd90124c744dfb292a7124e (diff) | |
download | jitsi-4876c2b79cac9a4a39e7257af952d0c3ea8b95ce.zip jitsi-4876c2b79cac9a4a39e7257af952d0c3ea8b95ce.tar.gz jitsi-4876c2b79cac9a4a39e7257af952d0c3ea8b95ce.tar.bz2 |
Fixes drag component in contact list (including disappearing name or icon, text or image cutting, etc.).
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java index 6c074c6..5e4bf6c 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTransferHandler.java @@ -6,6 +6,7 @@ */ package net.java.sip.communicator.impl.gui.main.contactlist; +import java.awt.*; import java.awt.datatransfer.*; import java.io.*; import java.util.*; @@ -244,7 +245,7 @@ public class ContactListTransferHandler */ public Icon getVisualRepresentation(Transferable t) { - ContactListTreeCellRenderer renderer = null; + Icon icon = null; if (t instanceof ContactListTransferable) { @@ -252,17 +253,11 @@ public class ContactListTransferHandler try { - renderer = (ContactListTreeCellRenderer) - contactList.getCellRenderer() - .getTreeCellRendererComponent( + icon = ((ContactListTreeCellRenderer) + contactList.getCellRenderer()).getDragIcon( contactList, transferable.getTransferData(uiContactDataFlavor), - true, // is selected - false, // is expanded - true, // is leaf - transferable.getTransferIndex(), - true // has focus - ); + transferable.getTransferIndex()); } catch (UnsupportedFlavorException e) { @@ -280,7 +275,7 @@ public class ContactListTransferHandler } } - return renderer; + return icon; } /** |