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

Added map page layout and linked up some controllers

parent 65907ba6
No related branches found
No related tags found
3 merge requests!104Weekly merge to Master,!37Map page,!33Added map page
Pipeline #76033 passed
......@@ -25,8 +25,8 @@ public class LoggedInController {
App.setRoot("explore_page");
}
public void switchToMap(ActionEvent actionEvent) {
public void switchToMap(ActionEvent actionEvent) throws IOException {
App.setRoot("map_page");
}
public void switchToUpload(ActionEvent actionEvent) {
......
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 MapPageController {
public TextField tbar_search;
public ImageView tbar_logo;
public Button tbar_explore;
public Button tbar_map;
public Button tbar_upload;
public Button map_search_button;
public TextField map_search_field;
public void switchToSearch(ActionEvent actionEvent) throws IOException {
App.setRoot("search_page");
}
public void switchToUpload(ActionEvent actionEvent) throws IOException {
App.setRoot("upload_page");
}
public void switchToMap(ActionEvent actionEvent) throws IOException {
App.setRoot("map_page");
}
public void switchToExplore(ActionEvent actionEvent) throws IOException {
App.setRoot("explore_page");
}
public void MapSearch(ActionEvent actionEvent) {
}
}
......@@ -31,8 +31,8 @@ public class SearchPageController {
}
public void switchToMap(ActionEvent actionEvent) {
public void switchToMap(ActionEvent actionEvent) throws IOException {
App.setRoot("map_page");
}
public void switchToUpload(ActionEvent actionEvent) {
......
......@@ -29,8 +29,8 @@ public class UploadedAlbumController {
}
public void switchToMap(ActionEvent actionEvent) {
public void switchToMap(ActionEvent actionEvent) throws IOException {
App.setRoot("map_page");
}
public void switchToExplore(ActionEvent actionEvent) {
......
......@@ -21,20 +21,20 @@ public class UploadedPhotoController {
public Button accept_button;
public ImageView uploaded_image;
public void switchToSearch(ActionEvent actionEvent) {
public void switchToSearch(ActionEvent actionEvent) throws IOException {
App.setRoot("search_page");
}
public void switchToUpload(ActionEvent actionEvent) {
public void switchToUpload(ActionEvent actionEvent) throws IOException {
App.setRoot("upload_page");
}
public void switchToMap(ActionEvent actionEvent) {
public void switchToMap(ActionEvent actionEvent) throws IOException {
App.setRoot("map_page");
}
public void switchToExplore(ActionEvent actionEvent) {
public void switchToExplore(ActionEvent actionEvent) throws IOException {
App.setRoot("explore_page");
}
public void uploadPhoto(ActionEvent actionEvent) throws IOException {
......
<?xml version="1.0" encoding="UTF-8"?>
<?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?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.web.WebView?>
<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.MapPageController">
<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 minHeight="0.0" minWidth="0.0" prefHeight="183.0" prefWidth="1918.0" style="-fx-background-color: #888888;">
<children>
<TextField fx:id="map_search_field" layoutX="626.0" layoutY="70.0" prefHeight="44.0" prefWidth="664.0" promptText="Search for your location">
<font>
<Font size="18.0" />
</font>
</TextField>
<Text layoutX="508.0" layoutY="100.0" strokeType="OUTSIDE" strokeWidth="0.0" text="SEARCH:">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Text>
<Button fx:id="map_search_button" layoutX="1314.0" layoutY="70.0" mnemonicParsing="false" onAction="#MapSearch" prefHeight="44.0" prefWidth="99.0" text="SEARCH">
<font>
<Font size="18.0" />
</font>
</Button>
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="797.0" prefWidth="1920.0" style="-fx-background-color: #888888;">
<children>
<WebView prefHeight="717.0" prefWidth="1920.0" />
<Text layoutX="597.0" layoutY="402.0" strokeType="OUTSIDE" strokeWidth="0.0" text="MAP WILL BE INTEGRATED LATER.">
<font>
<Font size="48.0" />
</font>
</Text>
</children>
</AnchorPane>
</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