Example usage for javafx.stage Stage getOnCloseRequest

List of usage examples for javafx.stage Stage getOnCloseRequest

Introduction

In this page you can find the example usage for javafx.stage Stage getOnCloseRequest.

Prototype

public final EventHandler<WindowEvent> getOnCloseRequest() 

Source Link

Usage

From source file:ambroafb.general.StagesContainer.java

private static void callStageCloseRequest(Stage currStage) {
    if (currStage.getOnCloseRequest() == null) {
        currStage.close();/*from ww  w .jav  a2s  .  co  m*/
    } else {
        currStage.getOnCloseRequest().handle(null);
    }
}