use of javafx.scene.control.ProgressBar in project JFoenix by jfoenixadmin.
the class ProgressBarDemo method start.
@Override
public void start(Stage stage) throws Exception {
pane = new VBox();
pane.setSpacing(30);
pane.setStyle("-fx-background-color:WHITE");
ProgressBar bar = new ProgressBar();
bar.setPrefWidth(500);
ProgressBar cssBar = new ProgressBar();
cssBar.setPrefWidth(500);
cssBar.setProgress(-1.0f);
JFXProgressBar jfxBar = new JFXProgressBar();
jfxBar.setPrefWidth(500);
JFXProgressBar jfxBarInf = new JFXProgressBar();
jfxBarInf.setPrefWidth(500);
jfxBarInf.setProgress(-1.0f);
Timeline timeline = new Timeline(new KeyFrame(Duration.ZERO, new KeyValue(bar.progressProperty(), 0), new KeyValue(jfxBar.progressProperty(), 0)), new KeyFrame(Duration.seconds(2), new KeyValue(bar.progressProperty(), 1), new KeyValue(jfxBar.progressProperty(), 1)));
timeline.setCycleCount(Timeline.INDEFINITE);
timeline.play();
pane.getChildren().addAll(bar, jfxBar, cssBar, jfxBarInf);
StackPane main = new StackPane();
main.getChildren().add(pane);
main.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY)));
StackPane.setMargin(pane, new Insets(20, 0, 0, 20));
final Scene scene = new Scene(main, 600, 200, Color.WHITE);
scene.getStylesheets().add(ProgressBarDemo.class.getResource("/resources/css/jfoenix-components.css").toExternalForm());
stage.setTitle("JFX ProgressBar Demo ");
stage.setScene(scene);
stage.setResizable(false);
stage.show();
}
use of javafx.scene.control.ProgressBar in project intellij-community by JetBrains.
the class StudyBrowserWindow method makeProgressBarWithListener.
private ProgressBar makeProgressBarWithListener() {
final ProgressBar progress = new ProgressBar();
progress.progressProperty().bind(myWebComponent.getEngine().getLoadWorker().progressProperty());
myWebComponent.getEngine().getLoadWorker().stateProperty().addListener((ov, oldState, newState) -> {
if (myWebComponent.getEngine().getLocation().contains("http") && newState == Worker.State.SUCCEEDED) {
myProgressBar.setVisible(false);
myWebComponent.setVisible(true);
}
});
return progress;
}
use of javafx.scene.control.ProgressBar in project Retrospector by NonlinearFruit.
the class Retrospector method init.
@Override
public void init() {
ImageView splash = new ImageView(new Image(SPLASH_IMAGE, SPLASH_WIDTH, SPLASH_HEIGHT, true, true));
loadProgress = new ProgressBar(0);
loadProgress.setPrefWidth(SPLASH_WIDTH);
progressText = new Label("Initializing . . .");
progressText.setBackground(new Background(new BackgroundFill(Color.GHOSTWHITE, new CornerRadii(5), new Insets(0))));
splashLayout = new VBox();
splashLayout.getChildren().addAll(splash, loadProgress, progressText);
progressText.setAlignment(Pos.CENTER);
// splashLayout.setEffect(new DropShadow());
splashLayout.setBackground(Background.EMPTY);
}
use of javafx.scene.control.ProgressBar in project SmartCity-Market by TechnionYP5777.
the class EmployeeGuiPreloader method init.
@Override
public void init() throws Exception {
System.out.println(EmployeeApplicationScreen.STEP() + "EmployeeGuiPreloader#init, thread: " + Thread.currentThread().getName());
// If preloader has complex UI it's initialization can be done in
// EmployeeApplicationScreen#init
Platform.runLater(() -> {
Label title = new Label("SmartMarket is loading\nplease wait...");
title.setTextAlignment(TextAlignment.CENTER);
progress = new ProgressBar();
progress.setProgress(0);
VBox root = new VBox(title, progress);
root.setAlignment(Pos.CENTER);
scene = new Scene(root, WIDTH, HEIGHT);
});
}
Aggregations