Package ghidra.framework.main

# Class ToolButtonTransferable

java.lang.Object
ghidra.framework.main.ToolButtonTransferable

All Implemented Interfaces:
  `ClipboardOwner`, `Transferable`

public class ToolButtonTransferable extends Object implements Transferable, ClipboardOwner
Defines data that is available for drag/drop and clipboard transfers. The data is a ToolButton object.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static DataFlavor`
  `localToolButtonFlavor`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getTransferData(DataFlavor f)`
  Return the transfer data with the given data flavor.
  `DataFlavor[]`
  `getTransferDataFlavors()`
  Return all data flavors that this class supports.
  `boolean`
  `isDataFlavorSupported(DataFlavor f)`
  Return whether the specifed data flavor is supported.
  `void`
  `lostOwnership(Clipboard clipboard, Transferable contents)`
  ClipboardOwner interface method.
  `String`
  `toString()`
  Get the string representation for this transferable.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### localToolButtonFlavor

    public static DataFlavor localToolButtonFlavor

- ## Method Details

  - ### getTransferDataFlavors

    public DataFlavor[] getTransferDataFlavors()
    Return all data flavors that this class supports.
    Specified by:
      `getTransferDataFlavors` in interface `Transferable`

  - ### isDataFlavorSupported

    public boolean isDataFlavorSupported(DataFlavor f)
    Return whether the specifed data flavor is supported.
    Specified by:
      `isDataFlavorSupported` in interface `Transferable`

  - ### getTransferData

    public Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException
    Return the transfer data with the given data flavor.
    Specified by:
      `getTransferData` in interface `Transferable`
    Throws:
      `UnsupportedFlavorException`
      `IOException`

  - ### toString

    public String toString()
    Get the string representation for this transferable.
    Overrides:
      `toString` in class `Object`

  - ### lostOwnership

    public void lostOwnership(Clipboard clipboard, Transferable contents)
    ClipboardOwner interface method.
    Specified by:
      `lostOwnership` in interface `ClipboardOwner`