net.java.sip.communicator.impl.gui.main.call
Class CallTransferHandler
java.lang.Object
javax.swing.TransferHandler
net.java.sip.communicator.util.swing.ExtendedTransferHandler
net.java.sip.communicator.impl.gui.main.call.CallTransferHandler
- All Implemented Interfaces:
- Serializable
public class CallTransferHandler
- extends ExtendedTransferHandler
A TransferHandler that we use to handle dropping of UIContacts or
simple string addresses to an existing Call. Dropping of a such data
in the CallDialog would result in the creation of a call conference.
- Author:
- Yana Stamcheva
- See Also:
- Serialized Form
|
Constructor Summary |
CallTransferHandler(Call call)
Creates an instance of CallTransferHandler by specifying the
call, to which dragged callees will be added. |
|
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. |
boolean |
importData(JComponent comp,
Transferable t)
Handles transfers to the chat panel from the clip board or a
DND drop operation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
uiContactDataFlavor
protected static final DataFlavor uiContactDataFlavor
- The data flavor used when transferring UIContacts.
CallTransferHandler
public CallTransferHandler(Call call)
- Creates an instance of CallTransferHandler by specifying the
call, to which dragged callees will be added.
- Parameters:
call - the call to which the dragged callees will be added
canImport
public 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. We return
true to indicate that the transfer with at least one of the
given flavors would work and false to reject the transfer.
- Overrides:
canImport in class ExtendedTransferHandler
- Parameters:
comp - componentflavor - the data formats available
- Returns:
- true if the data can be inserted into the component, false
otherwise
- Throws:
NullPointerException - if support is null
importData
public boolean importData(JComponent comp,
Transferable t)
- Handles transfers to the chat panel from the clip board or a
DND drop operation. The Transferable parameter contains the
data that needs to be imported.
- Overrides:
importData in class TransferHandler
- Parameters:
comp - the component to receive the transfer;t - the data to import
- Returns:
- true if the data was inserted into the component and false
otherwise
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.