private void drawPanelForTopHeader() {
   Pane panel = new Pane();
   panel.setId("panelForTopheader");
   panel.setPrefSize(722, 382);
   panel.setLayoutX(-1);
   panel.setLayoutY(63);
   this.addToStep(panel);
   this.contentPanel = panel;
 }
  /** Draw the header at the top of the window */
  private void drawHeader() {
    final String title =
        this.getParentWizardTitle(); // FIXME: use this variable to draw the title of the window
    Pane header = new Pane();
    header.setId("header");
    header.setPrefSize(722, 65);
    header.setLayoutX(-1);
    header.setLayoutY(-1);
    header.setBackground(
        new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY)));

    ImageView topImage = new ImageView(this.createTopImage());
    topImage.setLayoutX(626);

    header.getChildren().add(topImage);
    this.addToStep(header);
  }
Beispiel #3
0
  @Override
  public void start(Stage stage) {
    Pane p1 = this.getCSSStyledPane();
    Pane p2 = this.getObjectStyledPane();

    p1.setLayoutX(10);
    p1.setLayoutY(10);

    // Place p2 20px right to p1
    p2.layoutYProperty().bind(p1.layoutYProperty());
    p2.layoutXProperty().bind(p1.layoutXProperty().add(p1.widthProperty()).add(20));

    Pane root = new Pane(p1, p2);
    root.setPrefSize(240, 70);
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.setTitle("Setting Background Fills for a Region");
    stage.show();
    stage.sizeToScene();
  }