Example usage for javafx.stage Window hide

List of usage examples for javafx.stage Window hide

Introduction

In this page you can find the example usage for javafx.stage Window hide.

Prototype

public void hide() 

Source Link

Document

Attempts to hide this Window by setting the visibility to false.

Usage

From source file:com.bekwam.resignator.SettingsController.java

@FXML
public void cancel(ActionEvent evt) {

    if (dirtyFlag) {

        Alert alert = new Alert(Alert.AlertType.CONFIRMATION, "Form has been modified");
        alert.setHeaderText("Discard edits?");

        Optional<ButtonType> response = alert.showAndWait();

        if (response.isPresent() && response.get() == ButtonType.OK) {

            Configuration savedConf = configurationDS.getConfiguration();

            if (logger.isDebugEnabled()) {
                logger.debug("[CANCEL] reverting configuration ac jdkhome={} to sc jjdkhome={}",
                        activeConfiguration.getJDKHome(), savedConf.getJDKHome().get());
            }//w w  w. ja  v a 2  s. c  om

            activeConfiguration.setJDKHome(savedConf.getJDKHome().get());

            dirtyFlag = false;

        } else {
            return; // dirtyFlag continues to be true
        }
    }

    Scene scene = ((Button) evt.getSource()).getScene();
    if (scene != null) {
        Window w = scene.getWindow();
        if (w != null) {
            w.hide();
        }
    }
}

From source file:com.bekwam.examples.javafx.oldscores.ScoresDialogController.java

@FXML
public void close(ActionEvent evt) {

    Scene scene = ((Button) evt.getSource()).getScene();
    if (scene != null) {
        Window w = scene.getWindow();
        if (w != null) {
            w.hide();
        }/*from  w w  w.j a va2s .co  m*/
    }
}

From source file:com.bekwam.resignator.JarsignerConfigController.java

@FXML
public void close(ActionEvent evt) {
    if (logger.isDebugEnabled()) {
        logger.debug("[CLOSE]");
    }/*from   w  ww .  j av a 2 s. c om*/
    Scene scene = ((Button) evt.getSource()).getScene();
    if (scene != null) {
        Window w = scene.getWindow();
        if (w != null) {
            w.hide();
        }
    }

}