Skip to content
Snippets Groups Projects
Commit 28774f3e authored by Nicolay Schiøll-Johansen's avatar Nicolay Schiøll-Johansen
Browse files

Created page to change titles, tags, etc for singular uploaded photos

parent 6ac802aa
No related branches found
No related tags found
2 merge requests!30Weekly merge to master,!26Uploaded photo page
Pipeline #75578 passed
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 java.io.IOException;
public class UploadedPhotoController {
public TextField tbar_search;
public ImageView tbar_logo;
public Button tbar_explore;
public Button tbar_map;
public Button tbar_upload;
public TextField title_field;
public TextField tag_field;
public TextArea desc_field;
public Button accept_button;
public ImageView uploaded_image;
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");
}
}
src/main/resources/Images/placeholder-1920x1080.png

19.1 KiB

<?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.HBox?>
<?import javafx.scene.layout.Pane?>
<?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.UploadedPhotoController">
<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>
<HBox alignment="CENTER" prefHeight="982.0" prefWidth="1920.0">
<children>
<Pane prefHeight="981.0" prefWidth="851.0" style="-fx-background-color: #777777;">
<children>
<ImageView fx:id="uploaded_image" fitHeight="455.0" fitWidth="952.0" layoutX="19.0" layoutY="263.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../Images/placeholder-1920x1080.png" /> <!-- This is the URL to the image in question, needs to change in accordance with the current uploaded picture-->
</image>
</ImageView>
</children>
</Pane>
<Pane prefHeight="981.0" prefWidth="1073.0" style="-fx-background-color: #999999;">
<children>
<Text layoutX="127.0" layoutY="112.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TITLE:">
<font>
<Font name="System Bold" size="36.0" />
</font>
</Text>
<Text layoutX="127.0" layoutY="186.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TAGS:">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Text>
<Text layoutX="127.0" layoutY="250.0" strokeType="OUTSIDE" strokeWidth="0.0" text="DESCRIPTION:">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Text>
<Text layoutX="125.0" layoutY="456.0" strokeType="OUTSIDE" strokeWidth="0.0" text="METADATA:">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Text>
<TextField fx:id="title_field" layoutX="256.0" layoutY="83.0" prefHeight="32.0" prefWidth="689.0" promptText="Insert title here" />
<TextField fx:id="tag_field" layoutX="217.0" layoutY="161.0" prefHeight="32.0" prefWidth="728.0" promptText="#Blue, #water, #summer, etc..." />
<TextArea fx:id="desc_field" layoutX="126.0" layoutY="265.0" prefHeight="147.0" prefWidth="822.0" promptText="Insert description here" />
<Pane layoutX="125.0" layoutY="470.0" prefHeight="364.0" prefWidth="822.0" style="-fx-background-color: #ffffff;">
<children>
<Text layoutX="218.0" layoutY="196.0" strokeType="OUTSIDE" strokeWidth="0.0" text="NOT YET IMPLEMENTED">
<font>
<Font size="36.0" />
</font>
</Text>
</children>
</Pane>
<Button fx:id="accept_button" layoutX="493.0" layoutY="870.0" mnemonicParsing="false" onAction="#uploadPhoto" text="ACCEPT">
<font>
<Font size="18.0" />
</font>
</Button>
</children>
</Pane>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment