(DropTargetDropEvent e)
| 173 | public void dropActionChanged(DropTargetDragEvent e){} |
| 174 | |
| 175 | public void drop(DropTargetDropEvent e){ |
| 176 | try{ |
| 177 | // Accept the drop first, important! |
| 178 | e.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); |
| 179 | |
| 180 | // Get the files that are dropped as java.util.List |
| 181 | java.util.List list=(java.util.List) e.getTransferable().getTransferData(DataFlavor.javaFileListFlavor); |
| 182 | |
| 183 | // Now get the first file from the list, |
| 184 | File file=(File)list.get(0); |
| 185 | String path=file.getAbsolutePath(); |
| 186 | //jt.read(new FileReader(file),null); |
| 187 | loadIntoEditor(path); |
| 188 | |
| 189 | }catch(Exception ex){} |
| 190 | } |
| 191 | }); |
| 192 | } |
| 193 |
nothing calls this directly
no test coverage detected