-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Attempt at footer components with fxml
- Loading branch information
AdrianBalunan
committed
Apr 15, 2026
1 parent
ddc77eb
commit 9df6f3a
Showing
2 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...tion/src/main/java/ntnu/systemutvikling/team6/controller/components/FooterController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package ntnu.systemutvikling.team6.controller.components; | ||
|
|
||
| import javafx.event.ActionEvent; | ||
|
|
||
| public class FooterController extends BaseController { | ||
|
|
||
|
|
||
| public void switchToAboutPage(ActionEvent event) { | ||
| System.out.println("Click!"); | ||
| LoaderScene.LoadScene("aboutPage", event, null, null); | ||
| } | ||
| public void switchToFrontPage(ActionEvent event) { | ||
| System.out.println("Click!"); | ||
| LoaderScene.LoadScene("FrontPage", event, null, null); | ||
| } | ||
|
|
||
| @Override | ||
| protected void authTokenisSet() { | ||
|
|
||
| } | ||
| } |
92 changes: 92 additions & 0 deletions
92
helpmehelpapplication/src/main/resources/fxml/components/footer.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| <?import javafx.scene.layout.GridPane?> | ||
| <?import javafx.scene.layout.HBox?> | ||
| <?import javafx.scene.layout.ColumnConstraints?> | ||
| <?import javafx.scene.layout.RowConstraints?> | ||
| <?import javafx.scene.layout.StackPane?> | ||
| <?import javafx.scene.shape.Rectangle?> | ||
| <?import javafx.scene.control.Label?> | ||
| <?import javafx.scene.text.Font?> | ||
| <?import javafx.scene.layout.VBox?> | ||
| <?import javafx.scene.Cursor?> | ||
| <?import javafx.scene.image.ImageView?> | ||
| <?import javafx.scene.image.Image?> | ||
|
|
||
| <HBox alignment="BOTTOM_CENTER" prefHeight="12.0" prefWidth="800.0" style="-fx-background-color: #2f8f8b;" xmlns="http://javafx.com/javafx/21" | ||
| xmlns:fx="http://javafx.com/fxml/1" | ||
| fx:controller="ntnu.systemutvikling.team6.controller.components.FooterController" GridPane.rowIndex="2"> | ||
| <children> | ||
| <GridPane HBox.hgrow="ALWAYS"> | ||
| <columnConstraints> | ||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="60.0" prefWidth="100.0" /> | ||
| <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | ||
| </columnConstraints> | ||
| <rowConstraints> | ||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | ||
| </rowConstraints> | ||
| <children> | ||
| <StackPane prefHeight="150.0" prefWidth="200.0"> | ||
| <children> | ||
| <Rectangle fill="#2f8f8b" height="130.0" stroke="TRANSPARENT" strokeType="INSIDE" translateY="1.0" width="800.0" /> | ||
| <Label text="Help" textFill="WHITE" translateX="80.0" StackPane.alignment="CENTER_LEFT"> | ||
| <font> | ||
| <Font name="System Bold" size="26.0" /> | ||
| </font> | ||
| </Label> | ||
| <Label text="Me" textFill="#c8e6c9" translateX="145.0" StackPane.alignment="CENTER_LEFT"> | ||
| <font> | ||
| <Font name="System Bold" size="26.0" /> | ||
| </font> | ||
| </Label> | ||
| <Label text="Help" textFill="WHITE" translateX="192.0" StackPane.alignment="CENTER_LEFT"> | ||
| <font> | ||
| <Font name="System Bold" size="26.0" /> | ||
| </font> | ||
| </Label> | ||
| <Rectangle fill="WHITE" height="90.0" stroke="TRANSPARENT" strokeType="INSIDE" translateX="-120.0" width="2.0" /> | ||
| <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" translateX="-40.0" StackPane.alignment="CENTER_LEFT"> | ||
| <children> | ||
| <Label fx:id="aboutUsLink" text="About us" textFill="WHITE" | ||
| onMouseClicked="#switchToAboutPage"> | ||
| <font><Font name="System Bold" size="16.0" /></font> | ||
| <cursor><Cursor fx:constant="HAND" /></cursor> | ||
| </Label> | ||
| <!-- | ||
| <Label text="Something else" textFill="WHITE"> | ||
| <font> | ||
| <Font name="System Bold" size="16.0" /> | ||
| </font> | ||
| <cursor> | ||
| <Cursor fx:constant="HAND" /> | ||
| </cursor> | ||
| </Label> | ||
| <Label text="Third link" textFill="WHITE"> | ||
| <font> | ||
| <Font name="System Bold" size="16.0" /> | ||
| </font> | ||
| <cursor> | ||
| <Cursor fx:constant="HAND" /> | ||
| </cursor> | ||
| </Label> | ||
| --> | ||
| </children> | ||
| </VBox> | ||
| </children> | ||
| </StackPane> | ||
| <StackPane alignment="CENTER_RIGHT" prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="1"> | ||
| <children> | ||
| <ImageView fitHeight="71.0" fitWidth="161.0" pickOnBounds="true" preserveRatio="true" translateX="-60.0" translateY="-30.0"> | ||
| <image> | ||
| <Image url="@../../images/img.png" /> | ||
| </image> | ||
| </ImageView> | ||
| <Label maxWidth="200.0" text="All data is consistently updated and reverified" textAlignment="CENTER" textFill="WHITE" translateY="30.0" wrapText="true"> | ||
| <font> | ||
| <Font name="System Bold" size="14.0" /> | ||
| </font> | ||
| </Label> | ||
| </children> | ||
| </StackPane> | ||
| </children> | ||
| </GridPane> | ||
| </children> | ||
| </HBox> |