diff --git a/src/main/java/NTNU/IDATT1002/controllers/DataExchange.java b/src/main/java/NTNU/IDATT1002/controllers/DataExchange.java index db5f1aae3fe5c61389f173130535d6b5897dd0b7..03cab6ae4c587df37ef0e8f10f6b36db6db8ed55 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/DataExchange.java +++ b/src/main/java/NTNU/IDATT1002/controllers/DataExchange.java @@ -5,7 +5,7 @@ import java.util.List; /** * Class for storing temporary variables between controllers, - * when tha stage changes + * when the scene changes * @version 1.0 22.03.2020 */ public class DataExchange { diff --git a/src/main/java/NTNU/IDATT1002/controllers/Explore.java b/src/main/java/NTNU/IDATT1002/controllers/Explore.java index 96e160cd221fd7ba6a8c9bca0759f37715385f86..be2e8c09c24fde9a5765d977826941270f1edba5 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Explore.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Explore.java @@ -2,21 +2,32 @@ package NTNU.IDATT1002.controllers; import NTNU.IDATT1002.App; import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.fxml.Initializable; +import javafx.geometry.Pos; 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.input.MouseEvent; -import javafx.scene.layout.Pane; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.VBox; +import javafx.scene.text.Font; +import javafx.scene.text.Text; import java.io.IOException; +import java.net.URL; +import java.util.Arrays; +import java.util.List; +import java.util.ResourceBundle; /** * Controls the buttons and changeable elements on explore.fxml, * a page where you explore images * @version 1.0 22.03.2020 */ -public class Explore { +public class Explore implements Initializable { public ImageView tbar_logo; public TextField tbar_search; @@ -24,29 +35,70 @@ public class Explore { public Button tbar_explore; public Button tbar_map; public Button tbar_upload; + public Button tbar_albums; public ScrollPane scrollPane; + public GridPane gridPane; public Button footer_previousBtn; public Button footer_nextBtn; - public Button tbar_albums; - public Pane pane1_1; - public Pane pane1_2; - public Pane pane1_3; - public Pane pane2_1; - public Pane pane2_2; - public Pane pane2_3; - public Pane pane3_1; - public Pane pane3_2; - public Pane pane3_3; - public Pane pane4_1; - public Pane pane4_2; - public Pane pane4_3; - public Pane pane5_1; - public Pane pane5_2; - public Pane pane5_3; /** - * Method that changes stage to Main page + * Method that runs when explore.fxml is set as scene + * Generates content based on a list of images + * @param url + * @param resourceBundle + */ + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + List<String> urls = Arrays.asList("@../../Images/placeholder-1920x1080.png", "@../../Images/party.jpg", "@../../Images/placeholderLogo.png", "@../../Images/party.jpg","@../../Images/placeholder-1920x1080.png", "@../../Images/placeholderLogo.png", "@../../Images/placeholder-1920x1080.png", "@../../Images/placeholderLogo.png", "@../../Images/party.jpg", "@../../Images/placeholderLogo.png", "@../../Images/party.jpg","@../../Images/placeholder-1920x1080.png", "@../../Images/placeholderLogo.png", "@../../Images/placeholder-1920x1080.png", "@../../Images/party.jpg"); + //Limited elements to 15 since grid pane since is 3x15 + //Can implement automatic row adding when this limit exceeded later + for(int i = 0; i < urls.size() && i < 15; i++) { + //Row and column in gripdane + int column = i%3; + int row = (i-column)/3; + + //Make vbox container for content + VBox v = new VBox(); + v.setPrefHeight(400); + v.setPrefWidth(400); + v.setAlignment(Pos.CENTER); + v.setStyle("-fx-background-color: #999999;"); + + //Image container + ImageView iV = new ImageView(); + iV.setImage(new Image(urls.get(i))); + iV.setFitHeight(250); + iV.setFitWidth(400); + iV.pickOnBoundsProperty().setValue(true); + iV.setPreserveRatio(true); + //Link to view image page + iV.setOnMouseClicked(new EventHandler<MouseEvent>() { + @Override public void handle(MouseEvent e) { + try{ + switchToPicture(e); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + }); + + //Text describing the picture's title and tag + Text title = new Text("TITLE:"); + title.setFont(Font.font("System Bold", 24)); + Text tag = new Text("#TAGS"); + tag.setFont(Font.font("System Bold", 18)); + + //Add elements to vbox + v.getChildren().addAll(iV, title, tag); + + //Add vbox to gridpane + gridPane.add(v, column, row); + } + } + + /** + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -55,7 +107,7 @@ public class Explore { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -68,7 +120,7 @@ public class Explore { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -77,7 +129,7 @@ public class Explore { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -86,7 +138,7 @@ public class Explore { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -95,7 +147,7 @@ public class Explore { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ @@ -104,12 +156,15 @@ public class Explore { } /** - * Method that changes stage to View Picture page for the image that was clicked + * Method that changes scene to View Picture page for the image that was clicked * @param mouseEvent * @throws IOException */ public void switchToPicture(MouseEvent mouseEvent) throws IOException { - App.setRoot("view_picture"); + if(mouseEvent.getSource() instanceof ImageView){ + App.ex.setChosenImg(((ImageView) mouseEvent.getSource()).getImage().getUrl()); + App.setRoot("view_picture"); + } } /** diff --git a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java index eb306e953628ba1b4e67be023d444b98a3b30d15..6c1c17424bc05f164b88d6bb4adbb80c21744554 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java +++ b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java @@ -322,7 +322,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -331,7 +331,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -344,7 +344,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -353,7 +353,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -362,7 +362,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -371,7 +371,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ @@ -380,7 +380,7 @@ public class ExploreAlbums implements Initializable { } /** - * Method that changes stage to Create Album page + * Method that changes scene to Create Album page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/Login.java b/src/main/java/NTNU/IDATT1002/controllers/Login.java index d3d78509e9843d3a38326178025061d595f291a9..2d3104855ceb322fe5f8c4a4f693cdc0e0f5f183 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Login.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Login.java @@ -17,7 +17,7 @@ public class Login { public Button login; /** - * Method that changes stage to Sign Up page + * Method that changes scene to Sign Up page * @param actionEvent * @throws IOException */ @@ -26,7 +26,7 @@ public class Login { } /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param actionEvent * @throws IOException */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/Main.java b/src/main/java/NTNU/IDATT1002/controllers/Main.java index e90d42a34ce04a950b4eb5fbc1550aeb75308b87..958e34b16c4908132e296de6856b11be4d094a42 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Main.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Main.java @@ -27,7 +27,7 @@ public class Main { public Button tbar_albums; /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -36,7 +36,7 @@ public class Main { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -49,7 +49,7 @@ public class Main { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -58,7 +58,7 @@ public class Main { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -67,7 +67,7 @@ public class Main { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -76,7 +76,7 @@ public class Main { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/Map.java b/src/main/java/NTNU/IDATT1002/controllers/Map.java index 897b549f2e1ca2978aca3399694d0c2d041951b1..06695a4d172b7bff6a9586eefd0b2fdacfb595d2 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Map.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Map.java @@ -27,7 +27,7 @@ public class Map { public Button tbar_albums; /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -36,7 +36,7 @@ public class Map { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -49,7 +49,7 @@ public class Map { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -58,7 +58,7 @@ public class Map { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -67,7 +67,7 @@ public class Map { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -76,7 +76,7 @@ public class Map { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/Search.java b/src/main/java/NTNU/IDATT1002/controllers/Search.java index 8e75805fea75174e558c29720d1e87c1a25368b4..11e17b1f2cbca535e32ddae2683b06b420a266c2 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Search.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Search.java @@ -117,7 +117,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -126,7 +126,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -139,7 +139,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -148,7 +148,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -157,7 +157,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -166,7 +166,7 @@ public class Search implements Initializable { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/SignUp.java b/src/main/java/NTNU/IDATT1002/controllers/SignUp.java index 2b5c2a7924dfff457b7ef5e76b451c0435ba636e..d7acd32db411f7b16d0a35dd59c8995e5b164c5b 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/SignUp.java +++ b/src/main/java/NTNU/IDATT1002/controllers/SignUp.java @@ -30,7 +30,7 @@ public class SignUp { public Button signup_btn; /** - * Method that changes stage to Login + * Method that changes scene to Login * @param actionEvent * @throws IOException */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/Upload.java b/src/main/java/NTNU/IDATT1002/controllers/Upload.java index ebebfce917c95e75789d533e88e1491fffe04f14..10156152dfada3301517c84f99401283da5445e6 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/Upload.java +++ b/src/main/java/NTNU/IDATT1002/controllers/Upload.java @@ -41,7 +41,7 @@ public class Upload { public Button tbar_albums; /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -50,7 +50,7 @@ public class Upload { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -63,7 +63,7 @@ public class Upload { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -72,7 +72,7 @@ public class Upload { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -81,7 +81,7 @@ public class Upload { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -90,7 +90,7 @@ public class Upload { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ @@ -99,7 +99,7 @@ public class Upload { } /** - * Method that changs stage to Uploaded Single page + * Method that changs scene to Uploaded Single page * If the user has chosen 1 image this method is called * @throws IOException */ @@ -108,7 +108,7 @@ public class Upload { } /** - * Method that changs stage to Uploaded Multiple page + * Method that changs scene to Uploaded Multiple page * If the user has chosen multiple images this method is called * @throws IOException */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/UploadedMultiple.java b/src/main/java/NTNU/IDATT1002/controllers/UploadedMultiple.java index 2c4e14d902a2c6924475476f5fe1ce4c8ea11a24..9fdbacf293c5f94612d0e771ebfe184161fa41f1 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/UploadedMultiple.java +++ b/src/main/java/NTNU/IDATT1002/controllers/UploadedMultiple.java @@ -49,7 +49,7 @@ public class UploadedMultiple { public Button tbar_albums; /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -58,7 +58,7 @@ public class UploadedMultiple { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -71,7 +71,7 @@ public class UploadedMultiple { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -80,7 +80,7 @@ public class UploadedMultiple { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -89,7 +89,7 @@ public class UploadedMultiple { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -98,7 +98,7 @@ public class UploadedMultiple { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent * @throws IOException */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/UploadedSingle.java b/src/main/java/NTNU/IDATT1002/controllers/UploadedSingle.java index 2426930f95b796fb5511396da4e54e286241ed3d..68a23d3fa4a847b98ece5ac5dafbc887c780fc43 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/UploadedSingle.java +++ b/src/main/java/NTNU/IDATT1002/controllers/UploadedSingle.java @@ -49,7 +49,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -58,7 +58,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -71,7 +71,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -80,7 +80,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -89,7 +89,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -98,7 +98,7 @@ public class UploadedSingle implements Initializable { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent * @throws IOException */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java b/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java index 7125cbc8167c02a897157415c56752066700afa8..e717a4d3e64b4d806a886dc0cce183bcd3d86af9 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java +++ b/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java @@ -42,7 +42,7 @@ public class ViewAlbum { public Button tbar_albums; /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -51,7 +51,7 @@ public class ViewAlbum { } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -64,7 +64,7 @@ public class ViewAlbum { } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -73,7 +73,7 @@ public class ViewAlbum { } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -82,7 +82,7 @@ public class ViewAlbum { } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -91,7 +91,7 @@ public class ViewAlbum { } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/java/NTNU/IDATT1002/controllers/ViewPicture.java b/src/main/java/NTNU/IDATT1002/controllers/ViewPicture.java index 25d0871908a295c4272c295498f220f504c4a4b2..deffd81feeef72a0baaf0c45bb143aa59912f4e7 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/ViewPicture.java +++ b/src/main/java/NTNU/IDATT1002/controllers/ViewPicture.java @@ -17,7 +17,7 @@ import java.util.ResourceBundle; /** - * Controls the buttons and changeable elements on view_picture.fxml, + * Controls the buttons and changeable elements on view_.fxml, * a page where get a more detailed view of a picture * @version 1.0 22.03.2020 */ @@ -41,7 +41,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Main page + * Method that changes scene to Main page * @param mouseEvent * @throws IOException */ @@ -50,7 +50,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Search page. It reads the value of the search + * Method that changes scene to Search page. It reads the value of the search * field and if not empty it is passed to dataexchange * @param actionEvent * @throws IOException @@ -63,7 +63,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Explore page + * Method that changes scene to Explore page * @param actionEvent * @throws IOException */ @@ -72,7 +72,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Albums page + * Method that changes scene to Albums page * @param actionEvent * @throws IOException */ @@ -81,7 +81,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Map page + * Method that changes scene to Map page * @param actionEvent * @throws IOException */ @@ -90,7 +90,7 @@ public class ViewPicture implements Initializable{ } /** - * Method that changes stage to Upload page + * Method that changes scene to Upload page * @param actionEvent the mouse has done something * @throws IOException this page does not exist */ diff --git a/src/main/resources/NTNU/IDATT1002/explore.fxml b/src/main/resources/NTNU/IDATT1002/explore.fxml index a301bb02f581d454e4226e4cf2e8d15260f8064e..249cad066bad2caf0964c565d19e3923fec47c56 100644 --- a/src/main/resources/NTNU/IDATT1002/explore.fxml +++ b/src/main/resources/NTNU/IDATT1002/explore.fxml @@ -12,8 +12,6 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.RowConstraints?> -<?import javafx.scene.text.Font?> -<?import javafx.scene.text.Text?> <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.Explore"> <children> @@ -49,7 +47,7 @@ <Pane prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #6d6d6d;" BorderPane.alignment="CENTER" /> </right> <center> - <GridPane alignment="CENTER" BorderPane.alignment="CENTER"> + <GridPane fx:id="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" /> @@ -62,234 +60,6 @@ <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> </rowConstraints> - <children> - <Pane fx:id="pane1_1" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane1_2" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane1_3" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane2_1" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane2_2" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane2_3" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="1"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane3_1" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane3_2" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane3_3" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="2"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane4_1" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane4_2" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane4_3" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="3"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane5_1" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="4"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane5_2" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="4"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - <Pane fx:id="pane5_3" onMouseClicked="#switchToPicture" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="2" GridPane.rowIndex="4"> - <children> - <ImageView fitHeight="237.0" fitWidth="423.0" layoutX="42.0"> - <image> - <Image url="@../../Images/placeholder-1920x1080.png" /> - </image> - </ImageView> - <Text layoutX="42.0" layoutY="256.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Picturetitle" wrappingWidth="252.13671875"> - <font> - <Font name="System Bold Italic" size="18.0" /> - </font> - </Text> - <Text layoutX="42.0" layoutY="273.0" strokeType="OUTSIDE" strokeWidth="0.0" text="#Tags" wrappingWidth="252.13671875" /> - </children> - </Pane> - - </children> </GridPane> </center> <bottom>