Class DiagramTransferableDragAndDropHandler

    • Constructor Detail

      • DiagramTransferableDragAndDropHandler

        public DiagramTransferableDragAndDropHandler()
    • Method Detail

      • getDropTarget

        public abstract DropTarget getDropTarget​(java.awt.Point location,
                                                 DiagramPresentationElement diagramPresentationElement,
                                                 java.awt.datatransfer.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​(java.awt.Point location,
                                  DiagramPresentationElement diagramPresentationElement,
                                  PresentationElement elementOver,
                                  java.awt.datatransfer.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 java.lang.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