Example usage for javafx.stage StageStyle UNIFIED

List of usage examples for javafx.stage StageStyle UNIFIED

Introduction

In this page you can find the example usage for javafx.stage StageStyle UNIFIED.

Prototype

StageStyle UNIFIED

To view the source code for javafx.stage StageStyle UNIFIED.

Click Source Link

Document

Defines a Stage style with platform decorations and eliminates the border between client area and decorations.

Usage

From source file:com.properned.application.SystemController.java

@FXML
public void openLocaleDialog() {
    logger.info("Open the locale dialog");

    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(getClass().getResource("/com/properned/gui/localeFrame.fxml"));
    loader.setResources(MessageReader.getInstance().getBundle());

    try {/*from w ww.  j  a v  a 2s.co m*/
        loader.load();

        Parent root = loader.getRoot();

        Stage modalDialog = new Stage(StageStyle.UNIFIED);
        modalDialog.initModality(Modality.APPLICATION_MODAL);
        modalDialog.initOwner(Properned.getInstance().getPrimaryStage());
        modalDialog.setTitle(MessageReader.getInstance().getMessage("manageLocale.title"));
        modalDialog.setResizable(true);
        modalDialog.getIcons().add(new Image("/com/properned/style/icon/icon_16.png"));

        Scene scene = new Scene(root);
        scene.getStylesheets().add("/com/properned/style/application.css");

        modalDialog.setScene(scene);

        modalDialog.showAndWait();
    } catch (IOException e) {
        Properned.getInstance().showError(MessageReader.getInstance().getMessage("error.openFrame"), e);
    }
}