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

Method open

src/org/opensourcephysics/controls/OSPLog.java:713–725  ·  view source on GitHub ↗

Opens a text file selected with a chooser and writes the contents to the log.

()

Source from the content-addressed store, hash-verified

711 * Opens a text file selected with a chooser and writes the contents to the log.
712 */
713 public void open() {
714 OSPRuntime.getChooser().showOpenDialog(null, new Runnable() {
715
716 @Override
717 public void run() {
718 File file = OSPRuntime.getChooser().getSelectedFile();
719 String fileName = XML.getRelativePath(file.getAbsolutePath());
720 fileName = XML.getRelativePath(fileName);
721 open(fileName);
722 }
723
724 }, null);
725 }
726
727 /**
728 * Opens a text file specified by name and writes the contents to the log.

Callers 2

runMethod · 0.95
actionPerformedMethod · 0.95

Calls 6

getChooserMethod · 0.95
readMethod · 0.95
appendMethod · 0.65
setTextMethod · 0.65
showOpenDialogMethod · 0.45
setLengthMethod · 0.45

Tested by

no test coverage detected