Mercurial > cgi-bin > hgweb.cgi > JpegWasher
diff src/name/blackcap/exifwasher/MainFrame.kt @ 5:dc1f4359659d
Got it compiling.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 09 Apr 2020 18:20:34 -0700 |
parents | 19c381c536ec |
children | aafc9c127c7b |
line wrap: on
line diff
--- a/src/name/blackcap/exifwasher/MainFrame.kt Wed Apr 08 21:31:30 2020 -0700 +++ b/src/name/blackcap/exifwasher/MainFrame.kt Thu Apr 09 18:20:34 2020 -0700 @@ -7,12 +7,13 @@ import java.awt.datatransfer.DataFlavor import java.awt.datatransfer.Transferable import java.awt.datatransfer.UnsupportedFlavorException +import java.awt.event.WindowEvent +import java.awt.event.WindowListener import java.io.File import java.io.IOException -import javax.swing.JFrame -import javax.swing.TransferHandler - -class MainFrame: JFrame { +import java.util.logging.Level +import java.util.logging.Logger +import javax.swing.* /* the main frame itself */ class MainFrame : JFrame(Application.MYNAME) { @@ -38,7 +39,7 @@ } /* acts on dragged files */ - private class MyTransferHandler : TransferHandler { + private class MyTransferHandler : TransferHandler() { override fun canImport(support: TransferHandler.TransferSupport): Boolean { return support.isDataFlavorSupported(DataFlavor.javaFileListFlavor) } @@ -48,7 +49,7 @@ return false } val files = try { - support.transferable.getTransferData(DataFlavor.javaFileListFlavor) as java.util.List<File> + support.transferable.getTransferData(DataFlavor.javaFileListFlavor) as List<File> } catch (e: UnsupportedFlavorException) { return false } catch (e: IOException) {