Example usage for javafx.scene.control ProgressIndicator ProgressIndicator

List of usage examples for javafx.scene.control ProgressIndicator ProgressIndicator

Introduction

In this page you can find the example usage for javafx.scene.control ProgressIndicator ProgressIndicator.

Prototype

public ProgressIndicator() 

Source Link

Document

Creates a new indeterminate ProgressIndicator.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 260, 80);
    stage.setScene(scene);//w w w  .  j a v a 2s  .  c  o  m

    Group g = new Group();

    ProgressIndicator p1 = new ProgressIndicator();

    g.getChildren().add(p1);

    scene.setRoot(g);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 260, 80);
    stage.setScene(scene);/*from  w w  w.j  a v  a  2 s  .  c o m*/

    Group g = new Group();

    ProgressIndicator p1 = new ProgressIndicator();
    p1.setProgress(0.25F);

    g.getChildren().add(p1);

    scene.setRoot(g);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 300, 150);
    stage.setScene(scene);/*w  w  w .  j  ava 2s  .co m*/
    stage.setTitle("Progress Controls");

    for (int i = 0; i < values.length; i++) {
        final Label label = labels[i] = new Label();
        label.setText("progress:" + values[i]);

        final ProgressBar pb = pbs[i] = new ProgressBar();
        pb.setProgress(values[i]);

        final ProgressIndicator pin = pins[i] = new ProgressIndicator();
        pin.setProgress(values[i]);
        final HBox hb = hbs[i] = new HBox();
        hb.setSpacing(5);
        hb.setAlignment(Pos.CENTER);
        hb.getChildren().addAll(label, pb, pin);
    }

    final VBox vb = new VBox();
    vb.setSpacing(5);
    vb.getChildren().addAll(hbs);
    scene.setRoot(vb);
    stage.show();
}

From source file:Main.java

public static Node createProgressIndicator() {
    ProgressIndicator indicator = new ProgressIndicator();
    indicator.setMaxHeight(350);/*from   www . j a v a2  s .co  m*/
    indicator.setMaxWidth(350);

    BorderPane borderPane = new BorderPane();
    BorderPane.setMargin(indicator, new Insets(5));
    borderPane.setCenter(indicator);
    borderPane.setStyle("-fx-background-color: rgba(230,230,230,0.7);");
    return borderPane;
}

From source file:com.playonlinux.ui.impl.javafx.mainwindow.center.ViewApps.java

private void initWait() {
    ProgressIndicator progressIndicator = new ProgressIndicator();
    progressIndicator.setPrefWidth(64);/*from  w w  w. j  a  va2  s.c  o  m*/
    progressIndicator.setPrefHeight(64);

    progressIndicatorPanel = new HBox();
    progressIndicatorPanel.getStyleClass().add("rightPane");

    progressIndicatorPanel.getChildren().add(progressIndicator);
    progressIndicatorPanel.setAlignment(Pos.CENTER);
}

From source file:dpfmanager.shell.interfaces.gui.component.dessign.DessignView.java

private void showLoadingConfig() {
    ProgressIndicator pi = new ProgressIndicator();
    pi.setPrefWidth(75);/*from  ww w  .ja  v  a  2 s .  c o  m*/
    pi.setPrefHeight(75);
    pi.setProgress(-1);
    vBoxConfig = new VBox();
    vBoxConfig.setAlignment(Pos.TOP_CENTER);
    vBoxConfig.setPrefWidth(configScroll.getWidth() - 5);
    vBoxConfig.getChildren().add(pi);
    VBox.setMargin(pi, new Insets(10, 0, 0, 0));
    configScroll.setContent(vBoxConfig);
}

From source file:editeurpanovisu.EditeurPanovisu.java

/**
 *
 * @param primaryStage//from  w ww .  ja va2  s  .co m
 * @param width
 * @param height
 * @throws Exception
 */
private void creeEnvironnement(Stage primaryStage, int width, int height) throws Exception {
    popUp = new PopUpDialogController();
    primaryStage.setMaximized(true);
    double largeurOutils = 380;

    hauteurInterface = height;
    largeurInterface = width;
    /**
     * Cration des lments constitutifs de l'cran
     */
    VBox root = new VBox();
    creeMenu(root, width);
    tabPaneEnvironnement = new TabPane();
    //        tabPaneEnvironnement.setTranslateZ(5);
    tabPaneEnvironnement.setMinHeight(height - 60);
    tabPaneEnvironnement.setMaxHeight(height - 60);
    Pane barreStatus = new Pane();
    barreStatus.setPrefSize(width + 20, 30);
    barreStatus.setTranslateY(25);
    barreStatus.setStyle("-fx-background-color:#c00;-fx-border-color:#aaa");
    tabVisite = new Tab();
    Pane visualiseur;
    Pane panneauPlan;
    tabInterface = new Tab();
    tabPlan = new Tab();
    gestionnaireInterface.creeInterface(width, height - 60);
    visualiseur = gestionnaireInterface.tabInterface;
    gestionnairePlan.creeInterface(width, height - 60);
    panneauPlan = gestionnairePlan.tabInterface;
    tabInterface.setContent(visualiseur);
    tabPlan.setContent(panneauPlan);

    HBox hbEnvironnement = new HBox();
    TextArea txtTitrePano;
    TextArea tfTitreVisite;
    RadioButton radSphere;
    RadioButton radCube;
    CheckBox chkAfficheTitre;
    CheckBox chkAfficheInfo;

    tabPaneEnvironnement.getTabs().addAll(tabVisite, tabInterface, tabPlan);
    //tabPaneEnvironnement.setTranslateY(80);
    tabPaneEnvironnement.setSide(Side.TOP);
    tabPaneEnvironnement.getSelectionModel().selectedItemProperty()
            .addListener((ObservableValue<? extends Tab> ov, Tab t, Tab t1) -> {
                gestionnaireInterface.rafraichit();
            });

    tabVisite.setText(rb.getString("main.creationVisite"));
    tabVisite.setClosable(false);
    tabInterface.setText(rb.getString("main.creationInterface"));
    tabInterface.setClosable(false);
    tabPlan.setText(rb.getString("main.tabPlan"));
    tabPlan.setClosable(false);
    tabPlan.setDisable(true);
    tabVisite.setContent(hbEnvironnement);
    double largeur;
    String labelStyle = "-fx-color : white;-fx-background-color : #fff;-fx-padding : 5px;  -fx-border : 1px solid #777;-fx-width : 100px;-fx-margin : 5px; ";

    scene = new Scene(root, width, height, Color.rgb(221, 221, 221));
    //        if (systemeExploitation.indexOf("inux") != -1) {
    //            root.setStyle("-fx-font-size : 7pt;-fx-font-family: sans-serif;");
    //        } else {
    root.setStyle("-fx-font-size : 9pt;-fx-font-family: Arial;");
    //        }
    panneauOutils = new ScrollPane();
    panneauOutils.setId("panOutils");
    //        panneauOutils.setStyle("-fx-background-color : #ccc;");
    outils = new VBox();
    paneChoixPanoramique = new VBox();
    paneChoixPanoramique.setTranslateX(10);
    paneChoixPanoramique.setId("choixPanoramique");
    Label lblTitreVisite = new Label(rb.getString("main.titreVisite"));
    lblTitreVisite.setStyle("-fx-font-size : 10pt;-fx-font-weight : bold;");
    lblTitreVisite.setPadding(new Insets(15, 5, 5, 0));
    lblTitreVisite.setMinWidth(largeurOutils - 20);
    lblTitreVisite.setAlignment(Pos.CENTER);

    tfTitreVisite = new TextArea();
    tfTitreVisite.setId("titreVisite");
    tfTitreVisite.setPrefSize(200, 25);
    tfTitreVisite.setMaxSize(340, 25);

    Separator sepTitre = new Separator(Orientation.HORIZONTAL);
    sepTitre.setMinHeight(10);

    Label lblChoixPanoramiqueEntree = new Label(rb.getString("main.panoEntree"));
    lblChoixPanoramiqueEntree.setStyle("-fx-font-size : 10pt;-fx-font-weight : bold;");
    lblChoixPanoramiqueEntree.setPadding(new Insets(15, 5, 5, 0));
    lblChoixPanoramiqueEntree.setMinWidth(largeurOutils - 20);
    lblChoixPanoramiqueEntree.setAlignment(Pos.CENTER);

    lblChoixPanoramique = new Label(rb.getString("main.panoAffiche"));
    lblChoixPanoramique.setStyle("-fx-font-size : 10pt;-fx-font-weight : bold;");
    lblChoixPanoramique.setPadding(new Insets(10, 5, 5, 0));
    lblChoixPanoramique.setMinWidth(largeurOutils - 20);
    lblChoixPanoramique.setAlignment(Pos.CENTER);

    Separator sepPano = new Separator(Orientation.HORIZONTAL);
    sepPano.setMinHeight(10);
    listeChoixPanoramique.setVisibleRowCount(10);
    listeChoixPanoramique.setTranslateX(60);
    Pane fond = new Pane();
    fond.setCursor(Cursor.HAND);
    ImageView ivSupprPanoramique = new ImageView(
            new Image("file:" + repertAppli + File.separator + "images/suppr.png", 30, 30, true, true));
    fond.setTranslateX(260);
    fond.setTranslateY(-40);
    Tooltip t = new Tooltip(rb.getString("main.supprimePano"));
    t.setStyle(tooltipStyle);
    Tooltip.install(fond, t);
    fond.getChildren().add(ivSupprPanoramique);
    fond.setOnMouseClicked((MouseEvent me) -> {
        retirePanoCourant();
    });

    listeChoixPanoramiqueEntree.setTranslateX(60);
    Separator sepInfo = new Separator(Orientation.HORIZONTAL);
    Label lblTitrePano = new Label(rb.getString("main.titrePano"));
    lblTitrePano.setStyle("-fx-font-size : 10pt;-fx-font-weight : bold;");
    lblTitrePano.setPadding(new Insets(5, 5, 5, 0));
    lblTitrePano.setMinWidth(largeurOutils - 20);
    lblTitrePano.setAlignment(Pos.CENTER);
    txtTitrePano = new TextArea();
    txtTitrePano.setId("txttitrepano");
    txtTitrePano.setPrefSize(200, 25);
    txtTitrePano.setMaxSize(340, 25);
    txtTitrePano.textProperty().addListener((final ObservableValue<? extends String> observable,
            final String oldValue, final String newValue) -> {
        clickBtnValidePano();
    });

    paneChoixPanoramique.getChildren().addAll(lblTitreVisite, tfTitreVisite, lblChoixPanoramiqueEntree,
            listeChoixPanoramiqueEntree, sepPano, lblChoixPanoramique, listeChoixPanoramique, fond,
            lblTitrePano, txtTitrePano, sepInfo);
    paneChoixPanoramique.setSpacing(10);
    /*
      modifier pour afficher le panneau des derniers fichiers;        
     */
    //outils.getChildren().addAll(lastFiles, paneChoixPanoramique);

    outils.getChildren().addAll(paneChoixPanoramique);

    paneChoixPanoramique.setVisible(false);
    /*
     Cration du panneau d'info du panoramique
     */

    vuePanoramique = new ScrollPane();

    coordonnees = new HBox();
    pano = new Pane();
    panneau2 = new AnchorPane();
    lblLong = new Label("");
    lblLat = new Label("");
    imagePanoramique = new ImageView();

    primaryStage.setScene(scene);
    //scene.getStylesheets().add("file:css/test.css");
    /**
     *
     */
    vuePanoramique.setPrefSize(width - largeurOutils - 20, height - 130);
    vuePanoramique.setMaxSize(width - largeurOutils - 20, height - 130);
    vuePanoramique.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    vuePanoramique.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    vuePanoramique.setTranslateY(5);

    //vuePanoramique.setStyle("-fx-background-color : #c00;");
    /**
     *
     */
    panneauOutils.setContent(outils);
    panneauOutils.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    panneauOutils.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    panneauOutils.setPrefSize(largeurOutils, height - 240);
    panneauOutils.setMaxWidth(largeurOutils);
    panneauOutils.setMaxHeight(height - 240);
    panneauOutils.setTranslateY(15);
    panneauOutils.setTranslateX(20);
    //        panneauOutils.setStyle("-fx-background-color : #ccc;");
    /**
     *
     */
    pano.setCursor(Cursor.CROSSHAIR);
    outils.setPrefWidth(largeurOutils - 20);
    //        outils.setStyle("-fx-background-color : #ccc;");
    outils.minHeight(height - 130);
    outils.setLayoutX(10);
    //        lblLong.setStyle(labelStyle);
    //        lblLat.setStyle(labelStyle);
    lblLong.setPrefSize(100, 15);
    lblLat.setPrefSize(100, 15);
    lblLat.setTranslateX(50);
    //        panneau2.setStyle("-fx-background-color : #ddd;");
    panneau2.setPrefSize(width - largeurOutils - 20, height - 140);

    imagePanoramique.setCache(true);
    largeur = largeurMax - 60;
    imagePanoramique.setFitWidth(largeur);
    imagePanoramique.setFitHeight(largeur / 2.0d);
    imagePanoramique.setLayoutX((largeurMax - largeur) / 2.d);
    pano.getChildren().add(imagePanoramique);
    pano.setPrefSize(imagePanoramique.getFitWidth(), imagePanoramique.getFitHeight());
    pano.setMaxSize(imagePanoramique.getFitWidth(), imagePanoramique.getFitHeight());

    pano.setLayoutY(20);
    lblLong.setTranslateX(50);
    lblLat.setTranslateX(80);
    coordonnees.getChildren().setAll(lblLong, lblLat);
    vuePanoramique.setContent(panneau2);
    hbEnvironnement.getChildren().setAll(vuePanoramique, panneauOutils);
    AnchorPane paneEnv = new AnchorPane();
    paneAttends = new AnchorPane();
    paneAttends.setPrefHeight(250);
    paneAttends.setPrefWidth(400);
    paneAttends.setStyle("-fx-background-color : #ccc;" + "-fx-border-color: #666;" + "-fx-border-radius: 5px;"
            + "-fx-border-width: 1px;");
    paneAttends.setLayoutX((width - 400) / 2.d);
    paneAttends.setLayoutY((height - 250) / 2.d - 55);
    ProgressIndicator p1 = new ProgressIndicator();
    p1.setPrefSize(100, 100);
    p1.setLayoutX(150);
    p1.setLayoutY(50);
    Label lblAttends = new Label(rb.getString("main.attendsChargement"));
    lblAttends.setMinWidth(400);
    lblAttends.setAlignment(Pos.CENTER);
    lblAttends.setLayoutY(20);
    lblCharge = new Label();
    lblCharge.setMinWidth(400);
    lblCharge.setLayoutY(200);
    paneAttends.getChildren().addAll(lblAttends, p1, lblCharge);
    paneAttends.setVisible(false);
    paneEnv.getChildren().addAll(tabPaneEnvironnement, paneAttends);
    //        paneEnv.getChildren().addAll(tabPaneEnvironnement);
    root.getChildren().addAll(paneEnv);
    panneau2.getChildren().setAll(coordonnees, pano);
    primaryStage.show();
    popUp.affichePopup();
    lblDragDrop = new Label(rb.getString("main.dragDrop"));
    lblDragDrop.setMinHeight(vuePanoramique.getPrefHeight());
    lblDragDrop.setMaxHeight(vuePanoramique.getPrefHeight());
    lblDragDrop.setMinWidth(vuePanoramique.getPrefWidth());
    lblDragDrop.setMaxWidth(vuePanoramique.getPrefWidth());
    lblDragDrop.setAlignment(Pos.CENTER);
    lblDragDrop.setTextFill(Color.web("#c9c7c7"));
    lblDragDrop.setTextAlignment(TextAlignment.CENTER);
    lblDragDrop.setWrapText(true);
    lblDragDrop.setStyle("-fx-font-size:72px");
    lblDragDrop.setTranslateY(-100);
    panneau2.getChildren().addAll(lblDragDrop, afficheLegende());
}

From source file:org.beryx.viewreka.fxapp.ProjectLibs.java

public void installLibs(String prjName, File prjDir) {
    InstallLibsTask task = new InstallLibsTask(prjName, prjDir, lstLib);

    Stage progressStage = new Stage();
    progressStage.setOnCloseRequest(ev -> {
        if (Dialogs.confirmYesNo("Cancel",
                "Are you sure you want to cancel the installation of project libraries?", null)) {
            task.cancel();//from   www .j av  a2 s.  c  om
        }
    });
    progressStage.initStyle(StageStyle.UTILITY);
    progressStage.initModality(Modality.APPLICATION_MODAL);
    progressStage.setTitle("Create project " + prjName);

    GridPane grid = new GridPane();
    grid.setHgap(20);
    grid.setVgap(20);
    grid.setPadding(new Insets(24, 10, 0, 24));

    ProgressIndicator progressIndicator = new ProgressIndicator();
    progressIndicator.setPrefSize(64, 64);
    progressIndicator.setMinSize(64, 64);
    progressIndicator.setMaxSize(64, 64);
    //        progressIndicator.progressProperty().bind(task.progressProperty());
    grid.add(progressIndicator, 0, 0);

    Label actionLabel = new Label("Install project libraries...");
    actionLabel.textProperty().bind(task.messageProperty());
    grid.add(actionLabel, 1, 0);

    progressStage.setScene(new Scene(grid, 600, 120));

    task.setOnSucceeded(ev -> closeProgress(progressStage, task));
    task.setOnFailed(ev -> closeProgress(progressStage, task));
    task.setOnCancelled(ev -> closeProgress(progressStage, task));

    progressStage.setOnShown(ev -> Executors.newSingleThreadExecutor().submit(task));
    progressStage.showAndWait();
}

From source file:org.sleuthkit.autopsy.imageanalyzer.ImageAnalyzerController.java

/**
 * Check if there are any fully analyzed groups available from the
 * GroupManager and remove blocking progress spinners if there are. If there
 * aren't, add a blocking progress spinner with appropriate message.
 *///w w w  . j  av a  2s . c o m
public final void checkForGroups() {
    if (groupManager.getAnalyzedGroups().isEmpty()) {
        if (IngestManager.getInstance().isIngestRunning()) {
            if (listeningEnabled.get() == false) {
                replaceNotification(fullUIStackPane,
                        new NoGroupsDialog("No groups are fully analyzed but listening to ingest is disabled. "
                                + " No groups will be available until ingest is finished and listening is re-enabled."));
            } else {
                replaceNotification(fullUIStackPane,
                        new NoGroupsDialog(
                                "No groups are fully analyzed yet, but ingest is still ongoing.  Please Wait.",
                                new ProgressIndicator()));
            }

        } else if (getFileUpdateQueueSizeProperty().get() > 0) {
            replaceNotification(fullUIStackPane, new NoGroupsDialog(
                    "No groups are fully analyzed yet, but image / video data is still being populated.  Please Wait.",
                    new ProgressIndicator()));
        } else if (db != null && db.countAllFiles() <= 0) { // there are no files in db
            replaceNotification(fullUIStackPane,
                    new NoGroupsDialog("There are no images/videos in the added datasources."));

        } else if (!groupManager.isRegrouping()) {
            replaceNotification(centralStackPane,
                    new NoGroupsDialog("There are no fully analyzed groups to display:"
                            + "  the current Group By setting resulted in no groups, "
                            + "or no groups are fully analyzed but ingest is not running."));
        }

    } else {
        clearNotification();
    }
}

From source file:org.sleuthkit.autopsy.imagegallery.ImageGalleryController.java

/**
 * Check if there are any fully analyzed groups available from the
 * GroupManager and remove blocking progress spinners if there are. If there
 * aren't, add a blocking progress spinner with appropriate message.
 *//* w ww  .j  a va  2  s.  co  m*/
public void checkForGroups() {
    if (groupManager.getAnalyzedGroups().isEmpty()) {
        if (IngestManager.getInstance().isIngestRunning()) {
            if (listeningEnabled.get() == false) {
                replaceNotification(fullUIStackPane,
                        new NoGroupsDialog("No groups are fully analyzed; but listening to ingest is disabled. "
                                + " No groups will be available until ingest is finished and listening is re-enabled."));
            } else {
                replaceNotification(fullUIStackPane,
                        new NoGroupsDialog(
                                "No groups are fully analyzed yet, but ingest is still ongoing.  Please Wait.",
                                new ProgressIndicator()));
            }

        } else if (getFileUpdateQueueSizeProperty().get() > 0) {
            replaceNotification(fullUIStackPane, new NoGroupsDialog(
                    "No groups are fully analyzed yet, but image / video data is still being populated.  Please Wait.",
                    new ProgressIndicator()));
        } else if (db != null && db.countAllFiles() <= 0) { // there are no files in db
            if (listeningEnabled.get() == false) {
                replaceNotification(fullUIStackPane, new NoGroupsDialog(
                        "There are no images/videos available from the added datasources;  but listening to ingest is disabled. "
                                + " No groups will be available until ingest is finished and listening is re-enabled."));
            } else {
                replaceNotification(fullUIStackPane,
                        new NoGroupsDialog("There are no images/videos in the added datasources."));
            }

        } else if (!groupManager.isRegrouping()) {
            replaceNotification(centralStackPane,
                    new NoGroupsDialog("There are no fully analyzed groups to display:"
                            + "  the current Group By setting resulted in no groups, "
                            + "or no groups are fully analyzed but ingest is not running."));
        }

    } else {
        clearNotification();
    }
}