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
ConstructorDescriptionCascadedDropTarget
(Component comp, DropTarget firstDropTarget, DropTarget secondDropTarget) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dragEnter
(DropTargetDragEvent dtde) void
dragExit
(DropTargetEvent dte) void
dragOver
(DropTargetDragEvent dtde) void
drop
(DropTargetDropEvent dtde) void
removeDropTarget
(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:
drop
in interfaceDropTargetListener
- Overrides:
drop
in classDropTarget
-
dragEnter
- Specified by:
dragEnter
in interfaceDropTargetListener
- Overrides:
dragEnter
in classDropTarget
-
dragOver
- Specified by:
dragOver
in interfaceDropTargetListener
- Overrides:
dragOver
in classDropTarget
-
dropActionChanged
- Specified by:
dropActionChanged
in interfaceDropTargetListener
- Overrides:
dropActionChanged
in classDropTarget
-
dragExit
- Specified by:
dragExit
in interfaceDropTargetListener
- Overrides:
dragExit
in classDropTarget
-
getPrimaryDropTarget
-
getSecondaryDropTarget
-
removeDropTarget
Removes the given drop target from anywhere within the tree of CascadedDropTargets. If the givendropTarget
is an immediate child of this CascadedDropTarget (CDT), then the other child is returned. Otherwise, a reference to this CDT will be returned with the givendropTarget
having been removed from one of this CDT's children. This method effectively removes the givendropTarget
from the hierarchy and collapses the tree structure as needed.- Parameters:
dropTarget
- The target to remove- Returns:
- the new drop target reference
-