|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MTransferable
The interface of Marvin transferable implementations.
This interface extends the functionality of the standard Java transferable interface.
Marvin utilizes the transferable objects to put Molecule objects to the clipboard in
various formats, and to retrieve Molecule data back from the clipboard.
The Transferable.getTransferData(java.awt.datatransfer.DataFlavor) function is
responsible to place the data to the clipboard in a format specified by
its DataFlavors and as a Molecule object when importing from
clipboard, if the implementation supports the input from clipboard.
Every implementation should have a name which identifies the MTransferable
in the registry. While naming the MTransferable
the developer should keep in mind that the name will be displayed
in the Copy As dialog window, if the TransferableDescriptor object of
the MTransferable in the registry is configured so.
In the default java clipboard handling there are some native formats which
will be registered into the SystemFlavorMap. If
any of the DataFlavors supported by the implementation requires a native
format to be registered to the SystemFlavorMap, then the implementation
should define the registerNativeNames() function which will be
called automatically by ClipboardHandler.
| Field Summary | |
|---|---|
static int |
CLIPBOARD_OPERATION_GET
Flag that indicates an import operation |
static int |
CLIPBOARD_OPERATION_PUT
Flag that indicates an export operation |
static int |
CLIPBOARD_OPERATION_UNDEFINED
Undefined clipboard operation state identifier |
| Method Summary | |
|---|---|
boolean |
isInputAvailable()
Checks that the implementation supports input from clipboard. |
void |
registerNativeNames()
Registers the Native names supported by the implementation. |
void |
setMolecule(Molecule mol)
Sets the Molecule which will be represented by the transferable. |
void |
setProperties(java.util.Properties props)
Sets display properties of the Molecule. |
void |
setTransfer(java.awt.datatransfer.Transferable transfer)
Sets the Transferable for importing Molecule from that. |
| Methods inherited from interface java.awt.datatransfer.Transferable |
|---|
getTransferData, getTransferDataFlavors, isDataFlavorSupported |
| Field Detail |
|---|
static final int CLIPBOARD_OPERATION_UNDEFINED
static final int CLIPBOARD_OPERATION_PUT
static final int CLIPBOARD_OPERATION_GET
| Method Detail |
|---|
void setMolecule(Molecule mol)
mol - the Molecule object that will be exported to the clipboard.void setProperties(java.util.Properties props)
UserSettings
, and in the result of
MDocument.getGUIPropertyContainer().
props - the propertiesImageExportUtilvoid registerNativeNames()
boolean isInputAvailable()
void setTransfer(java.awt.datatransfer.Transferable transfer)
transfer - the Transferable objectisInputAvailable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||