Ejemplo n.º 1
0
  private Node createLoadPane() {
    loadPane = new TilePane(5, 5);
    loadPane.setPrefColumns(3);
    loadPane.setPadding(new Insets(5));
    for (int i = 0; i < 9; i++) {
      StackPane waitingPane = new StackPane();
      Rectangle background = new Rectangle((380) / 3, (380) / 3, Color.WHITE);
      indicators[i] = new ProgressIndicator();
      indicators[i].setPrefSize(50, 50);
      indicators[i].setMaxSize(50, 50);
      indicators[i].setTranslateY(-25);
      indicators[i].setTranslateX(-10);
      loading[i] = new Label();
      loading[i].setTranslateY(25);
      waitingPane.getChildren().addAll(background, indicators[i], loading[i]);
      loadPane.getChildren().add(waitingPane);
    }

    return loadPane;
  }
 public void applyTo(javafx.scene.layout.TilePane x) {
   super.applyTo(x);
   int set = __set;
   while (set != 0) {
     int i = Integer.numberOfTrailingZeros(set);
     set &= ~(1 << i);
     switch (i) {
       case 0:
         x.setAlignment(this.alignment);
         break;
       case 1:
         x.setHgap(this.hgap);
         break;
       case 2:
         x.setOrientation(this.orientation);
         break;
       case 3:
         x.setPrefColumns(this.prefColumns);
         break;
       case 4:
         x.setPrefRows(this.prefRows);
         break;
       case 5:
         x.setPrefTileHeight(this.prefTileHeight);
         break;
       case 6:
         x.setPrefTileWidth(this.prefTileWidth);
         break;
       case 7:
         x.setTileAlignment(this.tileAlignment);
         break;
       case 8:
         x.setVgap(this.vgap);
         break;
     }
   }
 }