-
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:add LoginPageView with image section
- Loading branch information
MatheaGjerde
committed
Mar 10, 2026
1 parent
a5aa3e0
commit 1a9aef9
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
src/main/java/edu/group5/app/view/loginpage/LoginPageView.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,38 @@ | ||
| package edu.group5.app.view.loginpage; | ||
|
|
||
|
|
||
| import edu.group5.app.control.HeaderController; | ||
| import edu.group5.app.view.Header; | ||
| import javafx.geometry.Pos; | ||
| import javafx.scene.layout.*; | ||
|
|
||
| import java.util.Objects; | ||
|
|
||
| public class LoginPageView extends BorderPane { | ||
|
|
||
| public LoginPageView(HeaderController headerController) { | ||
| Header headerView = new Header(headerController); | ||
| setTop(headerView); | ||
|
|
||
| HBox content = new HBox(); | ||
| content.setFillHeight(true); | ||
|
|
||
| VBox loginSection = new VBox(); | ||
| loginSection.setAlignment(Pos.CENTER); | ||
| HBox.setHgrow(loginSection, Priority.ALWAYS); | ||
|
|
||
| StackPane imageSection = new StackPane(); | ||
| imageSection.setId("image-section"); | ||
| HBox.setHgrow(imageSection, Priority.ALWAYS); | ||
|
|
||
|
|
||
| content.getChildren().addAll(loginSection, imageSection); | ||
|
|
||
| String css = Objects.requireNonNull( | ||
| getClass().getResource("/loginpage/login.css")).toExternalForm(); | ||
| content.getStylesheets().add(css); | ||
|
|
||
| setCenter(content); | ||
| } | ||
|
|
||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
| #image-section { | ||
| -fx-background-image: url("/loginpage/login-image.jpg"); | ||
| -fx-background-size: 200%; | ||
| -fx-background-position: left center; | ||
| -fx-background-repeat: no-repeat; | ||
| -fx-pref-width: 50%; | ||
| } |