diff --git a/src/main/java/NTNU/IDATT1002/controllers/Explore.java b/src/main/java/NTNU/IDATT1002/controllers/Explore.java index be2e8c09c24fde9a5765d977826941270f1edba5..e9f7a47b102f13b9f089c465eba6489a5cc609a2 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Explore.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Explore.java @@ -62,8 +62,8 @@ public class Explore implements Initializable { VBox v = new VBox(); v.setPrefHeight(400); v.setPrefWidth(400); - v.setAlignment(Pos.CENTER); - v.setStyle("-fx-background-color: #999999;"); + v.setAlignment(Pos.TOP_LEFT); + //v.setStyle("-fx-background-color: #999999;"); //Image container ImageView iV = new ImageView(); diff --git a/src/main/resources/NTNU/IDATT1002/explore.fxml b/src/main/resources/NTNU/IDATT1002/explore.fxml index b693aeeb5467d2be9a916829c2eb80cec43939c2..3fb5ddae01b16c8849e5781fbd785e46c46f0bec 100644 --- a/src/main/resources/NTNU/IDATT1002/explore.fxml +++ b/src/main/resources/NTNU/IDATT1002/explore.fxml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.TextField?> @@ -12,70 +13,88 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.RowConstraints?> +<?import javafx.scene.layout.VBox?> -<AnchorPane maxHeight="1080.0" maxWidth="1920.0" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.Explore"> +<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.Explore"> <children> - <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0" style="-fx-background-color: #0c0c0c;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" styleClass="tbarbg" stylesheets="@style.css"> <children> - <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../../Images/PlaceholderLogo.png" /> - </image> - </ImageView> - <Pane prefHeight="100.0" prefWidth="343.0" /> - <TextField fx:id="tbar_search" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." /> - <Button fx:id="tbar_searchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" /> - <Button fx:id="tbar_explore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" /> - <Button fx:id="tbar_albums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" /> - <Button fx:id="tbar_map" mnemonicParsing="false" onAction="#switchToMap" text="MAP" /> - <Pane prefHeight="100.0" prefWidth="174.0" /> - <Button fx:id="tbar_upload" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" /> + <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0"> + <children> + <HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="250.0"> + <children> + <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../../Images/PlaceholderLogo.png" /> + </image> + <HBox.margin> + <Insets /> + </HBox.margin> + </ImageView> + </children> + <opaqueInsets> + <Insets /> + </opaqueInsets> + </HBox> + <TextField fx:id="tbar_search" focusTraversable="false" minWidth="200.0" prefHeight="35.0" prefWidth="400.0" promptText="Search: Tags, Albums, Metadata, etc..."> + <HBox.margin> + <Insets /> + </HBox.margin> + </TextField> + <Button fx:id="tbar_searchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" /> + <Button fx:id="tbar_explore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" /> + <Button fx:id="tbar_albums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" /> + <Button fx:id="tbar_map" minWidth="50" mnemonicParsing="false" onAction="#switchToMap" text="MAP" textFill="white" /> + <HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="250.0"> + <children> + <Button fx:id="tbar_upload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" /> + </children> + </HBox> + </children> + </HBox> </children> </HBox> - <ScrollPane fx:id="scrollPane" fitToWidth="true" hbarPolicy="NEVER" layoutY="100.0" prefHeight="980.0" prefWidth="1920.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="100.0"> + <ScrollPane fx:id="scrollPane" fitToWidth="true" hbarPolicy="NEVER" prefHeight="980.0" prefWidth="1920.0" VBox.vgrow="ALWAYS" styleClass="scroll-pane" stylesheets="@style.css"> <content> - <AnchorPane maxHeight="1920.0" minHeight="0.0" minWidth="0.0" prefHeight="2000.0" prefWidth="1920.0"> - <children> - <BorderPane prefHeight="2000.0" prefWidth="1920.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <top> - <Pane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #6d6d6d;" BorderPane.alignment="CENTER" /> - </top> - <left> - <Pane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #6d6d6d;" BorderPane.alignment="CENTER" /> - </left> - <right> - <Pane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #6d6d6d;" BorderPane.alignment="CENTER" /> - </right> - <center> - <GridPane fx:id="gridPane" alignment="CENTER" BorderPane.alignment="CENTER"> - <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - </GridPane> - </center> - <bottom> - <Pane prefHeight="150.0" prefWidth="1920.0" style="-fx-background-color: #6d6d6d;" BorderPane.alignment="CENTER"> - <children> - <HBox alignment="CENTER" layoutY="-2.0" prefHeight="84.0" prefWidth="1920.0" spacing="20.0"> - <children> - <Button fx:id="footer_previousBtn" mnemonicParsing="false" onAction="#switchToPrevious" text="PREVIOUS" /> - <Button fx:id="footer_nextBtn" layoutX="944.0" layoutY="48.0" mnemonicParsing="false" onAction="#switchToNext" text="NEXT" /> - </children> - </HBox> - </children></Pane> - </bottom> - </BorderPane> - </children></AnchorPane> + <BorderPane prefHeight="2000.0" prefWidth="1920.0" styleClass="bodybg" stylesheets="@style.css" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <top> + <Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" /> + </top> + <left> + <Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" /> + </left> + <right> + <Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" /> + </right> + <center> + <GridPane fx:id="gridPane" alignment="CENTER" hgap="10.0" styleClass="exploreGrid" stylesheets="@style.css" vgap="10.0" BorderPane.alignment="CENTER"> + <columnConstraints> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + </rowConstraints> + </GridPane> + </center> + <bottom> + <HBox alignment="CENTER" minHeight="200.0" prefHeight="200.0" prefWidth="1920.0" spacing="20.0" BorderPane.alignment="TOP_CENTER"> + <children> + <Button fx:id="footer_previousBtn" mnemonicParsing="false" onAction="#switchToPrevious" text="PREVIOUS" /> + <Button fx:id="footer_nextBtn" layoutX="944.0" layoutY="48.0" mnemonicParsing="false" onAction="#switchToNext" text="NEXT" /> + </children> + <padding> + <Insets bottom="70.0" top="10.0" /> + </padding> + </HBox> + </bottom> + </BorderPane> </content> </ScrollPane> </children> -</AnchorPane> +</VBox> diff --git a/src/main/resources/NTNU/IDATT1002/login.fxml b/src/main/resources/NTNU/IDATT1002/login.fxml index 9ca60a469a95821b37ca38f3f80148477ea4def7..39d123b13af61ca5321e12b953a04c6162a91154 100644 --- a/src/main/resources/NTNU/IDATT1002/login.fxml +++ b/src/main/resources/NTNU/IDATT1002/login.fxml @@ -41,8 +41,8 @@ <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <TextField fx:id="Username" prefHeight="35.0" prefWidth="157.0" promptText="Username" GridPane.rowIndex="1" /> - <PasswordField fx:id="Password" prefHeight="35.0" promptText="Password" GridPane.rowIndex="2" onKeyPressed="#enterLogin"/> + <TextField fx:id="Username" prefHeight="35.0" prefWidth="157.0" promptText="Username" GridPane.rowIndex="1" focusTraversable="false"/> + <PasswordField fx:id="Password" prefHeight="35.0" promptText="Password" GridPane.rowIndex="2" onKeyPressed="#enterLogin" focusTraversable="false"/> <HBox prefHeight="100.0" prefWidth="200.0" spacing="10.0" GridPane.rowIndex="3"> <children> <Button fx:id="login" onAction="#buttonLogin" prefHeight="35.0" prefWidth="69.0" text="Log In" textFill="WHITE" /> diff --git a/src/main/resources/NTNU/IDATT1002/main.fxml b/src/main/resources/NTNU/IDATT1002/main.fxml index 90b751e00f5d1c647dd1b1a913815bff77f21541..5d256edfc0469c31704c7116644ff9b388205a18 100644 --- a/src/main/resources/NTNU/IDATT1002/main.fxml +++ b/src/main/resources/NTNU/IDATT1002/main.fxml @@ -1,46 +1,61 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.TextField?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> -<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.HBox?> -<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> -<AnchorPane prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="NTNU.IDATT1002.controllers.Main"> +<VBox prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.Main"> <children> - <VBox prefHeight="1080.0" prefWidth="1920.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" styleClass="tbarbg" stylesheets="@style.css"> <children> - <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0" style="-fx-background-color: #0c0c0c;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0"> <children> - <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true"> - <image> - <Image url="@../../Images/PlaceholderLogo.png" /> - </image> - </ImageView> - <Pane prefHeight="100.0" prefWidth="343.0" /> - <TextField fx:id="tbar_search" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." /> - <Button fx:id="tbar_searchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" /> - <Button fx:id="tbar_explore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" /> - <Button fx:id="tbar_albums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" /> - <Button fx:id="tbar_map" mnemonicParsing="false" onAction="#switchToMap" text="MAP" /> - <Pane prefHeight="100.0" prefWidth="174.0" /> - <Button fx:id="tbar_upload" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" /> - </children> - </HBox> - <HBox alignment="CENTER" prefHeight="982.0" prefWidth="1920.0"> - <children> - <Button fx:id="uploadBtn" mnemonicParsing="false" onAction="#switchToUpload" text="UPLOAD"> - <font> - <Font size="60.0" /> - </font> - </Button> + <HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="250.0"> + <children> + <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../../Images/PlaceholderLogo.png" /> + </image> + <HBox.margin> + <Insets /> + </HBox.margin> + </ImageView> + </children> + <opaqueInsets> + <Insets /> + </opaqueInsets> + </HBox> + <TextField fx:id="tbar_search" focusTraversable="false" minWidth="200.0" prefHeight="35.0" prefWidth="400.0" promptText="Search: Tags, Albums, Metadata, etc..."> + <HBox.margin> + <Insets /> + </HBox.margin> + </TextField> + <Button fx:id="tbar_searchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" /> + <Button fx:id="tbar_explore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" /> + <Button fx:id="tbar_albums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" /> + <Button fx:id="tbar_map" minWidth="50" mnemonicParsing="false" onAction="#switchToMap" text="MAP" textFill="white" /> + <HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="250.0"> + <children> + <Button fx:id="tbar_upload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" /> + </children> + </HBox> </children> </HBox> </children> - </VBox> + </HBox> + <HBox alignment="CENTER" prefHeight="982.0" prefWidth="1920.0" styleClass="bodybg" stylesheets="@style.css" VBox.vgrow="ALWAYS"> + <children> + <Button fx:id="uploadBtn" mnemonicParsing="false" onAction="#switchToUpload" stylesheets="@style.css" text="UPLOAD" textFill="WHITE"> + <font> + <Font size="60.0" /> + </font> + </Button> + </children> + </HBox> </children> -</AnchorPane> +</VBox> diff --git a/src/main/resources/NTNU/IDATT1002/signup.fxml b/src/main/resources/NTNU/IDATT1002/signup.fxml index f8ddac4ab6b8b4a8c141e5b2e13348494856274f..c9451af05440ce3144da35f352fdc73415fffb5a 100644 --- a/src/main/resources/NTNU/IDATT1002/signup.fxml +++ b/src/main/resources/NTNU/IDATT1002/signup.fxml @@ -46,18 +46,18 @@ <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <TextField fx:id="signup_firstName" prefHeight="35.0" prefWidth="248.0" promptText="First name" GridPane.rowIndex="1" /> - <TextField fx:id="signup_lastName" prefHeight="35.0" promptText="Last name" GridPane.rowIndex="2" /> - <TextField fx:id="signup_username" prefHeight="35.0" promptText="Username" GridPane.rowIndex="3" /> - <TextField fx:id="signup_email" prefHeight="35.0" promptText="Email" GridPane.rowIndex="4" /> - <PasswordField fx:id="signup_password" prefHeight="35.0" prefWidth="247.0" promptText="Password" GridPane.rowIndex="5" /> + <TextField fx:id="signup_firstName" prefHeight="35.0" prefWidth="248.0" promptText="First name" GridPane.rowIndex="1" focusTraversable="false"/> + <TextField fx:id="signup_lastName" prefHeight="35.0" promptText="Last name" GridPane.rowIndex="2" focusTraversable="false"/> + <TextField fx:id="signup_username" prefHeight="35.0" promptText="Username" GridPane.rowIndex="3" focusTraversable="false"/> + <TextField fx:id="signup_email" prefHeight="35.0" promptText="Email" GridPane.rowIndex="4" focusTraversable="false"/> + <PasswordField fx:id="signup_password" prefHeight="35.0" prefWidth="247.0" promptText="Password" GridPane.rowIndex="5" focusTraversable="false"/> <HBox GridPane.rowIndex="6"> <children> - <TextField fx:id="signup_phoneCode" prefHeight="35.0" prefWidth="150.0" promptText="Calling code" /> - <TextField fx:id="signup_phoneNr" prefHeight="35.0" prefWidth="242.0" promptText="Phone number" /> + <TextField fx:id="signup_phoneCode" prefHeight="35.0" prefWidth="150.0" promptText="Calling code" focusTraversable="false"/> + <TextField fx:id="signup_phoneNr" prefHeight="35.0" prefWidth="242.0" promptText="Phone number" focusTraversable="false"/> </children> </HBox> - <DatePicker fx:id="signup_birthDate" prefHeight="35.0" prefWidth="304.0" promptText="Birth date" GridPane.rowIndex="7" /> + <DatePicker fx:id="signup_birthDate" prefHeight="35.0" prefWidth="304.0" promptText="Birth date" GridPane.rowIndex="7" focusTraversable="false"/> <Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="SIGN UP"> <font> <Font name="System Bold" size="14.0" /> diff --git a/src/main/resources/NTNU/IDATT1002/style.css b/src/main/resources/NTNU/IDATT1002/style.css index aa2d21cf77f47fb8e2957c3d735ca0b98db02355..c1f7cfb36a0d846b79a89ed7ce0bc98245219018 100644 --- a/src/main/resources/NTNU/IDATT1002/style.css +++ b/src/main/resources/NTNU/IDATT1002/style.css @@ -8,16 +8,37 @@ -fx-background-color: #10101f; } +.tbarbg{ + -fx-background-color: #10101f; +} + .button{ -fx-transition-duration: 0.4s; - -fx-background-color: blank; + -fx-background-color: none; -fx-border-width: 2px; - -fx-border-color: white; - -fx-color: white; + -fx-border-color: #46b4fe; + -fx-text-fill: white; } .button:hover{ -fx-background-color: rgba(193, 198, 196, 0.5); -fx-color: white; +} + +.tbarmenu{ + +} + +.exploreGrid{ + -fx-background-color: rgba(255, 255, 255, 0.5); +} + +.exploreGridPane{ + -fx-fit-to-width: true; +} + +.scroll-pane{ + -fx-background-color: none; + -fx-border-width: 0; } \ No newline at end of file