Package chemaxon.marvin.modules.datatransfer

package chemaxon.marvin.modules.datatransfer

Since Marvin 5.3 this package contains the clipboard handler infrastructure in Marvin. It can be extended with third party Transferables through a registry which delegates methods to ClipboardHandler.

The infrastructure is based on the MTransferable interface, this interface extends the standard Java Transferable interface with some functions to be able to handle molecule input to clipboard, and to be able to decode, and revert clipboard data to a Molecule object.

The package also contains an abstract implementation of MTransferable. Since the MTransferable implements a communication from the clipboard, and to the clipboard, this class contains an implementation which supports one DataFlavor per implementation, and some helper methods to generate clipboard or molecule data for the data transfer.

The package also contains a helper class to make clipboard handling simpler for developers. The ClipboardHandler class contains methods to transfer Molecule in an OLE object, String, and standard Image too. It also provides access to the system clipboard, or in case it is unreachable then to a clipboard which is available inside the java virtual machine. The helper can be used to transfer data to and from the clipboard inside marvin, or inside an application built on the Chemaxon tools. This class is the Facade of the whole subsystem.

The name constants defined in ClipboardHandler class represent the implemented data types in marvin. The transferables are set to the registry at initialization time, but you can change the registry any time in your application. The Transferable class stores the data about how to instantiate the MTransferable implementations. The default MTransferable contains support for all formats registered as default, and the Copy As dialog window contains all available formats marked as available in the dialog. This mechanism is handled inside the Marvin code and the ClipboardHandler runtime, so you can plug your own MTransferable into Marvin by registering it through ClipboardHandler.

  • Class
    Facade of the Clipboard handling in Marvin.
    Abstract Adapter implementation of the MTransferable interface used by Marvin.
    The interface of Marvin transferable implementations.
    Data object to store lookup information for MTransferable objects.