MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / run

Method run

src/demoJS/ReadXMLFile.java:33–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

fineMethod · 0.95
displayXMLMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected