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

Sucessfully created page with tabpane, styling the tabpane is turning out to be a challenge however

parent 627d182a
No related branches found
No related tags found
2 merge requests!165Weekly merge to Master,!142New search results
package NTNU.IDATT1002.controllers;
public class SearchResults {
}
<?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?>
<?import javafx.scene.text.Text?>
<VBox prefHeight="1080.0" prefWidth="1920.0" style="-fx-background-color: #555555;" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.SearchResults">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" styleClass="tbarbg" stylesheets="@style.css">
<children>
<HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0">
<children>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="250.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>
<HBox.margin>
<Insets />
</HBox.margin>
</ImageView>
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</HBox>
<TextField fx:id="tbar_search" focusTraversable="false" minWidth="200.0" prefHeight="35.0" prefWidth="400.0" promptText="Search: Tags, Albums, Metadata, etc...">
<HBox.margin>
<Insets />
</HBox.margin>
</TextField>
<Button fx:id="tbar_searchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
<Button fx:id="tbar_explore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
<Button fx:id="tbar_albums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
<Button fx:id="tbar_map" minWidth="50" mnemonicParsing="false" onAction="#switchToMap" text="MAP" textFill="white" />
<HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="250.0">
<children>
<Button fx:id="tbar_upload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
</children>
</HBox>
</children>
</HBox>
</children>
</HBox>
<TabPane fx:id="tabPane" prefHeight="981.0" prefWidth="1920.0" stylesheets="@style.css" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<tabs>
<Tab text="IMAGES">
<content>
<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">
<children>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Found">
<font>
<Font size="36.0" />
</font>
</Text>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="X">
<font>
<Font name="System Bold Italic" size="36.0" />
</font>
</Text>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="results for your search" wrappingWidth="350.982421875">
<font>
<Font size="36.0" />
</font>
</Text>
<Text fx:id="search_result" 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>
</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>
</ScrollPane>
</children>
</HBox>
</content>
</Tab>
<Tab text="ALBUMS">
<content>
<HBox alignment="CENTER" prefHeight="990.0" prefWidth="1920.0" VBox.vgrow="ALWAYS">
<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">
<children>
<HBox alignment="CENTER" prefHeight="80.0" prefWidth="1905.0" spacing="10.0">
<children>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Found">
<font>
<Font size="36.0" />
</font>
</Text>
<Text fx:id="albumAmount" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="X">
<font>
<Font name="System Bold Italic" size="36.0" />
</font>
</Text>
<Text fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="albums, sorted by:">
<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>
</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">
<children>
<Text fx:id="albumsPlaceholder" fill="WHITE" strokeType="OUTSIDE" strokeWidth="0.0" text="Loading albums..." textAlignment="CENTER">
<font>
<Font size="36.0" />
</font>
</Text>
</children>
</VBox>
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
<padding>
<Insets left="80.0" right="80.0" top="20.0" />
</padding>
</VBox>
</content>
</ScrollPane>
</children>
</HBox>
</content>
</Tab>
</tabs>
<VBox.margin>
<Insets />
</VBox.margin>
<opaqueInsets>
<Insets />
</opaqueInsets>
</TabPane>
</children>
</VBox>
......@@ -98,4 +98,33 @@
.exploreGridPane{
-fx-fit-to-width: true;
}
/*EXPLORE PAGE END*/
\ No newline at end of file
/*EXPLORE PAGE END*/
/*TAB PANE*/
.tab-pane{
-fx-tab-min-height: 30;
}
.tab-header-background{
-fx-background-color: #10101f;
}
.tab-header-area{
-fx-tab-min-height: 50px;
}
.tab{
-fx-border-radius: 7px;
-fx-background-color: #46b4fe;
}
/*TAB PANE END*/
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