public class ChatTransferHandler extends ExtendedTransferHandler
ExtendedTransferHandler.SelectedTextTransferable
Modifier and Type | Field and Description |
---|---|
protected static java.awt.datatransfer.DataFlavor |
uiContactDataFlavor
The data flavor used when transferring UIContacts.
|
Constructor and Description |
---|
ChatTransferHandler(ChatPanel chatPanel)
Constructs the ChatTransferHandler by specifying the
ChatPanel we're currently dealing with.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canImport(javax.swing.JComponent comp,
java.awt.datatransfer.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(javax.swing.JComponent comp,
java.awt.datatransfer.Transferable t)
Handles transfers to the chat panel from the clip board or a
DND drop operation.
|
createTransferable, exportAsDrag, exportToClipboard, getSelectedTextFromComponent, getSourceActions, getVisualRepresentation
protected static final java.awt.datatransfer.DataFlavor uiContactDataFlavor
public ChatTransferHandler(ChatPanel chatPanel)
chatPanel
- the ChatPanel we're currently dealing withpublic boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] flavor)
canImport
in class ExtendedTransferHandler
comp
- componentflavor
- the data formats availablejava.lang.NullPointerException
- if support
is null
public boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
importData
in class javax.swing.TransferHandler
comp
- the component to receive the transfer;t
- the data to import
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.