I was trying to get the tiles to stretch and resize like in the demo video. I made the following changes in Demo.java
@Override public void start(Stage stage) {
// FlowPane pane = new FlowPane(Orientation.HORIZONTAL, 5, 5,
// percentageTile, clockTile, gaugeTile, sparkLineTile, areaChartTile,
// lineChartTile, timerControlTile, numberTile, textTile,
// highLowTile, plusMinusTile, sliderTile, switchTile, timeTile,
// barChartTile, customTile, leaderBoardTile, worldTile, mapTile);//, weatherTile);
// pane.setPrefWrapLength(1);
// pane.setAlignment(Pos.CENTER);
// pane.setCenterShape(true);
// pane.setPadding(new Insets(5));
// pane.setPrefSize(780, 395);
// pane.setBackground(new Background(new BackgroundFill(Color.web("#101214"), CornerRadii.EMPTY, Insets.EMPTY)));
FlowGridPane pane = new FlowGridPane(5, 4,
percentageTile, clockTile, gaugeTile, sparkLineTile, areaChartTile,
lineChartTile, timerControlTile, numberTile, textTile,
highLowTile, plusMinusTile, sliderTile, switchTile, timeTile,
barChartTile, customTile, leaderBoardTile, mapTile);//, weatherTile);
// pane.setPrefWrapLength(1);
pane.setAlignment(Pos.CENTER);
pane.setAlignment(Pos.CENTER);
pane.setHgap(5);
pane.setVgap(5);
pane.setCenterShape(true);
pane.setPrefSize(1200, 800);
pane.setBackground(new Background(new BackgroundFill(Color.web("#101214"), CornerRadii.EMPTY, Insets.EMPTY)));
Scene scene = new Scene(pane);
stage.setTitle("TilesFX");
stage.setScene(scene);
stage.show();
timer.start();
mapTile.addPoiLocation(new Location(51.85, 7.75, "Test"));
mapTile.removePoiLocation(new Location(51.85, 7.75, "Test"));
}
When the demo is run (gradlew Demo) the tiles are not stretched to the full extent:
If one drags the right edge across such that the FlowGridPane changes from 4 rows by 5 cols to 5 rows by 4 cols, and then drags the right edge back to the original position, the tiles are now fully stretched.