java.lang.Object
org.jpo.gui.JpoTransferable
- All Implemented Interfaces:
ClipboardOwner,Transferable
A transferable for the JPO application
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataFlavorDefinition of the data flavor as an org.jpo internal object -
Constructor Summary
ConstructorsConstructorDescriptionJpoTransferable(Collection<SortableDefaultMutableTreeNode> transferableNodes) Constructs a JpoTransferable -
Method Summary
Modifier and TypeMethodDescription@NotNull ObjectgetTransferData(DataFlavor flavor) Returns the transferable in the requested flavorReturns the supported transferable data flavors.booleanisDataFlavorSupported(DataFlavor flavor) Returns if a requested flavor is supported.voidlostOwnership(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:
getTransferDataFlavorsin interfaceTransferable- Returns:
- The transferable data flavors
-
isDataFlavorSupported
Returns if a requested flavor is supported.- Specified by:
isDataFlavorSupportedin 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:
getTransferDatain 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:
lostOwnershipin interfaceClipboardOwner- Parameters:
clipboard- The clipboardcontents- The transferable
-