()
| 162 | try { |
| 163 | EventQueue.invokeAndWait(new Runnable() { |
| 164 | public void run() { |
| 165 | AIJFileChooser fc = new AIJFileChooser(); |
| 166 | fc.setReferenceWindow(parent); |
| 167 | fc.setDialogTitle(title); |
| 168 | fc.setDragEnabled(true); |
| 169 | fc.setTransferHandler(new DragAndDropHandler(fc)); |
| 170 | File fdir = null; |
| 171 | if (path!=null) |
| 172 | fdir = new File(path); |
| 173 | if (fdir!=null) |
| 174 | fc.setCurrentDirectory(fdir); |
| 175 | if (fileName!=null) |
| 176 | fc.setSelectedFile(new File(fileName)); |
| 177 | int returnVal = fc.showOpenDialog(IJ.getInstance()); |
| 178 | if (returnVal!=JFileChooser.APPROVE_OPTION && isMacro) |
| 179 | {Interpreter.abort(); return;} |
| 180 | File file = fc.getSelectedFile(); |
| 181 | if (file==null && isMacro) |
| 182 | {Interpreter.abort(); return;} |
| 183 | name = file.getName(); |
| 184 | dir = fc.getCurrentDirectory().getPath()+File.separator; |
| 185 | } |
| 186 | }); |
| 187 | } catch (Exception e) {} |
| 188 | } |
nothing calls this directly
no test coverage detected