diff --git a/src/main/java/NTNU/IDATT1002/controllers/CreateAlbumController.java b/src/main/java/NTNU/IDATT1002/controllers/CreateAlbumController.java new file mode 100644 index 0000000000000000000000000000000000000000..b00260b34d5eb34ee163a961ce281325c69a8c5d --- /dev/null +++ b/src/main/java/NTNU/IDATT1002/controllers/CreateAlbumController.java @@ -0,0 +1,48 @@ +package NTNU.IDATT1002.controllers; + +import NTNU.IDATT1002.App; +import javafx.event.ActionEvent; +import javafx.scene.control.Button; +import javafx.scene.control.TextArea; +import javafx.scene.control.TextField; +import javafx.scene.image.ImageView; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.Pane; + +import java.io.IOException; + +public class CreateAlbumController { + public TextField tbar_search; + public ImageView tbar_logo; + public Button tbar_explore; + public Button tbar_map; + public Button tbar_upload; + public TextField album_title_field; + public TextField album_tag_field; + public TextArea album_desc_field; + public Pane metadata_pane; + public GridPane image_grid; + public Button add_images_button; + public Button create_album_button; + + public void switchToSearch(ActionEvent actionEvent) { + + } + + public void switchToUpload(ActionEvent actionEvent) { + + } + + public void switchToMap(ActionEvent actionEvent) { + + } + + public void switchToExplore(ActionEvent actionEvent) { + + } + + public void uploadPhoto(ActionEvent actionEvent) throws IOException { + //write method to accept and upload the photo with chosen settings, titles etc and then setRoot to logged-in page + App.setRoot("logged-in"); + } +} diff --git a/src/main/resources/NTNU/IDATT1002/create_album_page.fxml b/src/main/resources/NTNU/IDATT1002/create_album_page.fxml new file mode 100644 index 0000000000000000000000000000000000000000..e4dab8030834286808fb3efa7fdf41bab3860a81 --- /dev/null +++ b/src/main/resources/NTNU/IDATT1002/create_album_page.fxml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.TextArea?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.image.Image?> +<?import javafx.scene.image.ImageView?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.ColumnConstraints?> +<?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> +<?import javafx.scene.layout.Pane?> +<?import javafx.scene.layout.RowConstraints?> +<?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> +<?import javafx.scene.text.Text?> + +<AnchorPane 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.CreateAlbumController"> + <children> + <VBox prefHeight="1080.0" prefWidth="1920.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <children> + <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="200.0" spacing="20.0" style="-fx-background-color: #0c0c0c;"> + <children> + <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../../Images/PlaceholderLogo.png" /> + </image> + </ImageView> + <Pane prefHeight="100.0" prefWidth="343.0" /> + <TextField fx:id="tbar_search" onAction="#switchToSearch" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." /> + <Button fx:id="tbar_explore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" /> + <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> + <AnchorPane prefHeight="991.0" prefWidth="1920.0" style="-fx-background-color: #999999;"> + <children> + <Text layoutX="275.0" layoutY="143.0" strokeType="OUTSIDE" strokeWidth="0.0" text="ALBUMTITLE:"> + <font> + <Font name="System Bold" size="36.0" /> + </font> + </Text> + <TextField fx:id="album_title_field" layoutX="275.0" layoutY="152.0" prefHeight="40.0" prefWidth="488.0" promptText="Insert title here" /> + <Text layoutX="275.0" layoutY="218.0" strokeType="OUTSIDE" strokeWidth="0.0" text="ALBUMTAGS:"> + <font> + <Font name="System Bold" size="24.0" /> + </font> + </Text> + <TextField fx:id="album_tag_field" layoutX="275.0" layoutY="224.0" prefHeight="32.0" prefWidth="564.0" promptText="#Blue, #water, #summer, etc..." /> + <Text layoutX="275.0" layoutY="282.0" strokeType="OUTSIDE" strokeWidth="0.0" text="ALBUMDESCRIPTION:"> + <font> + <Font name="System Bold" size="24.0" /> + </font> + </Text> + <TextArea fx:id="album_desc_field" layoutX="275.0" layoutY="288.0" prefHeight="140.0" prefWidth="739.0" promptText="Insert description here" /> + <Text layoutX="275.0" layoutY="454.0" strokeType="OUTSIDE" strokeWidth="0.0" text="INCLUDED METADATA:"> + <font> + <Font name="System Bold" size="24.0" /> + </font> + </Text> + <Pane fx:id="metadata_pane" layoutX="275.0" layoutY="460.0" prefHeight="373.0" prefWidth="739.0" style="-fx-background-color: #ffff;" /> + <GridPane fx:id="image_grid" layoutX="1096.0" layoutY="104.0" prefHeight="729.0" prefWidth="553.0" style="-fx-background-color: #ffffff;"> + <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 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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + </rowConstraints> + </GridPane> + <Button fx:id="add_images_button" layoutX="490.0" layoutY="867.0" mnemonicParsing="false" text="ADD IMAGES"> + <font> + <Font name="System Bold" size="18.0" /> + </font> + </Button> + <Button fx:id="create_album_button" layoutX="641.0" layoutY="867.0" mnemonicParsing="false" text="CREATE ALBUM"> + <font> + <Font name="System Bold" size="18.0" /> + </font> + </Button> + </children> + </AnchorPane> + </children> + </VBox> + </children> +</AnchorPane>