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

Created search result page (FXML only) that can tab between album results and...

Created search result page (FXML only) that can tab between album results and image results. Also updated background image for the App to one I created myself to avoid copyright infringement
parent 66327701
No related branches found
No related tags found
2 merge requests!165Weekly merge to Master,!142New search results
Pipeline #80070 passed
package NTNU.IDATT1002.controllers;
public class SearchResults {
}
src/main/resources/Images/AppBG.png

865 KiB

<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
......@@ -63,10 +59,10 @@
<HBox alignment="CENTER" prefHeight="986.0" prefWidth="1920.0" style="-fx-background-color: #555555;" VBox.vgrow="ALWAYS">
<children>
<ScrollPane fx:id="scrollpane" fitToWidth="true" hbarPolicy="NEVER" maxWidth="1.7976931348623157E308" minHeight="960.0" prefWidth="1920.0" style="-fx-background-color: #555555; -fx-fit-to-width: true;" HBox.hgrow="ALWAYS">
<content>
<BorderPane prefHeight="200.0" prefWidth="200.0" styleClass="bodybg" stylesheets="@style.css">
<top>
<HBox alignment="CENTER" maxWidth="Infinity" prefHeight="201.0" prefWidth="1920.0" spacing="10.0" stylesheets="@style.css" BorderPane.alignment="CENTER">
<content>
<VBox alignment="CENTER" styleClass="bodybg" stylesheets="@style.css">
<children>
<HBox alignment="CENTER" maxWidth="Infinity" prefHeight="200.0" prefWidth="1920.0" spacing="10.0" stylesheets="@style.css">
<children>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Found">
<font>
......@@ -83,42 +79,23 @@
<Font size="36.0" />
</font>
</Text>
<Text fx:id="search_result" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="&quot;result&quot;">
<Text fx:id="imageSearchString" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="&quot;result&quot;">
<font>
<Font name="System Italic" size="36.0" />
</font>
</Text>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text=", sorted by:" wrappingWidth="184.341796875">
<font>
<Font size="36.0" />
</font>
</Text>
<ChoiceBox fx:id="sorted_by_choicebox" prefHeight="40.0" prefWidth="166.0" value="Most Popular">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="Most Popular" />
<String fx:value="Newest First" />
<String fx:value="Oldest First" />
</FXCollections>
</items>
</ChoiceBox>
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</HBox>
</top>
<center>
<VBox fx:id="vBox" maxHeight="1.7976931348623157E308" maxWidth="Infinity" minHeight="980.0" prefWidth="1920.0" spacing="10.0" styleClass="transparentbg" stylesheets="@style.css" BorderPane.alignment="CENTER" />
</center>
<left>
<VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER" />
</left>
<right>
<VBox prefHeight="200.0" prefWidth="100.0" stylesheets="@style.css" BorderPane.alignment="CENTER" />
</right>
<bottom>
<VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER" />
</bottom>
</BorderPane>
</content>
<VBox fx:id="vBox" maxHeight="1.7976931348623157E308" maxWidth="Infinity" minHeight="980.0" prefWidth="1920.0" spacing="10.0" styleClass="transparentbg" stylesheets="@style.css" />
</children>
<padding>
<Insets left="80.0" right="80.0" />
</padding>
</VBox>
</content>
</ScrollPane>
</children>
</HBox>
......@@ -130,9 +107,9 @@
<children>
<ScrollPane fx:id="scrollpane" fitToWidth="true" hbarPolicy="NEVER" prefWidth="1920.0" styleClass="scroll-bar" stylesheets="@style.css" HBox.hgrow="ALWAYS">
<content>
<VBox prefHeight="1500.0" styleClass="bodybg" stylesheets="@style.css">
<VBox alignment="CENTER" styleClass="bodybg" stylesheets="@style.css">
<children>
<HBox alignment="CENTER" prefHeight="80.0" prefWidth="1905.0" spacing="10.0">
<HBox alignment="CENTER" prefHeight="200.0" prefWidth="1905.0" spacing="10.0">
<children>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Found">
<font>
......@@ -144,23 +121,19 @@
<Font name="System Bold Italic" size="36.0" />
</font>
</Text>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="albums, sorted by:">
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="albums for your search">
<font>
<Font size="36.0" />
</font>
</Text>
<ChoiceBox fx:id="sortedByChoicebox" prefHeight="40.0" prefWidth="166.0" value="Most Popular">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="Most Popular" />
<String fx:value="Newest First" />
<String fx:value="Oldest First" />
</FXCollections>
</items>
</ChoiceBox>
<Text fx:id="albumSearchString" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="&quot;result&quot;">
<font>
<Font name="System Italic" size="36.0" />
</font>
</Text>
</children>
</HBox>
<VBox fx:id="rootAlbumsContainer" maxHeight="1.7976931348623157E308" maxWidth="Infinity" minHeight="980.0" spacing="10.0" styleClass="exploreGrid" stylesheets="@style.css" VBox.vgrow="ALWAYS">
<VBox fx:id="rootAlbumsContainer" maxHeight="1.7976931348623157E308" maxWidth="Infinity" minHeight="980.0" spacing="10.0" styleClass="transparentbg" stylesheets="@style.css" VBox.vgrow="ALWAYS">
<children>
<Text fx:id="albumsPlaceholder" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Loading albums..." textAlignment="CENTER">
<font>
......@@ -174,7 +147,7 @@
<Insets />
</opaqueInsets>
<padding>
<Insets left="80.0" right="80.0" top="20.0" />
<Insets left="80.0" right="80.0" />
</padding>
</VBox>
</content>
......
/*GENERAL STYLING*/
.bodybg{
-fx-background-image: url("../../Images/vector1.jpg");
-fx-background-image: url("../../Images/AppBG.png");
-fx-background-size: cover;
}
......
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