Package Roots
Class AlbumsRoot
- java.lang.Object
-
- Roots.SceneRoot
-
- Roots.AlbumsRoot
-
final class AlbumsRoot extends SceneRoot
Class for the albums root
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AlbumContainer>
ALBUM_CONTAINER_LIST
private javafx.scene.control.Button
DELETE_ALBUM_BUTTON
private javafx.scene.text.Text
feedbackText
private javafx.scene.control.Button
NEW_ALBUM_BUTTON
private javafx.scene.control.ScrollPane
SCROLL_PANE
private javafx.scene.layout.VBox
SCROLL_PANE_VBOX
-
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 albumprivate void
addAlbumsScrollPane()
Adds all the albums of the user in to the scroll pane of the root Used in constructorprivate void
addButtonsToBorderPane()
Adds the buttons to the root Used in constructorprivate void
addScrollPane()
Creates the scroll pane of the scene and adds it to the application Used in constructorprivate void
createAlbum(java.lang.String albumName)
Uploads the new album that is created to the database Used in createNewAlbumButtonPressedprivate void
createNewAlbumButtonPressed()
Opens up a new stage where you can create a new album Used in addButtonsToBorderPanprivate 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 addButtonsToBorderPaneprivate void
showNoAlbum()
Shows a message that tells the user that there are no albums created-
Methods inherited from class Roots.SceneRoot
getBorderPane, getGridPane, setGridPane, setPageTitle
-
-
-
-
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
-
-
Method Detail
-
setLayout
void setLayout()
Overrides the setLayout in SceneRoot and adds the structure of the albums root Uses addAlbumsScrollPane Uses addScrollPane Uses addButtonsToBorderPane
-
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
-
-