From c53fb79d2492b433c7dadb6f1675cd024e835c3a Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:20:20 +0200
Subject: [PATCH 01/15] Add base class NavBarController

---
 .../controllers/NavBarController.java         | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 src/main/java/NTNU/IDATT1002/controllers/NavBarController.java

diff --git a/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java b/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java
new file mode 100644
index 00000000..df58db2c
--- /dev/null
+++ b/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java
@@ -0,0 +1,79 @@
+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 javafx.scene.input.MouseEvent;
+
+import java.io.IOException;
+
+public class NavBarController {
+
+    public ImageView tbar_logo;
+    public TextField tbar_search;
+    public Button tbar_searchBtn;
+    public Button tbar_explore;
+    public Button tbar_map;
+    public Button tbar_upload;
+    public Button tbar_albums;
+
+    /**
+     * Method that changes scene to Main page
+     * @param mouseEvent
+     * @throws IOException
+     */
+    public void switchToMain(MouseEvent mouseEvent) throws IOException {
+        App.setRoot("main");
+    }
+
+    /**
+     * 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
+     */
+    public void switchToSearch(ActionEvent actionEvent) throws IOException {
+        if (!tbar_search.getText().isEmpty()){
+            App.ex.setSearchField(tbar_search.getText());
+        }
+        App.setRoot("search");
+    }
+
+    /**
+     * Method that changes scene to Explore page
+     * @param actionEvent
+     * @throws IOException
+     */
+    public void switchToExplore(ActionEvent actionEvent) throws IOException {
+        App.setRoot("explore");
+    }
+
+    /**
+     * Method that changes scene to Albums page
+     * @param actionEvent
+     * @throws IOException
+     */
+    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
+        App.setRoot("explore_albums");
+    }
+
+    /**
+     * Method that changes scene to Map page
+     * @param actionEvent
+     * @throws IOException
+     */
+    public void switchToMap(ActionEvent actionEvent) throws IOException {
+        App.setRoot("map");
+    }
+
+    /**
+     * Method that changes scene to Upload page
+     * @param actionEvent the mouse has done something
+     * @throws IOException this page does not exist
+     */
+    public void switchToUpload(ActionEvent actionEvent) throws IOException {
+        App.setRoot("upload");
+    }
+}
-- 
GitLab


From e40a4262e85c3ce50bf49c467b63b052ab17bc4d Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:20:56 +0200
Subject: [PATCH 02/15] Extended NavBarController in CreateAlbum

---
 .../IDATT1002/controllers/CreateAlbum.java    | 78 +------------------
 1 file changed, 2 insertions(+), 76 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/CreateAlbum.java b/src/main/java/NTNU/IDATT1002/controllers/CreateAlbum.java
index 99c28cf8..4f0b733a 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/CreateAlbum.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/CreateAlbum.java
@@ -19,8 +19,6 @@ import javafx.scene.control.CheckBox;
 import javafx.scene.control.TextArea;
 import javafx.scene.control.TextField;
 import javafx.scene.image.ImageView;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.layout.GridPane;
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.VBox;
@@ -40,21 +38,13 @@ import java.util.stream.Collectors;
  *
  * @version 1.0 22.03.2020
  */
-public class CreateAlbum implements Initializable {
-  public TextField tbar_search;
-  public ImageView tbar_logo;
-  public Button tbar_explore;
-  public Button tbar_map;
-  public Button tbar_upload;
+public class CreateAlbum extends NavBarController implements Initializable {
+
   public TextField album_title_field;
   public TextField album_tag_field;
   public TextArea album_desc_field;
   public Pane metadata_pane;
-  public GridPane image_grid;
-  public Button add_images_button;
   public Button create_album_button;
-  public Button tbar_albums;
-  public Button tbar_searchBtn;
   public VBox fileContainer;
 
   private AlbumService albumService;
@@ -87,70 +77,6 @@ public class CreateAlbum implements Initializable {
     }
   }
 
-  /**
-   * Method that changes stage to Main page
-   *
-   * @param mouseEvent
-   * @throws IOException
-   */
-  public void switchToMain(MouseEvent mouseEvent) throws IOException {
-    App.setRoot("main");
-  }
-
-  /**
-   * Method that changes stage to Search page. It reads the value of the search
-   * field and if not empty it is passed to dataexchange
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToSearch(ActionEvent actionEvent) throws IOException {
-    if (!tbar_search.getText().isEmpty()) {
-      App.ex.setSearchField(tbar_search.getText());
-    }
-    App.setRoot("search");
-  }
-
-  /**
-   * Method that changes stage to Explore page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToExplore(ActionEvent actionEvent) throws IOException {
-    App.setRoot("explore");
-  }
-
-  /**
-   * Method that changes stage to Albums page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-    App.setRoot("explore_albums");
-  }
-
-  /**
-   * Method that changes stage to Map page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToMap(ActionEvent actionEvent) throws IOException {
-    App.setRoot("map");
-  }
-
-  /**
-   * Method that changes stage to Upload page
-   *
-   * @param actionEvent the mouse has done something
-   * @throws IOException this page does not exist
-   */
-  public void switchToUpload(ActionEvent actionEvent) throws IOException {
-    App.setRoot("upload");
-  }
-
   /**
    * Method that creates album based on the user input and checked images
    *
-- 
GitLab


From f246ad021525fa0cd6078b27d838685df81905cb Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:07 +0200
Subject: [PATCH 03/15] Extended NavBarController in Explore

---
 .../NTNU/IDATT1002/controllers/Explore.java   | 71 +------------------
 1 file changed, 2 insertions(+), 69 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Explore.java b/src/main/java/NTNU/IDATT1002/controllers/Explore.java
index 97964726..b52d1183 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Explore.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Explore.java
@@ -9,10 +9,8 @@ import javafx.event.EventHandler;
 import javafx.fxml.Initializable;
 import javafx.geometry.Pos;
 import javafx.scene.Node;
-import javafx.scene.Parent;
 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 javafx.scene.layout.GridPane;
@@ -30,15 +28,8 @@ import java.util.ResourceBundle;
  * a page where you explore images
  * @version 1.0 22.03.2020
  */
-public class Explore implements Initializable {
-
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_albums;
+public class Explore extends NavBarController implements Initializable {
+
     public ScrollPane scrollPane;
     public GridPane gridPane;
     public Button footer_previousBtn;
@@ -114,64 +105,6 @@ public class Explore implements Initializable {
         }
     }
 
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
-
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
-
     /**
      * Method that changes scene to View Picture page for the image that was clicked
      * @param mouseEvent
-- 
GitLab


From 4d35fb8571780192e352acdf281e113cb51fa620 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:19 +0200
Subject: [PATCH 04/15] Extended NavBarController in ExploreAlbums

---
 .../IDATT1002/controllers/ExploreAlbums.java  | 76 +------------------
 1 file changed, 1 insertion(+), 75 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
index f32a2cea..0f97536b 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
@@ -42,19 +42,9 @@ import java.util.concurrent.Executors;
  * a page where you explore albums
  * @version 1.1 04.04.2020
  */
-public class ExploreAlbums implements Initializable {
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_albums;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
+public class ExploreAlbums extends NavBarController implements Initializable {
 
     public ScrollPane scrollpane;
-    //public Button footer_previous_page;
-    //public Button footer_next_page;
-
     public Text albumAmount;
     public ChoiceBox sortedByChoicebox;
     public Button createAlbumButton;
@@ -349,70 +339,6 @@ public class ExploreAlbums implements Initializable {
         return content;
     }
 
-    /**
-     * Change scene to Main page.
-     *
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * Change scene to Search page. Reads the value of the search
-     * field and if not empty it is passed to DataExchange.
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Change scene to Explore page.
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Change scene to Albums page.
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Change scene to Map page.
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
-
-    /**
-     * Change scene to Upload page.
-     *
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
-
     /**
      * Change scene to Create Album page.
      *
-- 
GitLab


From ef7b58013fb7c7de651f92708cc47a40a767437b Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:27 +0200
Subject: [PATCH 05/15] Extended NavBarController in Main

---
 .../java/NTNU/IDATT1002/controllers/Main.java | 74 +------------------
 1 file changed, 1 insertion(+), 73 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Main.java b/src/main/java/NTNU/IDATT1002/controllers/Main.java
index 958e34b1..5dcaf678 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Main.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Main.java
@@ -1,86 +1,14 @@
 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 javafx.scene.input.MouseEvent;
-
-import java.io.IOException;
 
 /**
  * Controls the buttons and changeable elements on main.fxml,
  * a page where you explore albums
  * @version 1.0 22.03.2020
  */
-public class Main {
-
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
+public class Main extends NavBarController {
 
     public Button uploadBtn;
-    public Button tbar_albums;
-
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
 
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
 }
\ No newline at end of file
-- 
GitLab


From c2fce870700a7328b8365f394e57881e0a88382c Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:34 +0200
Subject: [PATCH 06/15] Extended NavBarController in Map

---
 .../java/NTNU/IDATT1002/controllers/Map.java  | 85 +------------------
 1 file changed, 4 insertions(+), 81 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Map.java b/src/main/java/NTNU/IDATT1002/controllers/Map.java
index a0cc06fa..f5057ae4 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Map.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Map.java
@@ -24,15 +24,12 @@ import javafx.fxml.Initializable;
 import javafx.scene.control.Alert;
 import javafx.scene.control.Button;
 import javafx.scene.control.TextField;
-import javafx.scene.image.ImageView;
 import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseEvent;
 import org.controlsfx.control.textfield.TextFields;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.persistence.EntityManager;
-import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
@@ -49,17 +46,11 @@ import java.util.stream.Stream;
  * a page where you can find images by location
  * @version 1.0 22.03.2020
  */
-public class Map implements Initializable, MapComponentInitializedListener {
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
+public class Map extends NavBarController implements Initializable, MapComponentInitializedListener {
 
     public TextField search;
+
     public Button searchBtn;
-    public Button tbar_albums;
 
     @FXML
     private GoogleMapView mapView;
@@ -76,7 +67,9 @@ public class Map implements Initializable, MapComponentInitializedListener {
     private StringProperty address = new SimpleStringProperty();
 
     private ImageService imageService;
+
     private AlbumService albumService;
+
     private ExecutorService executorService = Executors.newCachedThreadPool();
 
     private static Logger logger = LoggerFactory.getLogger(Map.class);
@@ -242,75 +235,5 @@ public class Map implements Initializable, MapComponentInitializedListener {
         Alert alert = new Alert(Alert.AlertType.INFORMATION, message);
         alert.show();
     }
-
-    /**
-     * Change scene to Main page.
-     * 
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("main");
-    }
-
-    /**
-     * Change 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("search");
-    }
-
-    /**
-     * Change scene to Explore page
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("explore");
-    }
-
-    /**
-     * Change scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Change scene to Map page.
-     *
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("map");
-    }
-
-    /**
-     * Change scene to Upload page.
-     *
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("upload");
-    }
-
 }
 
-- 
GitLab


From b4f4ca3b2d336d0950ab13b91321cdf28b67690a Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:40 +0200
Subject: [PATCH 07/15] Extended NavBarController in Search

---
 .../NTNU/IDATT1002/controllers/Search.java    | 69 -------------------
 1 file changed, 69 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Search.java b/src/main/java/NTNU/IDATT1002/controllers/Search.java
index fc54d59d..6159cd8f 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Search.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Search.java
@@ -9,10 +9,7 @@ import javafx.event.EventHandler;
 import javafx.fxml.Initializable;
 import javafx.geometry.Pos;
 import javafx.scene.Node;
-import javafx.scene.control.Button;
-import javafx.scene.control.ChoiceBox;
 import javafx.scene.control.ScrollPane;
-import javafx.scene.control.TextField;
 import javafx.scene.image.ImageView;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.HBox;
@@ -34,17 +31,8 @@ import java.util.ResourceBundle;
  */
 public class Search implements Initializable {
 
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_albums;
-
     public Text search_result;
     public ScrollPane scrollpane;
-    public ChoiceBox sorted_by_choicebox;
     public VBox vBox;
     public Text amount;
 
@@ -154,63 +142,6 @@ public class Search implements Initializable {
         return text;
     }
 
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
-
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
 
     /**
      * Method that updates content to previous "page"
-- 
GitLab


From 0bc4756c35dd878a4f3f73c33dc44b7c363bf8d7 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:49 +0200
Subject: [PATCH 08/15] Extended NavBarController in SearchResults

---
 src/main/java/NTNU/IDATT1002/controllers/SearchResults.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/SearchResults.java b/src/main/java/NTNU/IDATT1002/controllers/SearchResults.java
index 63f64c76..e3f92fa0 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/SearchResults.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/SearchResults.java
@@ -1,6 +1,6 @@
 package NTNU.IDATT1002.controllers;
 
 
-public class SearchResults {
+public class SearchResults extends NavBarController {
 
 }
-- 
GitLab


From 3bdbe106d8715376adb83643ec9a1822a25892a0 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:21:55 +0200
Subject: [PATCH 09/15] Extended NavBarController in Upload

---
 .../NTNU/IDATT1002/controllers/Upload.java    | 70 +------------------
 1 file changed, 1 insertion(+), 69 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Upload.java b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
index 8f51a659..b11f9da3 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Upload.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
@@ -7,12 +7,8 @@
 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 javafx.scene.input.DragEvent;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.input.TransferMode;
 import javafx.scene.layout.Pane;
 import javafx.stage.FileChooser;
@@ -28,76 +24,12 @@ import java.util.stream.Collectors;
  * a page where you select images to upload
  * @version 1.0 22.03.2020
  */
-public class Upload {
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
+public class Upload extends NavBarController {
 
     public Button uploadBtn;
     public Pane drag_drop;
     public Button tbar_albums;
 
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
-
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
-
     /**
      * Method that changs scene to Uploaded Single page
      * If the user has chosen 1 image this method is called
-- 
GitLab


From 7fa46f879c38da5275c29ba6fa6cfeb4231817b9 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:22:06 +0200
Subject: [PATCH 10/15] Extended NavBarController in UploadImages

---
 .../IDATT1002/controllers/UploadImages.java   | 76 -------------------
 1 file changed, 76 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/UploadImages.java b/src/main/java/NTNU/IDATT1002/controllers/UploadImages.java
index 459d2083..8f26e9de 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/UploadImages.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/UploadImages.java
@@ -10,7 +10,6 @@ import NTNU.IDATT1002.service.TagService;
 import NTNU.IDATT1002.utils.MetaDataExtractor;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
 import javafx.fxml.Initializable;
 import javafx.geometry.Insets;
 import javafx.geometry.Pos;
@@ -22,7 +21,6 @@ import javafx.scene.control.TextArea;
 import javafx.scene.control.TextField;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.VBox;
 import javafx.scene.text.Font;
@@ -49,17 +47,7 @@ import java.util.stream.Collectors;
 public class UploadImages implements Initializable {
 
   public VBox uploadContainer;
-
-  public ImageView tbar_logo;
-  public TextField tbar_search;
-  public Button tbar_searchBtn;
-  public Button tbar_explore;
-  public Button tbar_map;
-  public Button tbar_upload;
-
-  public Button tbar_albums;
   public VBox root;
-
   private AlbumService albumService;
   private ImageService imageService;
 
@@ -232,70 +220,6 @@ public class UploadImages implements Initializable {
     textContainer.getChildren().add(checkComboBox);
   }
 
-  /**
-   * Method that changes stage to Main page
-   *
-   * @param mouseEvent
-   * @throws IOException
-   */
-  public void switchToMain(MouseEvent mouseEvent) throws IOException {
-    App.setRoot("main");
-  }
-
-  /**
-   * Method that changes stage to Search page. It reads the value of the search
-   * field and if not empty it is passed to dataexchange
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToSearch(ActionEvent actionEvent) throws IOException {
-    if (!tbar_search.getText().isEmpty()) {
-      App.ex.setSearchField(tbar_search.getText());
-    }
-    App.setRoot("search");
-  }
-
-  /**
-   * Method that changes stage to Explore page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToExplore(ActionEvent actionEvent) throws IOException {
-    App.setRoot("explore");
-  }
-
-  /**
-   * Method that changes stage to Albums page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-    App.setRoot("explore_albums");
-  }
-
-  /**
-   * Method that changes stage to Map page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToMap(ActionEvent actionEvent) throws IOException {
-    App.setRoot("map");
-  }
-
-  /**
-   * Method that changes stage to Upload page
-   *
-   * @param actionEvent
-   * @throws IOException
-   */
-  public void switchToUpload(ActionEvent actionEvent) throws IOException {
-    App.setRoot("upload");
-  }
-
   /**
    * Method for uploading image to database with tags
    * Image itself is not stored but URL is
-- 
GitLab


From 0fffc62e24ffaa60f7ea857e54a15068fcbdf3c9 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:22:14 +0200
Subject: [PATCH 11/15] Extended NavBarController in ViewAlbum

---
 .../NTNU/IDATT1002/controllers/ViewAlbum.java | 81 +------------------
 1 file changed, 2 insertions(+), 79 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java b/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
index b947f21f..75a63ead 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
@@ -16,7 +16,6 @@ import javafx.geometry.Insets;
 import javafx.scene.Node;
 import javafx.scene.Scene;
 import javafx.scene.control.Button;
-import javafx.scene.control.TextField;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
 import javafx.scene.input.MouseEvent;
@@ -27,10 +26,7 @@ import javafx.scene.layout.VBox;
 import javafx.scene.text.Font;
 import javafx.scene.text.FontWeight;
 import javafx.scene.text.Text;
-import javax.persistence.EntityManager;
-
 import javafx.stage.Stage;
-import org.slf4j.LoggerFactory;
 
 import javax.persistence.EntityManager;
 import java.io.File;
@@ -47,13 +43,7 @@ import java.util.stream.Collectors;
  * @version 1.0 22.03.2020
  */
 public class ViewAlbum implements Initializable {
-    public TextField tbar_search;
-    public ImageView tbar_logo;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_searchBtn;
-    public Button tbar_albums;
+
     public Pane metadataPane;
     public Button createAlbumPdf;
     public ImageView mainImageContainer;
@@ -68,8 +58,6 @@ public class ViewAlbum implements Initializable {
     private AlbumService albumService;
     private Album currentAlbum;
 
-    
-
     /**
      * Initialize view with real album data.
      *
@@ -226,70 +214,6 @@ public class ViewAlbum implements Initializable {
         textContainer.getChildren().addAll(descriptionLabel, description);
     }
 
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("map");
-    }
-
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.ex.setChosenAlbumId(null);
-        App.setRoot("upload");
-    }
-
     /**
      * Makes a new stage and display the clicked image in max size
      * @param mouseEvent
@@ -308,7 +232,6 @@ public class ViewAlbum implements Initializable {
             imageView.setImage(((ImageView) clickedObject).getImage());
             pane.setCenter(imageView);
 
-
             Scene scene = new Scene(pane);
             stage.setMaximized(true);
             stage.setScene(scene);
@@ -350,6 +273,6 @@ public class ViewAlbum implements Initializable {
     }
 
     public void viewOnMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
+        App.setRoot("map"); // TODO: 15.04.2020 Set App.ex.chosenAlbumId?
     }
 }
-- 
GitLab


From ff586f45995193826a280b46c530f65f578c609a Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:22:21 +0200
Subject: [PATCH 12/15] Extended NavBarController in ViewImage

---
 .../NTNU/IDATT1002/controllers/ViewImage.java | 75 +------------------
 1 file changed, 1 insertion(+), 74 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/ViewImage.java b/src/main/java/NTNU/IDATT1002/controllers/ViewImage.java
index ba4488f5..de5211c5 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/ViewImage.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/ViewImage.java
@@ -4,23 +4,17 @@ import NTNU.IDATT1002.App;
 import NTNU.IDATT1002.service.ImageService;
 import NTNU.IDATT1002.service.TagService;
 import NTNU.IDATT1002.utils.ImageUtil;
-import NTNU.IDATT1002.utils.MetaDataExtractor;
-import javafx.event.ActionEvent;
 import javafx.fxml.Initializable;
 import javafx.scene.Node;
 import javafx.scene.Scene;
-import javafx.scene.control.Button;
-import javafx.scene.control.TextField;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.Pane;
 import javafx.scene.text.Text;
 import javafx.stage.Stage;
 
 import javax.persistence.EntityManager;
-import java.io.IOException;
 import java.net.URL;
 import java.util.Optional;
 import java.util.ResourceBundle;
@@ -32,25 +26,16 @@ import java.util.ResourceBundle;
  * @version 1.0 22.03.2020
  */
 public class ViewImage implements Initializable{
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_searchBtn;
-    public Button tbar_albums;
 
     public ImageView imageContainer;
     public Text imageTagsField;
     public Text imageTitleField;
     public Text imageMetadataField;
 
-    private ImageService imageService;
-
     @Override
     public void initialize(URL url, ResourceBundle resourceBundle) {
         EntityManager entityManager = App.ex.getEntityManager();
-        imageService = new ImageService(entityManager);
+        ImageService imageService = new ImageService(entityManager);
         Long currentImageId = App.ex.getChosenImg();
         Optional<NTNU.IDATT1002.models.Image> foundImage = imageService.findById(currentImageId);
         imageContainer.setFitHeight(540);
@@ -64,64 +49,6 @@ public class ViewImage implements Initializable{
         });
     }
 
-    /**
-     * Method that changes scene to Main page
-     * @param mouseEvent
-     * @throws IOException
-     */
-    public void switchToMain(MouseEvent mouseEvent) throws IOException {
-        App.setRoot("main");
-    }
-
-    /**
-     * 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
-     */
-    public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
-        }
-        App.setRoot("search");
-    }
-
-    /**
-     * Method that changes scene to Explore page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToExplore(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore");
-    }
-
-    /**
-     * Method that changes scene to Albums page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToAlbums(ActionEvent actionEvent) throws IOException {
-        App.setRoot("explore_albums");
-    }
-
-    /**
-     * Method that changes scene to Map page
-     * @param actionEvent
-     * @throws IOException
-     */
-    public void switchToMap(ActionEvent actionEvent) throws IOException {
-        App.setRoot("map");
-    }
-
-    /**
-     * Method that changes scene to Upload page
-     * @param actionEvent the mouse has done something
-     * @throws IOException this page does not exist
-     */
-    public void switchToUpload(ActionEvent actionEvent) throws IOException {
-        App.setRoot("upload");
-    }
-
     /**
      * Makes a new stage and display the clicked image in max size
      * @param mouseEvent
-- 
GitLab


From b2948d8337b95e8f0d4974b1ca7ccd57732d68fd Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:25:37 +0200
Subject: [PATCH 13/15] Rename tbar__ to navBar__

---
 .../controllers/NavBarController.java          | 18 +++++++++---------
 .../NTNU/IDATT1002/controllers/Upload.java     |  2 +-
 .../resources/NTNU/IDATT1002/create_album.fxml | 14 +++++++-------
 src/main/resources/NTNU/IDATT1002/explore.fxml | 14 +++++++-------
 .../NTNU/IDATT1002/explore_albums.fxml         | 14 +++++++-------
 src/main/resources/NTNU/IDATT1002/main.fxml    | 14 +++++++-------
 src/main/resources/NTNU/IDATT1002/map.fxml     | 14 +++++++-------
 src/main/resources/NTNU/IDATT1002/search.fxml  | 14 +++++++-------
 .../NTNU/IDATT1002/search_results.fxml         | 14 +++++++-------
 src/main/resources/NTNU/IDATT1002/upload.fxml  | 14 +++++++-------
 .../NTNU/IDATT1002/upload_images.fxml          | 14 +++++++-------
 .../resources/NTNU/IDATT1002/view_album.fxml   | 14 +++++++-------
 .../resources/NTNU/IDATT1002/view_image.fxml   | 14 +++++++-------
 13 files changed, 87 insertions(+), 87 deletions(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java b/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java
index df58db2c..e1911aec 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/NavBarController.java
@@ -11,13 +11,13 @@ import java.io.IOException;
 
 public class NavBarController {
 
-    public ImageView tbar_logo;
-    public TextField tbar_search;
-    public Button tbar_searchBtn;
-    public Button tbar_explore;
-    public Button tbar_map;
-    public Button tbar_upload;
-    public Button tbar_albums;
+    public ImageView navBarLogo;
+    public TextField navBarSearch;
+    public Button navBarSearchBtn;
+    public Button navBarExplore;
+    public Button navBarMap;
+    public Button navBarUpload;
+    public Button navBarAlbums;
 
     /**
      * Method that changes scene to Main page
@@ -35,8 +35,8 @@ public class NavBarController {
      * @throws IOException
      */
     public void switchToSearch(ActionEvent actionEvent) throws IOException {
-        if (!tbar_search.getText().isEmpty()){
-            App.ex.setSearchField(tbar_search.getText());
+        if (!navBarSearch.getText().isEmpty()){
+            App.ex.setSearchField(navBarSearch.getText());
         }
         App.setRoot("search");
     }
diff --git a/src/main/java/NTNU/IDATT1002/controllers/Upload.java b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
index b11f9da3..47d122af 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Upload.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
@@ -28,7 +28,7 @@ public class Upload extends NavBarController {
 
     public Button uploadBtn;
     public Pane drag_drop;
-    public Button tbar_albums;
+    public Button navBarAlbums;
 
     /**
      * Method that changs scene to Uploaded Single page
diff --git a/src/main/resources/NTNU/IDATT1002/create_album.fxml b/src/main/resources/NTNU/IDATT1002/create_album.fxml
index 6ab9cf5f..fe032460 100644
--- a/src/main/resources/NTNU/IDATT1002/create_album.fxml
+++ b/src/main/resources/NTNU/IDATT1002/create_album.fxml
@@ -10,19 +10,19 @@
    <children>
       <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0" style="-fx-background-color: #0c0c0c;">
          <children>
-            <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
+            <ImageView fx:id="navBarLogo" 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" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." />
-            <Button fx:id="tbar_searchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" />
-            <Button fx:id="tbar_explore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" />
-            <Button fx:id="tbar_albums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" />
-            <Button fx:id="tbar_map" mnemonicParsing="false" onAction="#switchToMap" text="MAP" />
+            <TextField fx:id="navBarSearch" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." />
+            <Button fx:id="navBarSearchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" />
+            <Button fx:id="navBarExplore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" />
+            <Button fx:id="navBarAlbums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" />
+            <Button fx:id="navBarMap" 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" />
+            <Button fx:id="navBarUpload" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" />
          </children>
       </HBox>
       <HBox prefHeight="981.0" prefWidth="1920.0" VBox.vgrow="ALWAYS">
diff --git a/src/main/resources/NTNU/IDATT1002/explore.fxml b/src/main/resources/NTNU/IDATT1002/explore.fxml
index 68de69b7..4dac2119 100644
--- a/src/main/resources/NTNU/IDATT1002/explore.fxml
+++ b/src/main/resources/NTNU/IDATT1002/explore.fxml
@@ -23,7 +23,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -36,18 +36,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
diff --git a/src/main/resources/NTNU/IDATT1002/explore_albums.fxml b/src/main/resources/NTNU/IDATT1002/explore_albums.fxml
index a3de8ca9..e559384e 100644
--- a/src/main/resources/NTNU/IDATT1002/explore_albums.fxml
+++ b/src/main/resources/NTNU/IDATT1002/explore_albums.fxml
@@ -31,7 +31,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -44,18 +44,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
diff --git a/src/main/resources/NTNU/IDATT1002/main.fxml b/src/main/resources/NTNU/IDATT1002/main.fxml
index 5d256edf..40cf6a24 100644
--- a/src/main/resources/NTNU/IDATT1002/main.fxml
+++ b/src/main/resources/NTNU/IDATT1002/main.fxml
@@ -17,7 +17,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -30,18 +30,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
diff --git a/src/main/resources/NTNU/IDATT1002/map.fxml b/src/main/resources/NTNU/IDATT1002/map.fxml
index 994b816e..9c352273 100644
--- a/src/main/resources/NTNU/IDATT1002/map.fxml
+++ b/src/main/resources/NTNU/IDATT1002/map.fxml
@@ -23,7 +23,7 @@
                             <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">
+                                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                                             <image>
                                                 <Image url="@../../Images/PlaceholderLogo.png" />
                                             </image>
@@ -36,18 +36,18 @@
                                         <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...">
+                                <TextField fx:id="navBarSearch" 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" />
+                                <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                                <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                                <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                                <Button fx:id="navBarMap" 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" />
+                                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                                     </children>
                                 </HBox>
                             </children>
diff --git a/src/main/resources/NTNU/IDATT1002/search.fxml b/src/main/resources/NTNU/IDATT1002/search.fxml
index a6ad0e69..ee2904f1 100644
--- a/src/main/resources/NTNU/IDATT1002/search.fxml
+++ b/src/main/resources/NTNU/IDATT1002/search.fxml
@@ -19,7 +19,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -32,18 +32,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
diff --git a/src/main/resources/NTNU/IDATT1002/search_results.fxml b/src/main/resources/NTNU/IDATT1002/search_results.fxml
index 41d3b66a..7d48be4c 100644
--- a/src/main/resources/NTNU/IDATT1002/search_results.fxml
+++ b/src/main/resources/NTNU/IDATT1002/search_results.fxml
@@ -21,7 +21,7 @@
                     <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">
+                                <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                                     <image>
                                         <Image url="@../../Images/PlaceholderLogo.png" />
                                     </image>
@@ -34,18 +34,18 @@
                                 <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...">
+                        <TextField fx:id="navBarSearch" 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" />
+                        <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                        <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                        <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                        <Button fx:id="navBarMap" 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" />
+                                <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                             </children>
                         </HBox>
                     </children>
diff --git a/src/main/resources/NTNU/IDATT1002/upload.fxml b/src/main/resources/NTNU/IDATT1002/upload.fxml
index f7c73beb..6220872f 100644
--- a/src/main/resources/NTNU/IDATT1002/upload.fxml
+++ b/src/main/resources/NTNU/IDATT1002/upload.fxml
@@ -19,7 +19,7 @@
                    <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">
+                               <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                                    <image>
                                        <Image url="@../../Images/PlaceholderLogo.png" />
                                    </image>
@@ -32,18 +32,18 @@
                                <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...">
+                       <TextField fx:id="navBarSearch" 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" />
+                       <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                       <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                       <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                       <Button fx:id="navBarMap" 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" />
+                               <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                            </children>
                        </HBox>
                    </children>
diff --git a/src/main/resources/NTNU/IDATT1002/upload_images.fxml b/src/main/resources/NTNU/IDATT1002/upload_images.fxml
index 6e8ceafe..a8800323 100644
--- a/src/main/resources/NTNU/IDATT1002/upload_images.fxml
+++ b/src/main/resources/NTNU/IDATT1002/upload_images.fxml
@@ -15,19 +15,19 @@
    <children>
       <HBox alignment="CENTER" minHeight="100.0" prefHeight="100.0" prefWidth="1920.0" spacing="20.0" style="-fx-background-color: #0c0c0c;">
          <children>
-            <ImageView fx:id="tbar_logo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
+            <ImageView fx:id="navBarLogo" 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" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." />
-            <Button fx:id="tbar_searchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" />
-            <Button fx:id="tbar_explore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" />
-            <Button fx:id="tbar_albums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" />
-            <Button fx:id="tbar_map" mnemonicParsing="false" onAction="#switchToMap" text="MAP" />
+            <TextField fx:id="navBarSearch" prefHeight="25.0" prefWidth="358.0" promptText="Search: Tags, Albums, Metadata, etc..." />
+            <Button fx:id="navBarSearchBtn" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" />
+            <Button fx:id="navBarExplore" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" />
+            <Button fx:id="navBarAlbums" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" />
+            <Button fx:id="navBarMap" 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" />
+            <Button fx:id="navBarUpload" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" />
          </children>
       </HBox>
       <HBox alignment="CENTER" prefHeight="982.0" prefWidth="1920.0">
diff --git a/src/main/resources/NTNU/IDATT1002/view_album.fxml b/src/main/resources/NTNU/IDATT1002/view_album.fxml
index dfb00fec..b375cd2e 100644
--- a/src/main/resources/NTNU/IDATT1002/view_album.fxml
+++ b/src/main/resources/NTNU/IDATT1002/view_album.fxml
@@ -20,7 +20,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -33,18 +33,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
diff --git a/src/main/resources/NTNU/IDATT1002/view_image.fxml b/src/main/resources/NTNU/IDATT1002/view_image.fxml
index 9eebb690..0a6d0b4b 100644
--- a/src/main/resources/NTNU/IDATT1002/view_image.fxml
+++ b/src/main/resources/NTNU/IDATT1002/view_image.fxml
@@ -19,7 +19,7 @@
                <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">
+                        <ImageView fx:id="navBarLogo" fitHeight="69.0" fitWidth="153.0" onMouseClicked="#switchToMain" pickOnBounds="true" preserveRatio="true">
                            <image>
                               <Image url="@../../Images/PlaceholderLogo.png" />
                            </image>
@@ -32,18 +32,18 @@
                         <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...">
+                  <TextField fx:id="navBarSearch" 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" />
+                  <Button fx:id="navBarSearchBtn" minWidth="70" mnemonicParsing="false" onAction="#switchToSearch" text="SEARCH" textFill="white" />
+                  <Button fx:id="navBarExplore" minWidth="70" mnemonicParsing="false" onAction="#switchToExplore" text="EXPLORE" textFill="white" />
+                  <Button fx:id="navBarAlbums" minWidth="70" mnemonicParsing="false" onAction="#switchToAlbums" text="ALBUMS" textFill="white" />
+                  <Button fx:id="navBarMap" 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" />
+                        <Button fx:id="navBarUpload" minWidth="70" mnemonicParsing="false" onAction="#switchToUpload" prefHeight="25.0" prefWidth="114.0" text="UPLOAD" textFill="white" />
                      </children>
                   </HBox>
                </children>
-- 
GitLab


From 24e57eb199cb9c3f90cec99ee787c0f7e32aa00a Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:31:20 +0200
Subject: [PATCH 14/15] Actually extended NavBarController in Search

---
 src/main/java/NTNU/IDATT1002/controllers/Search.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Search.java b/src/main/java/NTNU/IDATT1002/controllers/Search.java
index 6159cd8f..be650cf0 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Search.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Search.java
@@ -29,7 +29,7 @@ import java.util.ResourceBundle;
  * a page where you can search for images and sort them
  * @version 1.0 22.03.2020
  */
-public class Search implements Initializable {
+public class Search extends NavBarController implements Initializable {
 
     public Text search_result;
     public ScrollPane scrollpane;
-- 
GitLab


From 4d6d0e28f71981fa952e06b4572495c4dfc9ec69 Mon Sep 17 00:00:00 2001
From: Eirik Steira <eirsteir@stud.ntnu.no>
Date: Wed, 15 Apr 2020 20:36:22 +0200
Subject: [PATCH 15/15] Remove navBarAlbums from Upload

---
 src/main/java/NTNU/IDATT1002/controllers/Upload.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/main/java/NTNU/IDATT1002/controllers/Upload.java b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
index 47d122af..5b805848 100644
--- a/src/main/java/NTNU/IDATT1002/controllers/Upload.java
+++ b/src/main/java/NTNU/IDATT1002/controllers/Upload.java
@@ -28,7 +28,6 @@ public class Upload extends NavBarController {
 
     public Button uploadBtn;
     public Pane drag_drop;
-    public Button navBarAlbums;
 
     /**
      * Method that changs scene to Uploaded Single page
-- 
GitLab