use of javafx.stage.Modality in project trex-stateless-gui by cisco-system-traffic-generator.
the class DialogWindow method show.
public void show(boolean isLockParent) {
DialogKeyPressHandler controller = (DialogKeyPressHandler) getController();
if (controller != null) {
controller.setupStage(dialogStage);
}
if (dialogStage.isShowing()) {
dialogStage.requestFocus();
}
if (!hasBeenVisible) {
Modality modality = isLockParent ? Modality.APPLICATION_MODAL : Modality.NONE;
dialogStage.initModality(modality);
if (!isLockParent) {
dialogStage.initOwner(null);
}
}
if (isLockParent) {
dialogStage.showAndWait();
} else {
dialogStage.show();
}
hasBeenVisible = true;
}
Aggregations