-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTitleScreen.java
More file actions
53 lines (38 loc) · 1.18 KB
/
Copy pathTitleScreen.java
File metadata and controls
53 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.mycompany.csc365p1;
import com.mycompany.csc365p1.Panes.*;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.layout.*;
/**
*
* @author danielching
* class to represent the main title screen
*/
class TitleScreen {
StackPane root;
TitleScreen() {
root = new StackPane();
addChildren();
}
void addChildren() {
root.getChildren().clear();
TabPane tabPane = new TabPane();
Tab homeTab = new Tab("Home");
homeTab.setClosable(false);
HomePane homePane = new HomePane(tabPane);
homeTab.setContent(homePane.getRoot());
Tab songsTab = new Tab("Songs");
songsTab.setClosable(false);
SongPane songPane = new SongPane();
songsTab.setContent(songPane.getRoot());
Tab playlistsTab = new Tab("Playlists");
playlistsTab.setClosable(false);
PlaylistPane playlistPane = new PlaylistPane();
playlistsTab.setContent(playlistPane.getRoot());
tabPane.getTabs().addAll(homeTab, songsTab, playlistsTab);
root.getChildren().addAll(tabPane);
}
public StackPane getRoot() {
return root;
}
}