Skip to content

Commit

Permalink
UI Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
qinxutan committed Mar 28, 2024
1 parent 0aeef00 commit 7ed86da
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 53 deletions.
Binary file added src/main/resources/images/damith4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 67 additions & 53 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.Scene?>
Expand All @@ -9,11 +10,14 @@
<?import javafx.scene.image.Image?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>

<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.effect.DropShadow?>

<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<fx:root type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
title="Address App" minWidth="0" minHeight="0" onCloseRequest="#handleExit">
title="Address App" minWidth="500" minHeight="500" onCloseRequest="#handleExit">
<icons>
<Image url="@/images/address_book_32.png" />
</icons>
Expand All @@ -23,72 +27,82 @@
<URL value="@DarkTheme.css" />
<URL value="@Extensions.css" />
</stylesheets>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity"
xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1" HBox.hgrow="ALWAYS">
xmlns:fx="http://javafx.com/fxml/1">
<top>
<MenuBar fx:id="menuBar" VBox.vgrow="NEVER">
<Menu mnemonicParsing="false" text="File">
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit"/>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>
<VBox minWidth="100.0" prefHeight="100.0" prefWidth="400.0"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<MenuBar fx:id="menuBar" prefWidth="400" prefHeight="50" >
<Menu mnemonicParsing="false" text="File">
<MenuItem mnemonicParsing="false" onAction="#handleExit" text="Exit"/>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<MenuItem fx:id="helpMenuItem" mnemonicParsing="false" onAction="#handleHelp" text="Help" />
</Menu>
</MenuBar>
<!-- Horizontal banner -->
<HBox prefHeight="50" prefWidth="400" style="-fx-background-color: derive(#d7cbc0, 20%);"
alignment="CENTER">
<!-- ImageView for the logo or image -->
<ImageView fitWidth="267" fitHeight="150" preserveRatio="true" HBox.hgrow="ALWAYS"
VBox.vgrow="ALWAYS">
<!-- Specify the path or URL for the image -->
<image>
<Image url="/images/damith4.png"/>
</image>
</ImageView>
</HBox>
</children>
</VBox>
</top>
<center>
<SplitPane dividerPositions="0.33, 0.67" HBox.hgrow="ALWAYS" prefHeight="-1" prefWidth="-1">
<SplitPane dividerPositions="0.33, 0.67">
<items>
<HBox maxHeight="Infinity" prefHeight="-Infinity" maxWidth="Infinity" prefWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="moduleList" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" HBox.hgrow="ALWAYS">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="moduleListPanelPlaceholder" maxHeight="Infinity" prefWidth="-Infinity" VBox.vgrow="ALWAYS"/>
</VBox>
</children>
</HBox>
<HBox maxHeight="Infinity" prefHeight="-Infinity" maxWidth="Infinity" prefWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="tutoriallist" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" HBox.hgrow="ALWAYS">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="tutorialListPanelPlaceholder" maxHeight="Infinity" prefWidth="-Infinity" VBox.vgrow="ALWAYS"/>
</VBox>
</children>
</HBox>
<HBox maxHeight="Infinity" prefHeight="-Infinity" maxWidth="Infinity" prefWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="personList" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" HBox.hgrow="ALWAYS">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="personListPanelPlaceholder" maxHeight="Infinity" prefWidth="-Infinity" VBox.vgrow="ALWAYS"/>
</VBox>
</children>
</HBox>
<!-- Add a new VBox for the module list panel -->
<VBox fx:id="moduleList" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<!-- Placeholder for the ModuleListPanel -->
<StackPane fx:id="moduleListPanelPlaceholder" maxHeight="Infinity"/>
</VBox>
<VBox fx:id="tutoriallist" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<!-- Placeholder for the TutorialListPanel -->
<StackPane fx:id="tutorialListPanelPlaceholder" maxHeight="Infinity"/>
</VBox>
<VBox fx:id="personList" spacing="5"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="personListPanelPlaceholder" maxHeight="Infinity"/>
</VBox>
</items>
</SplitPane>
</center>
<bottom>
<VBox prefHeight="111.0" prefWidth="604.0" BorderPane.alignment="CENTER">
<VBox prefHeight="111.0" prefWidth="604.0" BorderPane.alignment="CENTER"
style="-fx-background-color: derive(#d7cbc0, 20%);">
<children>
<StackPane fx:id="resultDisplayPlaceholder" minHeight="140" prefHeight="140.0"
prefWidth="200.0" VBox.vgrow="NEVER"/>
<StackPane fx:id="commandBoxPlaceholder" prefHeight="150.0" prefWidth="200.0" VBox.vgrow="NEVER"/>
prefWidth="200.0" style="-fx-background-color: #ececec"/>
<StackPane fx:id="commandBoxPlaceholder" prefHeight="150.0" prefWidth="200.0"
style="-fx-background-color: derive(#d7cbc0, 20%);"/>
</children>
<padding>
<Insets bottom="10" />
</padding>
</VBox>
</bottom>
<StackPane fx:id="statusbarPlaceholder" VBox.vgrow="NEVER" />
</BorderPane>
</Scene>
</scene>
</fx:root>
</fx:root>

0 comments on commit 7ed86da

Please sign in to comment.