Class TransferableDescriptor
java.lang.Object
chemaxon.marvin.modules.datatransfer.TransferableDescriptor
- All Implemented Interfaces:
Comparable<TransferableDescriptor>
@PublicApi
public class TransferableDescriptor
extends Object
implements Comparable<TransferableDescriptor>
Data object to store lookup information for MTransferable objects.
- Since:
- Marvin 5.3
-
Constructor Summary
ConstructorsConstructorDescriptionTransferableDescriptor(String name, String className, Integer priority, Integer inputPriority, boolean isDefault, boolean copyAsTransferable) Deprecated.since 5.3.3 new descriptor parameter added.TransferableDescriptor(String name, String className, Integer priority, Integer inputPriority, boolean isDefault, boolean copyAsTransferable, boolean dndTransferable) Constructs aTransferableDescriptorobject. -
Method Summary
Modifier and TypeMethodDescriptionintComparison method which uses the priority field for ordering.booleanPriority of theMTransferableobject when importing from clipboard.getName()Gets the name of the representedMTransferable.Gets the priority of theMTransferableobject by exporting to clipboard.Gets the name of the representation class of theMTransferable.inthashCode()booleanDetermines whether theMTransferableis appearing as an option in the Copy As dialog.booleanDetermines whether theMTransferableinstance should be used by the default copy operation.boolean
-
Constructor Details
-
TransferableDescriptor
@Deprecated public TransferableDescriptor(String name, String className, Integer priority, Integer inputPriority, boolean isDefault, boolean copyAsTransferable) Deprecated.since 5.3.3 new descriptor parameter added.Constructs aTransferableDescriptorobject.- Parameters:
name- the displayed name of theMTransferableobject.className- the representation class of theMTransferableobjectpriority- Priority of theMTransferableobject when exporting to clipboardinputPriority- Priority of theMTransferableobject when importing to clipboardisDefault- flag to indicate whether the MTransferable is used in the default transferable.copyAsTransferable- flag to indicate whether the MTransferable should be displayed in Copy as dialog or not.
-
TransferableDescriptor
public TransferableDescriptor(String name, String className, Integer priority, Integer inputPriority, boolean isDefault, boolean copyAsTransferable, boolean dndTransferable) Constructs aTransferableDescriptorobject.- Parameters:
name- the displayed name of theMTransferableobject.className- the representation class of theMTransferableobjectpriority- Priority of theMTransferableobject when exporting to clipboardinputPriority- Priority of theMTransferableobject when importing to clipboardisDefault- flag to indicate whether the MTransferable is used in the default transferable.copyAsTransferable- flag to indicate whether the MTransferable should be displayed in Copy as dialog or not.dndTransferable- flag to indicate whether the transferable is used when importing data from a dropped object
-
-
Method Details
-
getName
Gets the name of the representedMTransferable.- Returns:
- name of the represented
MTransferable.
-
getRepresentationClass
Gets the name of the representation class of theMTransferable.- Returns:
- representation class name of the
MTransferable.
-
isDefaultTransferable
public boolean isDefaultTransferable()Determines whether theMTransferableinstance should be used by the default copy operation.- Returns:
- true if the
MTransferableinstance should be used by the default copy operation, false otherwise.
-
isCopyAsTransferable
public boolean isCopyAsTransferable()Determines whether theMTransferableis appearing as an option in the Copy As dialog.- Returns:
- true if the
MTransferableis appearing in the Copy As dialog, false otherwise.
-
getPriority
Gets the priority of theMTransferableobject by exporting to clipboard. This priority determines the order in the Copy As dialog: the lowest comes first.- Returns:
- the priority in the Copy As dialog.
-
getInputPriority
Priority of theMTransferableobject when importing from clipboard. The lower priority indicates that the transferable tries to import prior to theMTransferableinstances having higher priority.- Returns:
- the priority when importing from clipboard.
-
isDndTransferable
public boolean isDndTransferable() -
compareTo
Comparison method which uses the priority field for ordering.- Specified by:
compareToin interfaceComparable<TransferableDescriptor>
-
hashCode
public int hashCode() -
equals
-