public void selectPspDir(ActionEvent actionEvent) {
DirectoryChooser chooser = new DirectoryChooser();
chooser.setTitle("Vyberte kořenový adresář PSP balíku");
File lastPspDir = getConfigurationManager().getFileOrNull(ConfigurationManager.PROP_LAST_PSP_DIR);
if (lastPspDir != null && lastPspDir.exists()) {
File parent = lastPspDir.getParentFile();
if (parent != null && parent.exists()) {
chooser.setInitialDirectory(parent);
}
}
File selectedDir = chooser.showDialog(stage);
if (selectedDir != null) {
getConfigurationManager().setFile(ConfigurationManager.PROP_LAST_PSP_DIR, selectedDir);
try {
pspDirTextField.setText(selectedDir.getCanonicalPath());
} catch (IOException e) {
//should never happen
throw new RuntimeException(e);
}
}
}
PspValidationConfigurationDialogController.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:komplexni-validator
作者:
评论列表
文章目录