Module org.jpo
Package org.jpo.gui

Class JpoTransferable

java.lang.Object
org.jpo.gui.JpoTransferable
All Implemented Interfaces:
ClipboardOwner, Transferable

public class JpoTransferable extends Object implements Transferable, ClipboardOwner
A transferable for the JPO application
  • Field Details

    • jpoNodeFlavor

      public static final DataFlavor jpoNodeFlavor
      Definition of the data flavor as an org.jpo internal object
  • Constructor Details

  • Method Details

    • getTransferDataFlavors

      public DataFlavor[] getTransferDataFlavors()
      Returns the supported transferable data flavors.
      Specified by:
      getTransferDataFlavors in interface Transferable
      Returns:
      The transferable data flavors
    • isDataFlavorSupported

      public boolean isDataFlavorSupported(DataFlavor flavor)
      Returns if a requested flavor is supported.
      Specified by:
      isDataFlavorSupported in interface Transferable
      Parameters:
      flavor - The flavor to query
      Returns:
      whether it is supported or not
    • getTransferData

      @NotNull public @NotNull Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException
      Returns the transferable in the requested flavor
      Specified by:
      getTransferData in interface Transferable
      Parameters:
      flavor - The flavor to return the transferable in
      Returns:
      The transferable
      Throws:
      UnsupportedFlavorException - You get this exception if you request something that is not supported
    • toString

      public String toString()
      Returns information about the transferable
      Overrides:
      toString in class Object
      Returns:
      information about the transferable
    • lostOwnership

      public void lostOwnership(Clipboard clipboard, Transferable contents)
      Comes from the clipboard owner interface
      Specified by:
      lostOwnership in interface ClipboardOwner
      Parameters:
      clipboard - The clipboard
      contents - The transferable