Files
BrickLog/BrickLog-Client/src/main/java/com/example/bricklog/view/MainLayout.java
bryce 49a34e77ab Aperance Modifycation of the Client
sorting out the 'Dashboard' and SettingsWindow
creation of Kitset & MoC pages and BuildView model
2024-12-01 15:41:56 +13:00

33 lines
1.0 KiB
Java

package com.example.bricklog.view;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
public class MainLayout extends BorderPane {
public MainLayout() {
setTop(createMenuBar());
setCenter(createDashboard());
}
private HBox createMenuBar() {
HBox menuBar = new HBox();
Button dashboardButton = new Button("Dashboard");
dashboardButton.setOnAction(e -> setCenter(createDashboard()));
menuBar.getChildren().add(dashboardButton);
return menuBar;
}
private GridPane createDashboard() {
GridPane dashboard = new GridPane();
dashboard.add(new Label("Number of Kitsets:"), 0, 0);
dashboard.add(new Label("..."), 1, 0); // Placeholder for data
dashboard.add(new Label("Number of MoCs:"), 0, 1);
dashboard.add(new Label("..."), 1, 1); // Placeholder for data
return dashboard;
}
}