Class DITAMapTreeDropHandler

java.lang.Object
ro.sync.exml.workspace.api.editor.page.ditamap.dnd.DITAMapTreeDropHandler

@API(type=EXTENDABLE, src=PUBLIC) public abstract class DITAMapTreeDropHandler extends Object
A handler which can be installed to override handling of drop events in the DITA Map Tree.
Since:
17
  • Constructor Details

    • DITAMapTreeDropHandler

      public DITAMapTreeDropHandler()
  • Method Details

    • acceptDragOverURLs

      public boolean acceptDragOverURLs(List resourcesToRefer, AuthorNode contextNode, boolean asChild)
      We have a drag over situation with a bunch of resources which have all been previously converted to URLs. Use this method to accept or reject it.
      Parameters:
      resourcesToRefer - The resources which will be linked in the map, usually URL or File objects.
      contextNode - Node over which the mouse is moved.
      asChild - true if when dropped the list of URLs will be added as children, false if they will be added as siblings (after) the context node. This depends on the position of the mouse relative to the context node bounds.
      Returns:
      true if the handler accepts drag over and the default drag over handling should be done, false if it rejects it.
    • consumeDropURLs

      public boolean consumeDropURLs(List resourcesToRefer, AuthorNode destination, boolean asChild)
      Process drop URLs.
      Parameters:
      resourcesToRefer - The resources which will be dropped, usually URL or File objects.
      destination - The node over which the drop was done.
      asChild - true if when dropped the list of URLs will be added as children, false if they will be added as siblings (after) the destination node. This depends on the position of the mouse relative to the destination node bounds.
      Returns:
      true if the handler will make its own processing to insert the references, false if the default processing should be done.