Examples of Scene


Examples of javafx.scene.Scene

          }
        });
        HBox buttonbox= new HBox();
        buttonbox.getChildren().add(button);
        borderPane.setBottom(buttonbox);
        stage.setScene(new Scene(borderPane));
        stage.show();
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
          @Override
          public void handle(WindowEvent event) {
            System.exit(0);
View Full Code Here

Examples of javafx.scene.Scene

  @Override
  public void start(final Stage primaryStage) { //Stage = window
    ApplicationContext applicationContext = new ApplicationContext();
    primaryStage.titleProperty().bind(new SimpleStringProperty("Copper Monitor (server: ").concat(applicationContext.serverAdressProperty().concat(")")));
    new Button(); // Trigger loading of default stylesheet
    final Scene scene = new Scene(applicationContext.getMainPane(), 1300, 900, Color.WHEAT);

    scene.getStylesheets().add(this.getClass().getResource("/de/scoopgmbh/copper/gui/css/base.css").toExternalForm());
   
    primaryStage.setScene(scene);
    primaryStage.show();
   
    //"--name=value".
View Full Code Here

Examples of javafx.scene.Scene

    return selectedDateProperty;
  }
 
  @Override
  public void start(Stage primaryStage) throws Exception {
    final Scene scene = new Scene(createContent());
    scene.getStylesheets().add(this.getClass().getResource("/de/scoopgmbh/copper/gui/css/base.css").toExternalForm());
    primaryStage.setScene(scene);
    primaryStage.show();
   
    SimpleObjectProperty<Date> date = new SimpleObjectProperty<Date>(new Date());
    bindBidirectionalSelected(date);
View Full Code Here

Examples of javafx.scene.Scene

                }
            });

            root = new BorderPane();

            Scene scene;
            if (stageStyle == StageStyle.DECORATED) {
                scene = new Scene(root);
                // !CHANGE START!
                scene.getStylesheets().addAll(DIALOGS_CSS_URL.toExternalForm());
                // !CHANGE END!
                setScene(scene);
                return;
            }

            // *** The rest is for adding window decorations ***

            decoratedRoot = new RootPane() {
                @Override protected void layoutChildren() {
                    super.layoutChildren();
                    if (resizeCorner != null) {
                        resizeCorner.relocate(getWidth() - 20, getHeight() - 20);
                    }
                }
            };
            decoratedRoot.getChildren().add(root);
            scene = new Scene(decoratedRoot);
            // !CHANGE START!
      String css = (String) AccessController.doPrivileged(new PrivilegedAction() {
                @Override public Object run() {
                    return DIALOGS_CSS_URL.toExternalForm();
                }
            });
            scene.getStylesheets().addAll(css);
            // !CHANGE END!
            scene.setFill(Color.TRANSPARENT);
            setScene(scene);

            decoratedRoot.getStyleClass().addAll("dialog", "decorated-root");

            focusedProperty().addListener(new InvalidationListener() {
View Full Code Here

Examples of javafx.scene.Scene

    @Override
    public void start(Stage stage) {
        stage.setTitle("BalsaWings2");
        Group root = new Group();
        Scene scene = new GameScene(root);
        stage.setScene(scene);
        stage.show();
    }
View Full Code Here

Examples of javafx.scene.Scene

 
  @Override
  public void start(final Stage stage) {
    pane = new BorderPane();
   
    final Scene scene = new Scene(pane, 1300, 900, Color.WHEAT);
      stage.setWidth(1167);
      stage.setHeight(800);
     
      scene.getStylesheets().add(this.getClass().getResource("/de/scoopgmbh/copper/gui/css/base.css").toExternalForm());
     
      stage.setScene(scene);
      stage.show();
     
      ApplicationFixture.stage = stage;
View Full Code Here

Examples of javafx.scene.Scene

        buildScene();
        buildCamera();
        buildAxes();
        buildMolecule();

        Scene scene = new Scene(root, 1024, 768, true);
        scene.setFill(Color.GREY);
        handleKeyboard(scene, world);
        handleMouse(scene, world);

        primaryStage.setTitle("Molecule Sample Application");
        primaryStage.setScene(scene);
        primaryStage.show();

        scene.setCamera(camera);

    }
View Full Code Here

Examples of javafx.scene.Scene

        });
       
        StackPane root = new StackPane();
        root.getChildren().add(btn);
       
        Scene scene = new Scene(root, 300, 250);
       
        primaryStage.setTitle("Network Client");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
View Full Code Here

Examples of javafx.scene.Scene

    root.setPrefSize(width, height);
    if (children != null) {
      root.getChildren().addAll(children);
    }
    if (parent != null) {
      stage.setScene(new Scene(root, parent.getWidth(), parent.getHeight(), Color.TRANSPARENT));
      stage.initOwner(parent);
      stage.setX(parent.getX() + parent.getScene().getWidth() / 2d - width / 2d);
      stage.setY(parent.getY() + parent.getScene().getHeight() / 2d - height / 2d);
      parent.xProperty().addListener(new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
          stage.setX(newValue.doubleValue() + parent.getScene().getWidth() / 2d - width / 2d);
        }
      });
      parent.yProperty().addListener(new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
          stage.setY(newValue.doubleValue() + parent.getScene().getHeight() / 2d - height / 2d);
        }
      });
    } else {
      stage.setScene(new Scene(root, width, height, Color.TRANSPARENT));
    }
    return stage;
  }
View Full Code Here

Examples of javafx.scene.Scene

        stage.setTitle(RS.rbLabel(titleKey));
      }
      content = VBoxBuilder.create().styleClass("dialog")
          .build();
      content.setMaxSize(width, height);
      stage.setScene(new Scene(content, width, height, Color.TRANSPARENT));
      stage.getScene().getStylesheets().add(RS.path(RS.CSS_MAIN));
      final FlowPane flowPane = new FlowPane();
      flowPane.setAlignment(Pos.CENTER);
      flowPane.setVgap(20d);
      flowPane.setHgap(10d);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.