Interface WindowDropHandler


public interface WindowDropHandler
Implement one of these and register it with the VisionDesignerInterface if you want to add drop handling to the window workspace.

Created by carl.gould on 4/2/2015.

  • Method Details

    • init

      void init(WindowWorkspace workspace)
      Gives the window workspace to the drop handler in case it needs it later during a drop
    • getDropTargetComponentType

      DropTargetComponentType getDropTargetComponentType()
      Return the type of component (container or component) this drop handler prefers to drop onto.
    • testDrop

      DropReaction testDrop(DropTargetEvent event)
      Test whether or not this type of event is an appropriate data flavor for this drop handler. If not, return DropReaction.None
    • handleDrop

      boolean handleDrop(JComponent droppedOn, DropTargetDropEvent event)
      Handle the drop itself. It is guaranteed that testDrop(DropTargetEvent) will have already been called and returned non-None for the event. Return true if all went well.