MCPcopy Create free account
hub / github.com/rambaut/figtree / doImportCharacters

Method doImportCharacters

src/figtree/application/FigTreeFrame.java:1085–1108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1083
1084
1085 private void doImportCharacters() {
1086
1087 FileDialog dialog = new FileDialog(this,
1088 "Import Characters File...",
1089 FileDialog.LOAD);
1090
1091 dialog.setVisible(true);
1092 if (dialog.getFile() != null) {
1093 File file = new File(dialog.getDirectory(), dialog.getFile());
1094
1095 try {
1096 importCharactersFromFile(file);
1097 } catch (FileNotFoundException fnfe) {
1098 JOptionPane.showMessageDialog(this, "Unable to open file: File not found",
1099 "Unable to open file",
1100 JOptionPane.ERROR_MESSAGE);
1101 } catch (IOException ioe) {
1102 JOptionPane.showMessageDialog(this, "Unable to read file: " + ioe.getMessage(),
1103 "Unable to read file",
1104 JOptionPane.ERROR_MESSAGE);
1105 }
1106 }
1107
1108 }
1109
1110 protected boolean importCharactersFromFile(File file) throws FileNotFoundException, IOException {
1111

Callers 1

actionPerformedMethod · 0.95

Calls 3

setVisibleMethod · 0.45
getFileMethod · 0.45

Tested by

no test coverage detected