comparison src/name/blackcap/exifwasher/ShowDialog.kt @ 24:3d9c36307704

Should make the wait cursor appear, but doesn't. Java bug?
author davidb
date Thu, 16 Apr 2020 19:26:37 -0700
parents 39b977021ea1
children 40911898ed23
comparison
equal deleted inserted replaced
23:5cac95c17fef 24:3d9c36307704
40 } 40 }
41 41
42 /* controls the washing of the Exif data */ 42 /* controls the washing of the Exif data */
43 fun show(image: File) { 43 fun show(image: File) {
44 title = "Washed: ${image.name}" 44 title = "Washed: ${image.name}"
45 useWaitCursor() 45 Application.mainFrame.useWaitCursor()
46 swingWorker<Array<Array<String>>?> { 46 swingWorker<Array<Array<String>>?> {
47 inBackground { 47 inBackground {
48 try { 48 try {
49 val openedImage = Image(image.absolutePath) 49 val openedImage = Image(image.absolutePath)
50 val meta = openedImage.metadata 50 val meta = openedImage.metadata
59 LOGGER.log(Level.SEVERE, "unable to read metadata", e) 59 LOGGER.log(Level.SEVERE, "unable to read metadata", e)
60 null 60 null
61 } 61 }
62 } 62 }
63 whenDone { 63 whenDone {
64 useNormalCursor() 64 Application.mainFrame.useNormalCursor()
65 val tableData = get() 65 val tableData = get()
66 if (tableData == null) { 66 if (tableData == null) {
67 JOptionPane.showMessageDialog(Application.mainFrame, 67 JOptionPane.showMessageDialog(Application.mainFrame,
68 "Unable to read metadata.", 68 "Unable to read metadata.",
69 "Error", JOptionPane.ERROR_MESSAGE) 69 "Error", JOptionPane.ERROR_MESSAGE)