MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / loadData

Method loadData

src/main/java/com/rtg/graph/RocPlot.java:761–784  ·  view source on GitHub ↗
(List<File> files, List<String> names, Box2D initialZoom)

Source from the content-addressed store, hash-verified

759 }
760
761 private void loadData(List<File> files, List<String> names, Box2D initialZoom) {
762 final StringBuilder sb = new StringBuilder();
763 final ProgressBarDelegate progress = new ProgressBarDelegate(mProgressBar);
764 for (int i = 0; i < files.size(); ++i) {
765 final File f = files.get(i);
766 final String name = names.get(i);
767 try {
768 loadFile(f, name, progress);
769 } catch (final IOException | NoTalkbackSlimException e1) {
770 sb.append(f.getPath()).append('\n');
771 }
772 }
773 progress.done();
774 if (sb.length() > 0) {
775 JOptionPane.showMessageDialog(mMainPanel.getTopLevelAncestor(),
776 "Some files could not be loaded:\n" + sb.toString() + "\n",
777 "Invalid ROC File", JOptionPane.ERROR_MESSAGE);
778 }
779 if (initialZoom == null) {
780 SwingUtilities.invokeLater(() -> mZoomPP.getDefaultZoomAction().actionPerformed(new ActionEvent(this, 0, "LoadComplete")));
781 } else {
782 SwingUtilities.invokeLater(() -> mZoomPP.setZoom(initialZoom));
783 }
784 }
785
786 private void loadFile(final File f, final String name, ProgressDelegate progress) throws IOException {
787 mFileChooserParent = f.getParentFile();

Callers 3

createGuiMethod · 0.95
dropMethod · 0.45

Calls 10

loadFileMethod · 0.95
doneMethod · 0.95
getPathMethod · 0.80
getMethod · 0.65
appendMethod · 0.65
lengthMethod · 0.65
toStringMethod · 0.65
sizeMethod · 0.45
actionPerformedMethod · 0.45
setZoomMethod · 0.45

Tested by

no test coverage detected