Interface BrowserTabTreeDragAndDropHandler

All Superinterfaces:
ConfiguratorWithPriority, PriorityProvider, PriorityProvider

@OpenApiAll public interface BrowserTabTreeDragAndDropHandler extends ConfiguratorWithPriority
Enables to perform custom drop action on BrowserTabTree node. Use BrowserTabTreeDragAndDropHandlerFactory and register it to BrowserTabTreeDragAndDropHandlerRegistry.register(BrowserTabTreeDragAndDropHandlerFactory)
  • Method Details

    • canImportToNode

      boolean canImportToNode(Node node, TransferHandler.TransferSupport support)
      Check whether the transfer information is valid to be imported to the node
      Parameters:
      node - whether valid for importing
      support - data that is being imported
      Returns:
      true if possible to import to node
    • getTransferredData

      @CheckForNull Object getTransferredData(TransferHandler.TransferSupport support)
      Extract transferred data here. TransferSupport can not be later accessed in importDataToNode method. If you return null here, then drop operation will be rejected
      Parameters:
      support - transfer support
      Returns:
      object that will be accessible as droppedData.getTransferredData() in importDataToNode method
    • importDataToNode

      void importDataToNode(Node node, DroppedData droppedData, Tree tree)
      Does actual import of the data. Called after drop is complete to enable displaying GUI components during the import
      Parameters:
      node - node to drop data on
      droppedData - holds transferred data and some additional info from the TransferSupport, since TransferSupport is no longer available
      tree - tree to which the node belongs