Example usage for javafx.scene Group Group

List of usage examples for javafx.scene Group Group

Introduction

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

Prototype

public Group() 

Source Link

Document

Constructs a group.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 600, 400);
    stage.setScene(scene);/*  w  w w.java  2 s  .c  o  m*/
    stage.setTitle("Slider Sample");

    Slider slider = new Slider(0, 1, 0.5);
    slider.setShowTickMarks(true);
    slider.setShowTickLabels(true);
    slider.setMajorTickUnit(0.25f);
    slider.setBlockIncrement(0.1f);

    root.getChildren().add(slider);

    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  ww  . j  a  va 2s  .  com

    Group g = new Group();

    ProgressBar p2 = new ProgressBar();

    g.getChildren().add(p2);

    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  ww w . j ava  2 s .  c  o m*/

    Group g = new Group();

    ProgressBar p2 = new ProgressBar();
    p2.setProgress(0.25F);

    g.getChildren().add(p2);

    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);/*from  w w w . java2 s. co  m*/
    stage.setTitle("");

    QuadCurve quad = new QuadCurve();
    quad.setStartX(0.0f);
    quad.setStartY(50.0f);
    quad.setEndX(50.0f);
    quad.setEndY(50.0f);
    quad.setControlX(25.0f);
    quad.setControlY(0.0f);

    root.getChildren().add(quad);

    scene.setRoot(root);
    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  ww w.ja v a 2 s .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);//w w  w  .j  a  v a  2  s. co  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);/*from www  .  j a  v a  2 s  .c om*/
    stage.setTitle("Sample");

    Task<Integer> task = new Task<Integer>() {
        @Override
        protected Integer call() throws Exception {
            int iterations;
            for (iterations = 0; iterations < 100000; iterations++) {
                if (isCancelled()) {
                    break;
                }
                System.out.println("Iteration " + iterations);
            }
            return iterations;
        }
    };

    task.run();

    //  root.getChildren().add(t);

    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 ww. j  av  a 2 s . c om
    stage.setTitle("Sample");

    final int totalIterations = 90;

    IteratingTask task = new IteratingTask(totalIterations);

    task.run();
    System.out.println(task.getMessage());

    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);/*from  ww w .  j  a  v a 2  s  .  c  om*/
    stage.setTitle("Sample");

    Task<Integer> task = new Task<Integer>() {
        @Override
        protected Integer call() throws Exception {
            int iterations;
            for (iterations = 0; iterations < 10000000; iterations++) {
                if (isCancelled()) {
                    updateMessage("Cancelled");
                    break;
                }
                updateMessage("Iteration " + iterations);
                updateProgress(iterations, 10000000);
            }
            return iterations;
        }
    };

    task.run();
    System.out.println(task.getMessage());
    //  root.getChildren().add(t);

    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);//from   w ww. ja v a2 s . c  o  m
    stage.setTitle("Sample");

    Text t = new Text(10, 50, "This is a test");
    t.setFont(new Font(20));

    root.getChildren().add(t);

    stage.show();
}