Package mars.venus

Class FileDrop

java.lang.Object
mars.venus.FileDrop
All Implemented Interfaces:
DropTargetListener, EventListener

public class FileDrop extends Object implements DropTargetListener
File drop handler that registers drop listeners onto a component and changes the component's borders when dragging files over it.

This component comes from MARS Plus, a derivation of the original MARS 4.5 created by Caleb Hoff, but the code looks similar to Robert Harder's code which is now in the public domain.

Author:
Robert Harder
  • Constructor Details

  • Method Details

    • dragEnter

      public void dragEnter(DropTargetDragEvent event)
      Called while a drag operation is ongoing, when the mouse pointer enters the operable part of the drop site for the DropTarget registered with this listener.
      Specified by:
      dragEnter in interface DropTargetListener
      Parameters:
      event - The event.
    • dragOver

      public void dragOver(DropTargetDragEvent event)
      Called when a drag operation is ongoing, while the mouse pointer is still over the operable part of the drop site for the DropTarget registered with this listener.
      Specified by:
      dragOver in interface DropTargetListener
      Parameters:
      event - The event.
    • drop

      public void drop(DropTargetDropEvent event)
      Called when the drag operation has terminated with a drop on the operable part of the drop site for the DropTarget registered with this listener.
      Specified by:
      drop in interface DropTargetListener
      Parameters:
      event - The event.
    • dragExit

      public void dragExit(DropTargetEvent event)
      Called while a drag operation is ongoing, when the mouse pointer has exited the operable part of the drop site for the DropTarget registered with this listener.
      Specified by:
      dragExit in interface DropTargetListener
      Parameters:
      event - The event.
    • dropActionChanged

      public void dropActionChanged(DropTargetDragEvent event)
      Called if the user has modified the current drop gesture.
      Specified by:
      dropActionChanged in interface DropTargetListener
      Parameters:
      event - The event.