Package Roots

Class AlbumsRoot


  • final class AlbumsRoot
    extends SceneRoot
    Class for the albums root
    • Constructor Summary

      Constructors 
      Constructor Description
      AlbumsRoot()
      Constructor that initializes the albums root Calls the set layout method
    • Method Summary

      Modifier and Type Method Description
      private void addAlbum​(javafx.scene.control.TextField nameAlbumInput, PopUpWindow popupWindow)
      Creates a new album
      private void addAlbumsScrollPane()
      Adds all the albums of the user in to the scroll pane of the root Used in constructor
      private void addButtonsToBorderPane()
      Adds the buttons to the root Used in constructor
      private void addScrollPane()
      Creates the scroll pane of the scene and adds it to the application Used in constructor
      private void createAlbum​(java.lang.String albumName)
      Uploads the new album that is created to the database Used in createNewAlbumButtonPressed
      private void createNewAlbumButtonPressed()
      Opens up a new stage where you can create a new album Used in addButtonsToBorderPan
      private void deleteSelectedAlbums()
      Method to delete an album and the album button gets removed from the layout.
      private java.util.ArrayList<Album> getCheckedAlbums()
      Helper method to get the checked album in the album root Used in deleteSelectedAlbums
      (package private) void setLayout()
      Overrides the setLayout in SceneRoot and adds the structure of the albums root Uses addAlbumsScrollPane Uses addScrollPane Uses addButtonsToBorderPane
      private void showNoAlbum()
      Shows a message that tells the user that there are no albums created
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SCROLL_PANE

        private final javafx.scene.control.ScrollPane SCROLL_PANE
      • SCROLL_PANE_VBOX

        private final javafx.scene.layout.VBox SCROLL_PANE_VBOX
      • NEW_ALBUM_BUTTON

        private final javafx.scene.control.Button NEW_ALBUM_BUTTON
      • DELETE_ALBUM_BUTTON

        private final javafx.scene.control.Button DELETE_ALBUM_BUTTON
      • feedbackText

        private final javafx.scene.text.Text feedbackText
      • ALBUM_CONTAINER_LIST

        private final java.util.List<AlbumContainer> ALBUM_CONTAINER_LIST
    • Constructor Detail

      • AlbumsRoot

        AlbumsRoot()
        Constructor that initializes the albums root Calls the set layout method
    • Method Detail

      • setLayout

        void setLayout()
        Overrides the setLayout in SceneRoot and adds the structure of the albums root Uses addAlbumsScrollPane Uses addScrollPane Uses addButtonsToBorderPane
        Overrides:
        setLayout in class SceneRoot
      • addAlbumsScrollPane

        private void addAlbumsScrollPane()
        Adds all the albums of the user in to the scroll pane of the root Used in constructor
      • showNoAlbum

        private void showNoAlbum()
        Shows a message that tells the user that there are no albums created
      • addScrollPane

        private void addScrollPane()
        Creates the scroll pane of the scene and adds it to the application Used in constructor
      • addButtonsToBorderPane

        private void addButtonsToBorderPane()
        Adds the buttons to the root Used in constructor
      • createNewAlbumButtonPressed

        private void createNewAlbumButtonPressed()
        Opens up a new stage where you can create a new album Used in addButtonsToBorderPan
      • addAlbum

        private void addAlbum​(javafx.scene.control.TextField nameAlbumInput,
                              PopUpWindow popupWindow)
        Creates a new album
        Parameters:
        nameAlbumInput - textfield with name of new album
      • createAlbum

        private void createAlbum​(java.lang.String albumName)
        Uploads the new album that is created to the database Used in createNewAlbumButtonPressed
      • deleteSelectedAlbums

        private void deleteSelectedAlbums()
        Method to delete an album and the album button gets removed from the layout.
      • getCheckedAlbums

        private java.util.ArrayList<Album> getCheckedAlbums()
        Helper method to get the checked album in the album root Used in deleteSelectedAlbums
        Returns:
        a list of checked albums