Class DiagramTransferableDragAndDropHandler

java.lang.Object
com.nomagic.magicdraw.ui.dnd.DiagramTransferableDragAndDropHandler
All Implemented Interfaces:
ConfiguratorWithPriority, PriorityProvider, PriorityProvider

@OpenApiAll public abstract class DiagramTransferableDragAndDropHandler extends Object implements ConfiguratorWithPriority
Drop handler to DiagramPresentationElement based on Transferable.
  • Constructor Details

    • DiagramTransferableDragAndDropHandler

      public DiagramTransferableDragAndDropHandler()
  • Method Details

    • getDropTarget

      public abstract DropTarget getDropTarget(Point location, DiagramPresentationElement diagramPresentationElement, Transferable transferable)
      Gets DropTarget for this handler.
      Parameters:
      location - location on the diagram
      diagramPresentationElement - diagram presentation element on which the drag is being performed
      transferable - transferable drag&drop object
      Returns:
      calculated drop target for this handler
    • drop

      public abstract void drop(Point location, DiagramPresentationElement diagramPresentationElement, PresentationElement elementOver, Transferable transferable)
      Drops calculated DropTarget.
      Parameters:
      location - location on the diagram
      diagramPresentationElement - diagram presentation element
      elementOver - symbol on which drag is being performed (if drop target was not specified, passes DiagramPresentationElement)
      transferable - transferable drag&drop object
    • getDescription

      @CheckForNull public String getDescription()
      Returns a human-readable description of what the handler can achieve. Might be used to inform user about the purpose of this handler in various GUI forms, mostly tool tips.
      Returns:
      description as a String or null if no description is provided
    • getPriority

      public int getPriority()
      Description copied from interface: ConfiguratorWithPriority
      Returns priority of this configurator. All configurators are sorted by priority before configuration. This is very important if one configurator expects input from other configurators. In such case configurator must have lower priority than others.
      Specified by:
      getPriority in interface ConfiguratorWithPriority
      Specified by:
      getPriority in interface PriorityProvider
      Returns:
      priority of this configurator.
      See Also: