Package com.nomagic.magicdraw.ui.dnd
Interface BrowserTabTreeDragAndDropHandler
- All Superinterfaces:
ConfiguratorWithPriority
,PriorityProvider
,PriorityProvider
Enables to perform custom drop action on BrowserTabTree node.
Use
BrowserTabTreeDragAndDropHandlerFactory
and
register it to BrowserTabTreeDragAndDropHandlerRegistry.register(BrowserTabTreeDragAndDropHandlerFactory)
-
Field Summary
Fields inherited from interface com.nomagic.utils.PriorityProvider
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_PRIORITY
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canImportToNode
(Node node, TransferHandler.TransferSupport support) Check whether the transfer information is valid to be imported to the nodeExtract transferred data here.void
importDataToNode
(Node node, DroppedData droppedData, Tree tree) Does actual import of the data.Methods inherited from interface com.nomagic.magicdraw.actions.ConfiguratorWithPriority
getPriority
-
Method Details
-
canImportToNode
Check whether the transfer information is valid to be imported to the node- Parameters:
node
- whether valid for importingsupport
- data that is being imported- Returns:
- true if possible to import to node
-
getTransferredData
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
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 ondroppedData
- holds transferred data and some additional info from the TransferSupport, since TransferSupport is no longer availabletree
- tree to which the node belongs
-