/ Published in: Groovy
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ // TFileDropHandler.groovy // Laurence Toenjes - 2010-08-18 // Based on 1999 example from Cay Horstmann found at // http://java.itags.org/java-core-gui-apis/33457/ // dropped files closure example: { files -> println files }; { // ctor aSwingControl.setDropTarget( dropTarget ) } // -------------------------------------------------------- { onDroppedFiles = a_onDroppedFiles } // provide visual feedback } } else { event.rejectDrop(); } try { // file flavor } } } } // end for } // end drop } // -------------------------------------------------------- // simple example f.add( ta ) files.each { println it } } ) f.show() } }
URL: http://java.itags.org/java-core-gui-apis/33457/