java.lang.Object
org.jpo.gui.JpoTransferable
- All Implemented Interfaces:
ClipboardOwner
,Transferable
A transferable for the JPO application
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DataFlavor
Definition of the data flavor as an org.jpo internal object -
Constructor Summary
ConstructorDescriptionJpoTransferable
(Collection<SortableDefaultMutableTreeNode> transferableNodes) Constructs a JpoTransferable -
Method Summary
Modifier and TypeMethodDescription@NotNull Object
getTransferData
(DataFlavor flavor) Returns the transferable in the requested flavorReturns the supported transferable data flavors.boolean
isDataFlavorSupported
(DataFlavor flavor) Returns if a requested flavor is supported.void
lostOwnership
(Clipboard clipboard, Transferable contents) Comes from the clipboard owner interfacetoString()
Returns information about the transferable
-
Field Details
-
jpoNodeFlavor
Definition of the data flavor as an org.jpo internal object
-
-
Constructor Details
-
JpoTransferable
Constructs a JpoTransferable- Parameters:
transferableNodes
- The nodes to be transferred
-
-
Method Details
-
getTransferDataFlavors
Returns the supported transferable data flavors.- Specified by:
getTransferDataFlavors
in interfaceTransferable
- Returns:
- The transferable data flavors
-
isDataFlavorSupported
Returns if a requested flavor is supported.- Specified by:
isDataFlavorSupported
in interfaceTransferable
- 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 interfaceTransferable
- 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
Returns information about the transferable -
lostOwnership
Comes from the clipboard owner interface- Specified by:
lostOwnership
in interfaceClipboardOwner
- Parameters:
clipboard
- The clipboardcontents
- The transferable
-