Package ghidra.util

Class CascadedDropTarget

  • All Implemented Interfaces:
    java.awt.dnd.DropTargetListener,, java.util.EventListener

    public class CascadedDropTarget
    extends java.awt.dnd.DropTarget
    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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.dnd.DropTarget

    • Constructor Summary

      Constructor Description
      CascadedDropTarget​(java.awt.Component comp, java.awt.dnd.DropTarget firstDropTarget, java.awt.dnd.DropTarget secondDropTarget)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dragEnter​(java.awt.dnd.DropTargetDragEvent dtde)  
      void dragExit​(java.awt.dnd.DropTargetEvent dte)  
      void dragOver​(java.awt.dnd.DropTargetDragEvent dtde)  
      void drop​(java.awt.dnd.DropTargetDropEvent dtde)  
      void dropActionChanged​(java.awt.dnd.DropTargetDragEvent dtde)  
      java.awt.dnd.DropTarget getPrimaryDropTarget()  
      java.awt.dnd.DropTarget getSecondaryDropTarget()  
      java.awt.dnd.DropTarget removeDropTarget​(java.awt.dnd.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CascadedDropTarget

        public CascadedDropTarget​(java.awt.Component comp,
                                  java.awt.dnd.DropTarget firstDropTarget,
                                  java.awt.dnd.DropTarget secondDropTarget)
    • Method Detail

      • drop

        public void drop​(java.awt.dnd.DropTargetDropEvent dtde)
        Specified by:
        drop in interface java.awt.dnd.DropTargetListener
        drop in class java.awt.dnd.DropTarget
      • dragEnter

        public void dragEnter​(java.awt.dnd.DropTargetDragEvent dtde)
        Specified by:
        dragEnter in interface java.awt.dnd.DropTargetListener
        dragEnter in class java.awt.dnd.DropTarget
      • dragOver

        public void dragOver​(java.awt.dnd.DropTargetDragEvent dtde)
        Specified by:
        dragOver in interface java.awt.dnd.DropTargetListener
        dragOver in class java.awt.dnd.DropTarget
      • dropActionChanged

        public void dropActionChanged​(java.awt.dnd.DropTargetDragEvent dtde)
        Specified by:
        dropActionChanged in interface java.awt.dnd.DropTargetListener
        dropActionChanged in class java.awt.dnd.DropTarget
      • dragExit

        public void dragExit​(java.awt.dnd.DropTargetEvent dte)
        Specified by:
        dragExit in interface java.awt.dnd.DropTargetListener
        dragExit in class java.awt.dnd.DropTarget
      • getPrimaryDropTarget

        public java.awt.dnd.DropTarget getPrimaryDropTarget()
      • getSecondaryDropTarget

        public java.awt.dnd.DropTarget getSecondaryDropTarget()
      • removeDropTarget

        public java.awt.dnd.DropTarget removeDropTarget​(java.awt.dnd.DropTarget dropTarget)
        Removes the given drop target from anywhere within the tree of CascadedDropTargets. If the given dropTarget 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 given dropTarget having been removed from one of this CDT's children. This method effectively removes the given dropTarget from the hierarchy and collapses the tree structure as needed.
        dropTarget - The target to remove
        the new drop target reference