Search in sources :

Example 1 with Modality

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;
}
Also used : Modality(javafx.stage.Modality)

Aggregations

Modality (javafx.stage.Modality)1