()
| 31 | chooser.showOpenDialog(null, new Runnable() { |
| 32 | // OK |
| 33 | @Override |
| 34 | public void run() { |
| 35 | if (!OSPRuntime.isJS) { |
| 36 | // no directory information in HTML5 |
| 37 | org.opensourcephysics.display.OSPRuntime.chooserDir = chooser.getCurrentDirectory().toString(); |
| 38 | } |
| 39 | // It is critical to pass the actual file along, as it has the bytes already. |
| 40 | File file=chooser.getSelectedFile(); |
| 41 | OSPLog.fine("reading file="+file); |
| 42 | XMLControlElement xml = new XMLControlElement(file); |
| 43 | chooser.setDialogTitle(oldTitle); |
| 44 | displayXML(xml); |
| 45 | } |
| 46 | |
| 47 | }, new Runnable() { |
| 48 | // cancel |
nothing calls this directly
no test coverage detected