Package ghidra.util
Class CascadedDropTarget
java.lang.Object
java.awt.dnd.DropTarget
ghidra.util.CascadedDropTarget
- All Implemented Interfaces:
DropTargetListener,Serializable,EventListener
Combines two drop targets and sends events to them in priority order. If the first drop target
accepts the event, then the second drop target is not accessed.
Either of the given drop targets can be an instance of CascadedDropTarget, effectively creating a tree structure of drop targets.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.dnd.DropTarget
DropTarget.DropTargetAutoScroller -
Constructor Summary
ConstructorsConstructorDescriptionCascadedDropTarget(Component comp, DropTarget firstDropTarget, DropTarget secondDropTarget) -
Method Summary
Modifier and TypeMethodDescriptionvoiddragEnter(DropTargetDragEvent dtde) voiddragExit(DropTargetEvent dte) voiddragOver(DropTargetDragEvent dtde) voiddrop(DropTargetDropEvent dtde) voidremoveDropTarget(DropTarget dropTarget) Removes the given drop target from anywhere within the tree of CascadedDropTargets.Methods inherited from class java.awt.dnd.DropTarget
addDropTargetListener, addNotify, clearAutoscroll, createDropTargetAutoScroller, createDropTargetContext, getComponent, getDefaultActions, getDropTargetContext, getFlavorMap, initializeAutoscrolling, isActive, removeDropTargetListener, removeNotify, setActive, setComponent, setDefaultActions, setFlavorMap, updateAutoscroll
-
Constructor Details
-
CascadedDropTarget
-
-
Method Details
-
drop
- Specified by:
dropin interfaceDropTargetListener- Overrides:
dropin classDropTarget
-
dragEnter
- Specified by:
dragEnterin interfaceDropTargetListener- Overrides:
dragEnterin classDropTarget
-
dragOver
- Specified by:
dragOverin interfaceDropTargetListener- Overrides:
dragOverin classDropTarget
-
dropActionChanged
- Specified by:
dropActionChangedin interfaceDropTargetListener- Overrides:
dropActionChangedin classDropTarget
-
dragExit
- Specified by:
dragExitin interfaceDropTargetListener- Overrides:
dragExitin classDropTarget
-
getPrimaryDropTarget
-
getSecondaryDropTarget
-
removeDropTarget
Removes the given drop target from anywhere within the tree of CascadedDropTargets. If the givendropTargetis an immediate child of this CascadedDropTarget (CDT), then the other child is returned. Otherwise, a reference to this CDT will be returned with the givendropTargethaving been removed from one of this CDT's children. This method effectively removes the givendropTargetfrom the hierarchy and collapses the tree structure as needed.- Parameters:
dropTarget- The target to remove- Returns:
- the new drop target reference
-