public Node display() { // Setup help content and then rebind the base class to this view. view.setupHelp(); setView(view); super.bindBaseElements(); return view.asNode(); }
@Override public void onContinuePressed() { // Close property window if it's showing if (view.getArtifactDetailsWindow() != null && view.getArtifactDetailsWindow().isShowing()) { view.getArtifactDetailsWindow().hide(); } // Perform simple validation to make sure the tree structure is valid. if (!controller.getDomainProfileService().validateTree(controller.getPackageTree())) { view.getWarningPopupPositiveButton() .setOnAction( arg01 -> { if (view.getWarningPopup() != null && view.getWarningPopup().isShowing()) { view.getWarningPopup().hide(); } }); view.showWarningPopup( TextFactory.getText(ErrorKey.PACKAGE_TREE_VALIDATION_ERROR), TextFactory.getText(ErrorKey.INVALID_TREE_ERROR), false, false); return; } // Check if any nodes are missing files, if so don't allow continue if (!view.getMissingFileNodes().isEmpty()) { view.getWarningPopupPositiveButton() .setOnAction( arg01 -> { if (view.getWarningPopup() != null && view.getWarningPopup().isShowing()) { view.getWarningPopup().hide(); } }); view.showWarningPopup( TextFactory.getText(ErrorKey.PACKAGE_TREE_VALIDATION_ERROR), TextFactory.getText(ErrorKey.MISSING_FILES_ERROR), false, false); return; } super.onContinuePressed(); }
@Override public void onBackPressed() { if (view.getArtifactDetailsWindow() != null && view.getArtifactDetailsWindow().isShowing()) { view.getArtifactDetailsWindow().hide(); } // Perform simple validation to make sure the package description is valid. if (!controller.getDomainProfileService().validateTree(controller.getPackageTree())) { view.getWarningPopupPositiveButton() .setOnAction( arg01 -> { if (view.getWarningPopup() != null && view.getWarningPopup().isShowing()) { view.getWarningPopup().hide(); } }); view.showWarningPopup( TextFactory.getText(ErrorKey.PACKAGE_TREE_VALIDATION_ERROR), TextFactory.getText(ErrorKey.INVALID_TREE_ERROR), false, false); return; } super.onBackPressed(); }