Example usage for javafx.stage Modality NONE

List of usage examples for javafx.stage Modality NONE

Introduction

In this page you can find the example usage for javafx.stage Modality NONE.

Prototype

Modality NONE

To view the source code for javafx.stage Modality NONE.

Click Source Link

Document

Defines a top-level window that is not modal and does not block any other window.

Usage

From source file:cz.afrosoft.whattoeat.cookbook.recipe.gui.dialog.RecipeViewDialog.java

public RecipeViewDialog() {
    setResizable(true);
    initModality(Modality.NONE);
}

From source file:de.ks.text.AsciiDocEditor.java

@FXML
void showPreviewPopup() {
    if (previewPopupStage == null) {
        String title = Localized.get("adoc.preview");

        previewPopupStage = new Stage();
        previewPopupStage.setTitle(title);
        Scene scene = new Scene(new StackPane(popupPreviewNode));
        scene.setOnKeyReleased(e -> {
            if (e.getCode() == KeyCode.ESCAPE) {
                previewPopupStage.close();
            }/*  w ww.  j a v a2 s.  c o  m*/
        });
        previewPopupStage.setScene(scene);

        Rectangle2D bounds = new ScreenResolver().getScreenToShow().getBounds();
        previewPopupStage.setX(bounds.getMinX());
        previewPopupStage.setY(bounds.getMinY());
        previewPopupStage.setWidth(bounds.getWidth());
        previewPopupStage.setHeight(bounds.getHeight());

        previewPopupStage.initModality(Modality.NONE);
        previewPopupStage.setOnShowing(e -> {
            popupPreview.showDirect(getText());
        });
        previewPopupStage.setOnCloseRequest(e -> this.previewPopupStage = null);
        previewPopupStage.show();
    }
}

From source file:io.bitsquare.app.BitsquareApp.java

private void showDebugWindow() {
    ViewLoader viewLoader = injector.getInstance(ViewLoader.class);
    View debugView = viewLoader.load(DebugView.class);
    Parent parent = (Parent) debugView.getRoot();
    Stage stage = new Stage();
    stage.setScene(new Scene(parent));
    stage.setTitle("Debug window");
    stage.initModality(Modality.NONE);
    stage.initStyle(StageStyle.UTILITY);
    stage.initOwner(scene.getWindow());/*from  w ww . j ava 2 s  . c o  m*/
    stage.setX(primaryStage.getX() + primaryStage.getWidth() + 10);
    stage.setY(primaryStage.getY());
    stage.show();
}

From source file:ca.wumbo.doommanager.client.controller.FileEditorController.java

/**
 * Starts the GUI for connecting to a server for a shared project.
 *//*from   w w  w .  j a  va  2s.  c  o  m*/
public void openConnectGUI() {
    log.debug("Loading a new connect wizard.");
    ConnectWizardController connectWizard = SpringContainer.getContext().getBean(ConnectWizardController.class);

    log.trace("Creating the scene.");
    Scene scene = new Scene(connectWizard.getRootPane());
    scene.getStylesheets().add(cssPath);

    log.trace("Creating stage to display window with the scene.");
    Stage stage = new Stage();
    stage.setTitle("Remote Project Connection");
    stage.setResizable(false);
    stage.initModality(Modality.NONE);
    stage.initOwner(coreController.getStage());
    stage.setResizable(false);
    stage.setScene(scene);
    stage.show();
    log.trace("Connect wizard displayed.");
}

From source file:io.bitsquare.app.BitsquareApp.java

private void showFPSWindow() {
    Label label = new Label();
    EventStreams.animationTicks().latestN(100).map(ticks -> {
        int n = ticks.size() - 1;
        return n * 1_000_000_000.0 / (ticks.get(n) - ticks.get(0));
    }).map(d -> String.format("FPS: %.3f", d)).feedTo(label.textProperty());

    Pane root = new StackPane();
    root.getChildren().add(label);/*from   w  ww . java  2  s . c  om*/
    Stage stage = new Stage();
    stage.setScene(new Scene(root));
    stage.setTitle("FPS");
    stage.initModality(Modality.NONE);
    stage.initStyle(StageStyle.UTILITY);
    stage.initOwner(scene.getWindow());
    stage.setX(primaryStage.getX() + primaryStage.getWidth() + 10);
    stage.setY(primaryStage.getY());
    stage.setWidth(200);
    stage.setHeight(100);
    stage.show();
}

From source file:com.esri.geoevent.test.performance.ui.OrchestratorController.java

/**
 * Perform functionality associated with "About" menu selection or CTRL-A.
 *//*from w  w w . j ava  2  s  . com*/
private void showLoggerDialog() {
    try {
        // Load the fxml file and create a new stage for the popup
        FXMLLoader loader = new FXMLLoader(getClass().getResource("LoggerDialog.fxml"));
        Parent page = (Parent) loader.load();
        Stage dialogStage = new Stage();
        dialogStage.setTitle(UIMessages.getMessage("UI_LOGGER_BOX_LABEL"));
        dialogStage.initModality(Modality.NONE);
        dialogStage.initOwner(stage);
        Scene scene = new Scene(page);
        dialogStage.setScene(scene);

        // Set the person into the controller
        LoggerDialogController controller = loader.getController();
        controller.setDialogStage(dialogStage);
        controller.setOutputBuffer(outputBuffer.toString());
        controller.onClearLoggerEvent(() -> outputBuffer = new StringBuffer());

        // Show the dialog
        dialogStage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

From source file:mesclasses.view.JourneeController.java

@FXML
public void openActions() {
    try {//from ww w  .j av a2s .  co  m
        // Load the fxml file and create a new stage for the popup dialog.
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(MainApp.class.getResource(Constants.ACTIONS_DIALOG));
        AnchorPane page = (AnchorPane) loader.load();

        // Create the dialog Stage.
        Stage dialogStage = new Stage();
        dialogStage.setTitle("Actions  faire");
        dialogStage.initModality(Modality.NONE);
        dialogStage.initOwner(primaryStage);
        Scene scene = new Scene(page);
        dialogStage.setScene(scene);

        // Set the person into the controller.
        ActionsEnCoursController controller = loader.getController();
        controller.setDialogStage(dialogStage);
        controller.setClasse(seanceSelect.getValue().getClasse());

        // Show the dialog and wait until the user closes it
        dialogStage.showAndWait();

    } catch (IOException e) {
        LOG.error(e);
    }
}

From source file:gov.va.isaac.sync.view.SyncView.java

/**
 * @see gov.va.isaac.interfaces.gui.views.PopupViewI#showView(javafx.stage.Window)
 *//*from   w w  w  .j a  v a  2s .  c  o  m*/
@Override
public void showView(Window parent) {
    initGui();
    Stage stage = new Stage(StageStyle.DECORATED);
    stage.initModality(Modality.NONE);
    stage.initOwner(parent);
    Scene scene = new Scene(root_);
    stage.setScene(scene);
    stage.setTitle("Datastore Synchronization");
    stage.getScene().getStylesheets().add(SyncView.class.getResource("/isaac-shared-styles.css").toString());
    stage.sizeToScene();
    stage.show();
    stage.setOnCloseRequest(windowEvent -> {
        if (running_.get()) {
            windowEvent.consume();
        }
    });
}

From source file:genrsa.GenRSAController.java

/**
 * Mtodo usado para cargar la ventana de Factorizacin
 * @param event //from   w w w  .  j a va 2s .  com
 */
public void Factorize(ActionEvent event) {
    FXMLLoader fxmlLoader;
    Parent root;

    try {
        secondStage = new Stage();
        fxmlLoader = new FXMLLoader(getClass().getResource("/Factorize/Factorize.fxml"));
        root = fxmlLoader.load();

        FactorizeController factorController = fxmlLoader.<FactorizeController>getController();
        factorController.setRadix(this.radix);

        if (this.RSA != null) {
            factorController.getModulus().setText(this.RSA.getN().toString(this.radix).toUpperCase());
        }

        disableOnProgress(true);

        Scene scene = new Scene(root);
        secondStage.initModality(Modality.NONE);
        secondStage.getIcons()
                .add(new Image(GenRSAController.class.getResourceAsStream("/allImages/genRSA.png")));
        secondStage.setTitle("genRSA - Ataque por Factorizacin");
        secondStage.setScene(scene);
        secondStage.show();

        secondStage.setOnCloseRequest(closeEvent -> {
            factorController.getFactorizeAttack().setIsCancelled(true);
            this.disableOnProgress(false);
            this.disableButtons();
        });

    } catch (IOException ex) {
        //no pongo mensaje de error, porque no se puede dar el caso
    }

}

From source file:genrsa.GenRSAController.java

/**
 * Mtodo usado para cargar la ventana de ataque ciclico
 * @param event /* w  w  w.j  av  a 2s  .c o m*/
 */
public void Cyclic(ActionEvent event) {
    FXMLLoader fxmlLoader;
    Parent root;

    try {
        secondStage = new Stage();
        fxmlLoader = new FXMLLoader(getClass().getResource("/Cyclic/Cyclic.fxml"));
        root = fxmlLoader.load();

        CyclicController cyclicController = fxmlLoader.<CyclicController>getController();
        cyclicController.setRadix(this.radix);

        if (this.RSA != null) {

            cyclicController.getModulus().setText(this.RSA.getN().toString(this.radix).toUpperCase());
            cyclicController.getExponent().setText(this.RSA.getE().toString(this.radix).toUpperCase());
        } else {
            cyclicController.setFirstTime(false);
        }

        disableOnProgress(true);

        Scene scene = new Scene(root);
        secondStage.initModality(Modality.NONE);
        secondStage.getIcons()
                .add(new Image(GenRSAController.class.getResourceAsStream("/allImages/genRSA.png")));
        secondStage.setTitle("genRSA - Ataque Cclico");
        secondStage.setScene(scene);
        secondStage.show();

        secondStage.setOnCloseRequest(closeEvent -> {
            cyclicController.getCyclicAtack().setIsCancelled(true);
            this.disableOnProgress(false);
            this.disableButtons();
        });

    } catch (IOException ex) {
        //no pongo mensaje de error, porque no se puede dar el caso
    }

}