/**
* Do initialization after fx components have been generated.
*/
@FXML
private void initialize() {
this.reportSpecObservableValue = new ObservableReportSpec();
// If we detect the user deleted a tab, then make our observable report spec no longer depend on that tab
this.reportSectionsTabPane.getTabs().addListener((final Change<? extends Tab> c) -> {
while (c.next()) {
if (c.wasRemoved()) {
for (final Tab t : c.getRemoved()) {
this.reportSpecObservableValue.unbindTab(t);
}
}
}
});
this.saveManager = new ReportSpecSaveManager(this, this.analysisSerializer);
newEntity();
this.saveManager.syncSavedEntity();
ControllerUtils.performWithStage(this.reportSectionsTabPane, stage -> {
stage.setOnCloseRequest(e -> {
final boolean safeToProceed = this.saveManager
.promptSave("Save changes to current report before closing? Otherwise your current changes will be lost.");
if (!safeToProceed)
e.consume();
});
});
}
ReportSpecEditPaneController.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:story-inspector
作者:
评论列表
文章目录