FileDropper
Date: 2019-10-22

org.jmol.awt

## Class FileDropper

- java.lang.Object
- - org.jmol.awt.FileDropper

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

      public class FileDropper
      extends java.lang.Object
      implements java.awt.dnd.DropTargetListener

  A simple Dropping class to allow files to be dragged onto a target. It supports drag-and-drop of files from file browsers, and CML text from editors, e.g. jEdit.

  Note that multiple drops ARE thread safe.

  Author:
    Billy

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private JmolDropEditor` | `dropListener`
    `private java.lang.String` | `fd_oldFileName`
    `private java.beans.PropertyChangeSupport` | `fd_propSupport`
    `private java.beans.PropertyChangeListener` | `pcl`
    `private JmolStatusListener` | `statusListener`
    `private Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileDropper(JmolStatusListener statusListener, Viewer vwr, JmolDropEditor dropListener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(java.beans.PropertyChangeListener l)`
    `void` | `dispose()`
    `protected void` | `doDrop(java.beans.PropertyChangeEvent evt)`
    `void` | `dragEnter(java.awt.dnd.DropTargetDragEvent dtde)`
    `void` | `dragExit(java.awt.dnd.DropTargetEvent dtde)`
    `void` | `dragOver(java.awt.dnd.DropTargetDragEvent dtde)`
    `void` | `drop(java.awt.dnd.DropTargetDropEvent dtde)`
    `void` | `dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)`
    `private void` | `loadFile(java.lang.String fname, int x, int y)`
    `private void` | `loadFiles(java.util.List<java.io.File> fileList)`
    `void` | `removePropertyChangeListener(java.beans.PropertyChangeListener l)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fd_oldFileName

          private java.lang.String fd_oldFileName

    - #### fd_propSupport

          private java.beans.PropertyChangeSupport fd_propSupport

    - #### vwr

          private Viewer vwr

    - #### pcl

          private java.beans.PropertyChangeListener pcl

    - #### statusListener

          private JmolStatusListener statusListener

    - #### dropListener

          private JmolDropEditor dropListener

  - ### Constructor Detail

    - #### FileDropper

          public FileDropper(JmolStatusListener statusListener,
                             Viewer vwr,
                             JmolDropEditor dropListener)

  - ### Method Detail

    - #### dispose

          public void dispose()

    - #### loadFile

          private void loadFile(java.lang.String fname,
                                int x,
                                int y)

    - #### loadFiles

          private void loadFiles(java.util.List<java.io.File> fileList)

    - #### doDrop

          protected void doDrop(java.beans.PropertyChangeEvent evt)

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

    - #### dragOver

          public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)

      Specified by:
        `dragOver` in interface `java.awt.dnd.DropTargetListener`

    - #### dragEnter

          public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)

      Specified by:
        `dragEnter` in interface `java.awt.dnd.DropTargetListener`

    - #### dragExit

          public void dragExit(java.awt.dnd.DropTargetEvent dtde)

      Specified by:
        `dragExit` in interface `java.awt.dnd.DropTargetListener`

    - #### dropActionChanged

          public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)

      Specified by:
        `dropActionChanged` in interface `java.awt.dnd.DropTargetListener`

    - #### drop

          public void drop(java.awt.dnd.DropTargetDropEvent dtde)

      Specified by:
        `drop` in interface `java.awt.dnd.DropTargetListener`