comparison src/name/blackcap/imageprep/Menus.kt @ 9:9e9fe34052a6

Use .close().
author David Barts <n5jrn@me.com>
date Fri, 17 Jul 2020 23:13:13 -0700
parents 801cdc780ca8
children bed255e4c2dc
comparison
equal deleted inserted replaced
8:b5fcabce391f 9:9e9fe34052a6
91 val w = FocusManager.getCurrentManager().activeWindow as? RotateDialog 91 val w = FocusManager.getCurrentManager().activeWindow as? RotateDialog
92 if (w == null) { 92 if (w == null) {
93 Toolkit.getDefaultToolkit().beep() 93 Toolkit.getDefaultToolkit().beep()
94 return 94 return
95 } 95 }
96 w.setVisible(false) 96 w.close()
97 w.dispose()
98 } 97 }
99 98
100 /* xxx - ImageIO bug? */ 99 /* xxx - ImageIO bug? */
101 private class NullOutputStream : java.io.OutputStream() { 100 private class NullOutputStream : java.io.OutputStream() {
102 override fun write(b: Int): Unit {} 101 override fun write(b: Int): Unit {}
160 } 159 }
161 whenDone { 160 whenDone {
162 w.useNormalCursor() 161 w.useNormalCursor()
163 val error = get() 162 val error = get()
164 if (error == null) { 163 if (error == null) {
165 w.setVisible(false) 164 w.close()
166 w.dispose()
167 } else { 165 } else {
168 ioExceptionDialog(w, file, "write", error) 166 ioExceptionDialog(w, file, "write", error)
169 } 167 }
170 } 168 }
171 } 169 }