Package docking.dnd
Class GhidraTransferable
- java.lang.Object
-
- docking.dnd.GhidraTransferable
-
- All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner
,java.awt.datatransfer.Transferable
public class GhidraTransferable extends java.lang.Object implements java.awt.datatransfer.Transferable, java.awt.datatransfer.ClipboardOwner
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.datatransfer.DataFlavor
localGhidraFlavor
A static instance of the local flavor that is an ArrayList of user object objects.
-
Constructor Summary
Constructors Constructor Description GhidraTransferable(java.util.List<?> dataList)
Constructs a new Transferable from the array of DragDropNodes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getTransferData(java.awt.datatransfer.DataFlavor f)
Return the transfer data with the given data flavor.java.awt.datatransfer.DataFlavor[]
getTransferDataFlavors()
Return all data flavors that this class supports.boolean
isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
Return whether the specifed data flavor is supported.void
lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
Notification we have lost ownership of the clipboard because something else was put on the clipboard.java.lang.String
toString()
Get the string representation for this transferable.
-
-
-
Method Detail
-
getTransferDataFlavors
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Return all data flavors that this class supports.- Specified by:
getTransferDataFlavors
in interfacejava.awt.datatransfer.Transferable
-
isDataFlavorSupported
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
Return whether the specifed data flavor is supported.- Specified by:
isDataFlavorSupported
in interfacejava.awt.datatransfer.Transferable
- Parameters:
f
- the DataFlavor to check if supported.
-
getTransferData
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor f) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
Return the transfer data with the given data flavor.- Specified by:
getTransferData
in interfacejava.awt.datatransfer.Transferable
- Parameters:
f
- the DataFlavor for which to get a Transferable.- Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
-
toString
public java.lang.String toString()
Get the string representation for this transferable.- Overrides:
toString
in classjava.lang.Object
-
lostOwnership
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
Notification we have lost ownership of the clipboard because something else was put on the clipboard.- Specified by:
lostOwnership
in interfacejava.awt.datatransfer.ClipboardOwner
- Parameters:
clipboard
- the system clipboard.contents
- the Transferable lost in the clipboard.
-
-