schnitzerlbrot

This commit is contained in:
Patrick 2025-01-13 19:54:35 +01:00
parent 4975948b43
commit 171d89f691
10 changed files with 36 additions and 6 deletions

View file

@ -43,6 +43,11 @@ public class CartController {
// Observable list to hold cart items
private final ObservableList<Item> cartItems = FXCollections.observableArrayList();
@FXML
void handleTitleClick(MouseEvent event) {
}
@FXML
public void initialize() {
// Set up columns to match Item properties

View file

@ -71,6 +71,11 @@ public class CheckOutController {
countryComboBox.getSelectionModel().selectFirst();
}
@FXML
void handleTitleClick(MouseEvent event) {
}
@FXML
private void handleCartButton() throws IOException {
App.setRoot("cart");

View file

@ -111,6 +111,11 @@ public class LoginController {
@FXML
private Label usernameLabel;
@FXML
void handleTitleClick(MouseEvent event) {
}
@FXML
void handleRegisterButtonClick(ActionEvent event) {

View file

@ -0,0 +1,5 @@
package com.example;
public class MouseEvent {
}

View file

@ -46,6 +46,11 @@ public class RegisterController {
@FXML
private Label footerCopyText;
@FXML
void handleTitleClick(MouseEvent event) {
}
@FXML
private void handleCartButton() throws IOException {
App.setRoot("cart");

View file

@ -37,6 +37,11 @@ public class ShopController {
System.out.println("ShopController initialized.");
}
@FXML
void handleTitleClick(MouseEvent event) {
}
@FXML
private void handleCartButton() throws IOException {
App.setRoot("cart");

View file

@ -19,7 +19,7 @@
<top>
<HBox fx:id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
<children>
<Label fx:id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Label fx:id="mainTitle" onMouseClicked="#handleTitleClick" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Pane HBox.hgrow="ALWAYS" />
<Button fx:id="cartBtn" mnemonicParsing="false" onAction="#handleCartButton" styleClass="cartBtn" text="Cart" />
<Button fx:id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />

View file

@ -12,12 +12,12 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.RegisterController">
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.RegisterController">
<top>
<HBox id="header" fx:id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
<children>
<!-- Main Title -->
<Label id="mainTitle" fx:id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Label id="mainTitle" fx:id="mainTitle" onMouseClicked="#handleTitleClick" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<!-- Spacer for alignment -->
<Pane fx:id="spacerPane" HBox.hgrow="ALWAYS" />

View file

@ -19,7 +19,7 @@
<top>
<HBox fx:id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
<children>
<Label fx:id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Label fx:id="mainTitle" onMouseClicked="#handleTitleClick" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Pane HBox.hgrow="ALWAYS" />
<Button fx:id="cartBtn" mnemonicParsing="false" onAction="#handleCartButton" styleClass="cartBtn" text="Cart" />
<Button fx:id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />

View file

@ -12,12 +12,12 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.RegisterController">
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.RegisterController">
<top>
<HBox id="header" fx:id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
<children>
<!-- Main Title -->
<Label id="mainTitle" fx:id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<Label id="mainTitle" fx:id="mainTitle" onMouseClicked="#handleTitleClick" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
<!-- Spacer for alignment -->
<Pane fx:id="spacerPane" HBox.hgrow="ALWAYS" />