chemaxon.marvin.modules.datatransfer
Class TransferableDescriptor

java.lang.Object
  extended by chemaxon.marvin.modules.datatransfer.TransferableDescriptor
All Implemented Interfaces:
java.lang.Comparable<TransferableDescriptor>

public class TransferableDescriptor
extends java.lang.Object
implements java.lang.Comparable<TransferableDescriptor>

Data object to store lookup information for MTransferable objects.

Since:
Marvin 5.3
Version:
11/25/2009
Author:
Istvan Fajth

Constructor Summary
TransferableDescriptor(java.lang.String name, java.lang.String className, java.lang.Integer priority, java.lang.Integer inputPriority, boolean isDefault, boolean copyAsTransferable)
          Deprecated. since 5.3.3 new descriptor parameter added.
TransferableDescriptor(java.lang.String name, java.lang.String className, java.lang.Integer priority, java.lang.Integer inputPriority, boolean isDefault, boolean copyAsTransferable, boolean dndTransferable)
          Constructs a TransferableDescriptor object.
 
Method Summary
 int compareTo(TransferableDescriptor o)
          Comparison method which uses the priority field for ordering.
 boolean equals(java.lang.Object obj)
           
 java.lang.Integer getInputPriority()
          Priority of the MTransferable object when importing from clipboard.
 java.lang.String getName()
          Gets the name of the represented MTransferable.
 java.lang.Integer getPriority()
          Gets the priority of the MTransferable object by exporting to clipboard.
 java.lang.String getRepresentationClass()
          Gets the name of the representation class of the MTransferable.
 int hashCode()
           
 boolean isCopyAsTransferable()
          Determines whether the MTransferable is appearing as an option in the Copy As dialog.
 boolean isDefaultTransferable()
          Determines whether the MTransferable instance should be used by the default copy operation.
 boolean isDndTransferable()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferableDescriptor

@Deprecated
public TransferableDescriptor(java.lang.String name,
                                         java.lang.String className,
                                         java.lang.Integer priority,
                                         java.lang.Integer inputPriority,
                                         boolean isDefault,
                                         boolean copyAsTransferable)
Deprecated. since 5.3.3 new descriptor parameter added.

Constructs a TransferableDescriptor object.

Parameters:
name - the displayed name of the MTransferable object.
className - the representation class of the MTransferable object
priority - Priority of the MTransferable object when exporting to clipboard
inputPriority - Priority of the MTransferable object when importing to clipboard
isDefault - 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(java.lang.String name,
                              java.lang.String className,
                              java.lang.Integer priority,
                              java.lang.Integer inputPriority,
                              boolean isDefault,
                              boolean copyAsTransferable,
                              boolean dndTransferable)
Constructs a TransferableDescriptor object.

Parameters:
name - the displayed name of the MTransferable object.
className - the representation class of the MTransferable object
priority - Priority of the MTransferable object when exporting to clipboard
inputPriority - Priority of the MTransferable object when importing to clipboard
isDefault - 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 Detail

getName

public java.lang.String getName()
Gets the name of the represented MTransferable.

Returns:
name of the represented MTransferable.

getRepresentationClass

public java.lang.String getRepresentationClass()
Gets the name of the representation class of the MTransferable.

Returns:
representation class name of the MTransferable.

isDefaultTransferable

public boolean isDefaultTransferable()
Determines whether the MTransferable 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 the MTransferable 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

public java.lang.Integer getPriority()
Gets the priority of the MTransferable 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

public java.lang.Integer getInputPriority()
Priority of the MTransferable object when importing from clipboard. The lower priority indicates that the transferable tries to import prior to the MTransferable instances having higher priority.

Returns:
the priority when importing from clipboard.

isDndTransferable

public boolean isDndTransferable()

compareTo

public int compareTo(TransferableDescriptor o)
Comparison method which uses the priority field for ordering.

Specified by:
compareTo in interface java.lang.Comparable<TransferableDescriptor>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object