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
ConstructorDescriptionTransferableDescriptor
(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 aTransferableDescriptor
object. -
Method Summary
Modifier and TypeMethodDescriptionint
Comparison method which uses the priority field for ordering.boolean
Priority of theMTransferable
object when importing from clipboard.getName()
Gets the name of the representedMTransferable
.Gets the priority of theMTransferable
object by exporting to clipboard.Gets the name of the representation class of theMTransferable
.int
hashCode()
boolean
Determines whether theMTransferable
is appearing as an option in the Copy As dialog.boolean
Determines whether theMTransferable
instance 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 aTransferableDescriptor
object.- Parameters:
name
- the displayed name of theMTransferable
object.className
- the representation class of theMTransferable
objectpriority
- Priority of theMTransferable
object when exporting to clipboardinputPriority
- Priority of theMTransferable
object 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 aTransferableDescriptor
object.- Parameters:
name
- the displayed name of theMTransferable
object.className
- the representation class of theMTransferable
objectpriority
- Priority of theMTransferable
object when exporting to clipboardinputPriority
- Priority of theMTransferable
object 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 theMTransferable
instance should be used by the default copy operation.- Returns:
- true if the
MTransferable
instance should be used by the default copy operation, false otherwise.
-
isCopyAsTransferable
public boolean isCopyAsTransferable()Determines whether theMTransferable
is appearing as an option in the Copy As dialog.- Returns:
- true if the
MTransferable
is appearing in the Copy As dialog, false otherwise.
-
getPriority
Gets the priority of theMTransferable
object 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 theMTransferable
object when importing from clipboard. The lower priority indicates that the transferable tries to import prior to theMTransferable
instances 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:
compareTo
in interfaceComparable<TransferableDescriptor>
-
hashCode
public int hashCode() -
equals
-