diff --git a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java index ca6784e93ddfb1e2916e6ab8dfd3080bd79c1b45..7cca79650461d6b5ca0584d20b99d2cabf58917f 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java +++ b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java @@ -51,6 +51,11 @@ public class ExploreAlbums { public Text album_desc5; public Text album_tags5; public Button tbar_albums; + public Button open_album4; + public Button open_album3; + public Button open_album2; + public Button open_album1; + public Button open_album; public void switchToSearch(ActionEvent actionEvent) throws IOException { App.setRoot("search"); @@ -87,4 +92,14 @@ public class ExploreAlbums { public void switchToAlbums(ActionEvent actionEvent) throws IOException { App.setRoot("explore_albums"); } + + /** + * Method to open specific albums using the "Open Album" button + * @param actionEvent + * @throws IOException + */ + public void switchToViewAlbum(ActionEvent actionEvent) throws IOException { + //TODO: write method to open the specific album chosen + App.setRoot("view_album"); + } } diff --git a/src/main/resources/NTNU/IDATT1002/explore_albums.fxml b/src/main/resources/NTNU/IDATT1002/explore_albums.fxml index 1d3d27d89ec2509b108c7c5fdce8a7fee057d8bd..ddb7cfc6d0f51da3026bd4544a01e0d7e86f8896 100644 --- a/src/main/resources/NTNU/IDATT1002/explore_albums.fxml +++ b/src/main/resources/NTNU/IDATT1002/explore_albums.fxml @@ -18,7 +18,7 @@ <?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> -<AnchorPane maxHeight="2148.0" maxWidth="1920.0" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="NTNU.IDATT1002.controllers.ExploreAlbums"> +<AnchorPane maxHeight="2148.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.ExploreAlbums"> <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"> <children> @@ -142,6 +142,11 @@ <Font name="System Bold" size="24.0" /> </font> </Text> + <Button fx:id="open_album" layoutX="551.0" layoutY="250.0" mnemonicParsing="false" onAction="#switchToViewAlbum" text="Open Album"> + <font> + <Font size="18.0" /> + </font> + </Button> </children> </Pane> <Pane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="1"> @@ -191,6 +196,11 @@ <Font name="System Bold" size="24.0" /> </font> </Text> + <Button fx:id="open_album1" layoutX="551.0" layoutY="250.0" mnemonicParsing="false" onAction="#switchToViewAlbum" text="Open Album"> + <font> + <Font size="18.0" /> + </font> + </Button> </children> </Pane> <Pane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2"> @@ -240,6 +250,11 @@ <Font name="System Bold" size="24.0" /> </font> </Text> + <Button fx:id="open_album2" layoutX="551.0" layoutY="250.0" mnemonicParsing="false" onAction="#switchToViewAlbum" text="Open Album"> + <font> + <Font size="18.0" /> + </font> + </Button> </children> </Pane> <Pane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="3"> @@ -289,6 +304,11 @@ <Font name="System Bold" size="24.0" /> </font> </Text> + <Button fx:id="open_album3" layoutX="551.0" layoutY="250.0" mnemonicParsing="false" onAction="#switchToViewAlbum" text="Open Album"> + <font> + <Font size="18.0" /> + </font> + </Button> </children> </Pane> <Pane prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="4"> @@ -338,6 +358,11 @@ <Font name="System Bold" size="24.0" /> </font> </Text> + <Button fx:id="open_album4" layoutX="551.0" layoutY="250.0" mnemonicParsing="false" onAction="#switchToViewAlbum" text="Open Album"> + <font> + <Font size="18.0" /> + </font> + </Button> </children> </Pane> </children>