Package javafx.scene.control

Examples of javafx.scene.control.ProgressBar


  /**
   * Creates the {@linkplain Preloader} {@linkplain Scene}
   */
  private void createPreloaderScene() {
    bar = new ProgressBar();
    bar.setMinWidth(WIDTH / 1.3d);
    final Light light = new Light.Distant();
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(3d);
    lighting.setLight(light);
View Full Code Here


          refresh();
        }
    });
    buttonsPane.getChildren().add(refreshButton);
   
    final ProgressIndicator repeatProgressIndicator = new ProgressBar();
    progressbarDisplayTarget.getChildren().add(repeatProgressIndicator);
    final ToggleButton toggleButton = new ToggleButton("",new ImageView(new Image(getClass().getResourceAsStream("/de/scoopgmbh/copper/gui/icon/repeat.png"))));
    repeatProgressIndicator.setVisible(false);
    repeatProgressIndicator.setPrefWidth(300);
    repeatProgressIndicator.progressProperty().bind(repeatFilterService.progressProperty());
    toggleButton.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        if (toggleButton.isSelected()){
          repeatFilterService.setRefreshIntervall(Long.valueOf(refreshRateInMs.get()));
          repeatFilterService.reset();
          repeatFilterService.start();
        } else {
          repeatFilterService.cancel();
        }
      }
    });
    repeatFilterService.setOnCancelled(new EventHandler<WorkerStateEvent>() {
      @Override
      public void handle(WorkerStateEvent event) {
        repeatProgressIndicator.setVisible(false);
      }
    });
    repeatFilterService.stateProperty().addListener(new ChangeListener<State>() {
      @Override
      public void changed(ObservableValue<? extends State> observable, State oldValue, State newValue) {
        if (newValue==State.CANCELLED || newValue == State.FAILED || newValue == State.SUCCEEDED){
          repeatProgressIndicator.setVisible(false);
        } else {
          repeatProgressIndicator.setVisible(true);
        }
       
      }
    });
   
View Full Code Here

        final ImageView logo = new ImageView(new Image("JRebirth_Title.png"));
        p.getChildren().add(logo);
        StackPane.setAlignment(logo, Pos.CENTER);

        this.progressBar = new ProgressBar(0.0);
        this.progressBar.setPrefSize(460, 20);
        p.getChildren().add(this.progressBar);
        StackPane.setAlignment(this.progressBar, Pos.BOTTOM_CENTER);
        StackPane.setMargin(this.progressBar, new Insets(30));
View Full Code Here

         });*/
        pane = new Pane();
        hbox_pwd = new HBox();
        hbox_pwd.setPadding(new Insets(0, 0, 0, 0));
        hbox_pwd.setSpacing(1);
        prog_pwd = new ProgressBar();
        prog_pwd.setProgress(0.0);
        prog_pwd.setOpacity(0.7f);
        vpwd_lbl = new Label("");
        vpwd_lbl.setFont(new Font("Arial", 10));
        vpwd_lbl.setOpacity(0.7f);
View Full Code Here

         });*/
        pane = new Pane();
        hbox_pwd = new HBox();
        hbox_pwd.setPadding(new Insets(0, 0, 0, 0));
        hbox_pwd.setSpacing(1);
        prog_pwd = new ProgressBar();
        prog_pwd.setProgress(0.0);
        prog_pwd.setOpacity(0.7f);
        vpwd_lbl = new Label("");
        vpwd_lbl.setFont(new Font("Arial", 10));
        vpwd_lbl.setOpacity(0.7f);
View Full Code Here

         });*/
        pane = new Pane();
        hbox_pwd = new HBox();
        hbox_pwd.setPadding(new Insets(0, 0, 0, 0));
        hbox_pwd.setSpacing(1);
        prog_pwd = new ProgressBar();
        prog_pwd.setProgress(0.0);
        prog_pwd.setOpacity(0.7f);
        vpwd_lbl = new Label("");
        vpwd_lbl.setFont(new Font("Arial", 10));
        vpwd_lbl.setOpacity(0.7f);
View Full Code Here

        progressIndicator.setPrefWidth(50.0);
        progressIndicator.setPrefHeight(50.0);
        AnchorPane.setBottomAnchor(progressIndicator, 5.0);
        AnchorPane.setRightAnchor(progressIndicator, 5.0);

        progressBar = new ProgressBar(0.0);
        progressBar.setPrefWidth(50.0);
        progressBar.setPrefHeight(15.0);
        progressBar.setMinHeight(15.0);

        HBox updateBox = new HBox(updateStatusLabel, progressBar);
View Full Code Here

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

            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(10);
View Full Code Here

        // TextArea area1 = new TextArea();
        // area1.setPromptText("TextArea with promptText");
        // area1.setPrefRowCount(2);
        // area1.setPrefColumnCount(15);
        // grid.add(area1, 7, 6, 2, 1);
        ProgressBar bar = new ProgressBar(0.6);
        grid.add(bar, 7, 6, 2, 1);

        Label labelb9 = new Label("small:");
        AquaFx.createLabelStyler().setSizeVariant(ControlSizeVariant.SMALL).style(labelb9);
        grid.add(labelb9, 0, 7);
        Slider slider6 = new Slider(0, 50, 20);
        slider6.setShowTickLabels(true);
        slider6.setShowTickMarks(true);
        slider6.setMajorTickUnit(25);
        slider6.setMinorTickCount(4);
        AquaFx.createSliderStyler().setSizeVariant(ControlSizeVariant.SMALL).style(slider6);
        grid.add(slider6, 1, 7, 2, 1);
        Slider slider12 = new Slider(0, 50, 20);
        slider12.setShowTickLabels(false);
        slider12.setShowTickMarks(false);
        AquaFx.createSliderStyler().setSizeVariant(ControlSizeVariant.SMALL).style(slider12);
        grid.add(slider12, 3, 7, 2, 1);
        ProgressIndicator indicator3 = new ProgressIndicator();
        AquaFx.createProgressIndicatorStyler().setSizeVariant(ControlSizeVariant.SMALL).style(indicator3);
        grid.add(indicator3, 5, 7);
        ProgressIndicator indicator4 = new ProgressIndicator(0.5);
        AquaFx.createProgressIndicatorStyler().setSizeVariant(ControlSizeVariant.SMALL).style(indicator4);
        grid.add(indicator4, 6, 7);
        // TextArea area2 = new TextArea();
        // area2.setPromptText("TextArea with promptText");
        // area2.setPrefRowCount(2);
        // area2.setPrefColumnCount(15);
        // AquaFx.resizeControl(area2, ControlSizeVariant.SMALL);
        // grid.add(area2, 7, 7, 2, 1);
        ProgressBar bar2 = new ProgressBar(0.6);
        AquaFx.createProgressBarStyler().setSizeVariant(ControlSizeVariant.SMALL).style(bar2);
        grid.add(bar2, 7, 7, 2, 1);

        Label labelb10 = new Label("mini:");
        AquaFx.createLabelStyler().setSizeVariant(ControlSizeVariant.MINI).style(labelb10);
        grid.add(labelb10, 0, 8);
        Slider slider7 = new Slider(0, 50, 20);
        slider7.setShowTickLabels(true);
        slider7.setShowTickMarks(true);
        slider7.setMajorTickUnit(25);
        slider7.setMinorTickCount(4);
        AquaFx.createSliderStyler().setSizeVariant(ControlSizeVariant.MINI).style(slider7);
        grid.add(slider7, 1, 8, 2, 1);
        Slider slider13 = new Slider(0, 50, 20);
        slider13.setShowTickLabels(false);
        slider13.setShowTickMarks(false);
        AquaFx.createSliderStyler().setSizeVariant(ControlSizeVariant.MINI).style(slider13);
        grid.add(slider13, 3, 8, 2, 1);
        ProgressIndicator indicator5 = new ProgressIndicator();
        AquaFx.createProgressIndicatorStyler().setSizeVariant(ControlSizeVariant.MINI).style(indicator5);
        grid.add(indicator5, 5, 8);
        ProgressIndicator indicator6 = new ProgressIndicator(0.5);
        AquaFx.createProgressIndicatorStyler().setSizeVariant(ControlSizeVariant.MINI).style(indicator6);
        grid.add(indicator6, 6, 8);
        // TextArea area3 = new TextArea();
        // area3.setPromptText("TextArea with promptText");
        // area3.setPrefRowCount(2);
        // area3.setPrefColumnCount(15);
        // AquaFx.resizeControl(area3, ControlSizeVariant.MINI);
        // grid.add(area3, 7, 8, 2, 1);
        ProgressBar bar3 = new ProgressBar(0.6);
        AquaFx.createProgressBarStyler().setSizeVariant(ControlSizeVariant.MINI).style(bar3);
        grid.add(bar3, 7, 8, 2, 1);

        /*
         * a GroupBox
View Full Code Here

        VBox root = new VBox();
        root.setSpacing(10);
        root.setPadding(new Insets(20));
        Scene scene = new Scene(root);

        final ProgressBar p = new ProgressBar(0.6);
        root.getChildren().add(p);

        Button b = new Button("Disable");
        b.setOnAction(new EventHandler<ActionEvent>() {

            @Override public void handle(ActionEvent event) {
                if (p.isDisabled()) {
                    p.setDisable(false);
                } else {
                    p.setDisable(true);
                }
            }
        });
        root.getChildren().add(b);

        Button bI = new Button("Indeterminate");
        bI.setOnAction(new EventHandler<ActionEvent>() {

            @Override public void handle(ActionEvent event) {
                if (p.isIndeterminate()) {
                    p.setProgress(0.6);
                } else {
                    p.setProgress(-1);
                }
            }
        });

        root.getChildren().add(bI);
View Full Code Here

TOP

Related Classes of javafx.scene.control.ProgressBar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.