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 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 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(String name, String className, Integer priority, 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 Details

    • getName

      public String getName()
      Gets the name of the represented MTransferable.
      Returns:
      name of the represented MTransferable.
    • getRepresentationClass

      public 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 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 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 Comparable<TransferableDescriptor>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object