Package com.nomagic.magicdraw.ui.dnd
Interface BrowserTabTreeDragAndDropHandler
-
- All Superinterfaces:
ConfiguratorWithPriority
,PriorityProvider
,PriorityProvider
@OpenApiAll public interface BrowserTabTreeDragAndDropHandler extends ConfiguratorWithPriority
Enables to perform custom drop action on BrowserTabTree node. UseBrowserTabTreeDragAndDropHandlerFactory
and register it toBrowserTabTreeDragAndDropHandlerRegistry.register(BrowserTabTreeDragAndDropHandlerFactory)
-
-
Field Summary
-
Fields inherited from interface com.nomagic.utils.PriorityProvider
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_PRIORITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canImportToNode(Node node, javax.swing.TransferHandler.TransferSupport support)
Check whether the transfer information is valid to be imported to the nodejava.lang.Object
getTransferredData(javax.swing.TransferHandler.TransferSupport support)
Extract 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 Detail
-
canImportToNode
boolean canImportToNode(Node node, javax.swing.TransferHandler.TransferSupport support)
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
@CheckForNull java.lang.Object getTransferredData(javax.swing.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 ondroppedData
- holds transferred data and some additional info from the TransferSupport, since TransferSupport is no longer availabletree
- tree to which the node belongs
-
-