Skip to content
Snippets Groups Projects
Commit de26b4af authored by Eirik Steira's avatar Eirik Steira
Browse files

Merge branch 'Exlpore_page' into 'dev'

Explore page + controller linkup

See merge request !18
parents 30780a8c 0d9c3c15
No related branches found
No related tags found
2 merge requests!30Weekly merge to master,!18Explore page + controller linkup
Pipeline #74611 passed
package NTNU.IDATT1002.controllers;
import NTNU.IDATT1002.App;
import javafx.event.ActionEvent;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import java.io.IOException;
public class ExploreController {
public ImageView tbar_logo;
public TextField tbar_search;
public Button tbar_map;
public Button tbar_upload;
public ScrollPane scrollpane;
public Button footer_previous_page;
public Button footer_next_page;
public void switchToMain(MouseEvent mouseEvent) throws IOException {
App.setRoot("logged-in");
}
public void switchToSearch(ActionEvent actionEvent) throws IOException{
App.setRoot("search_page");
}
public void switchToMap(ActionEvent actionEvent) throws IOException{
App.setRoot("map_page");
}
public void switchToUpload(ActionEvent actionEvent) throws IOException{
App.setRoot("upload_page");
}
public void switchToPrevious(ActionEvent actionEvent) {
}
public void switchToNext(ActionEvent actionEvent) {
}
}
package NTNU.IDATT1002.controllers;
import NTNU.IDATT1002.App;
import javafx.event.ActionEvent;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
import java.io.IOException;
public class LoggedInController {
public TextField tbar_search;
public ImageView tbar_logo;
......@@ -11,4 +15,20 @@ public class LoggedInController {
public Button tbar_map;
public Button tbar_upload;
public Button main_upload;
public void switchToSearch(ActionEvent actionEvent) {
}
public void switchToExplore(ActionEvent actionEvent) throws IOException {
App.setRoot("explore_page");
}
public void switchToMap(ActionEvent actionEvent) {
}
public void switchToUpload(ActionEvent actionEvent) {
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?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?>
<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.ExploreController">
<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">
<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" onAction="#switchToSearch" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." />
<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>
<ScrollPane fx:id="scrollpane" 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">
<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 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>
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="10.0" layoutY="105.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="2">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="3" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="4" />
<ImageView fitHeight="245.0" fitWidth="368.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="1">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="2">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.rowIndex="1">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="1">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.rowIndex="3">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
<ImageView fitHeight="112.0" fitWidth="200.0" GridPane.rowIndex="4">
<image>
<Image url="@../../Images/party.jpg" />
</image>
</ImageView>
</children>
</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_previous_page" mnemonicParsing="false" onAction="#switchToPrevious" text="PREVIOUS" />
<Button fx:id="footer_next_page" layoutX="944.0" layoutY="48.0" mnemonicParsing="false" onAction="#switchToNext" text="NEXT" />
</children>
</HBox>
</children></Pane>
</bottom>
</BorderPane>
</children></AnchorPane>
</content>
</ScrollPane>
</children>
</AnchorPane>
......@@ -22,11 +22,11 @@
</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_explore" mnemonicParsing="false" text="EXPLORE" />
<Button fx:id="tbar_map" mnemonicParsing="false" text="MAP" />
<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" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" />
<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">
......
......@@ -11,7 +11,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Text?>
<VBox alignment="CENTER" prefHeight="400.0" prefWidth="600.0" spacing="20.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="NTNU.IDATT1002.controllers.LoginController">
<VBox alignment="CENTER" prefHeight="1080.0" prefWidth="1920.0" spacing="20.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.LoginController">
<children>
<Label text="Login Page" />
<GridPane hgap="10.0" maxWidth="300.0" prefHeight="90.0" prefWidth="200.0" vgap="10.0">
......
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