6
6
import interface_adapters .appscreen .AppScreenController ;
7
7
import interface_adapters .appscreen .AppScreenPresenter ;
8
8
import interface_adapters .appscreen .Refresh ;
9
- import screens .Profile_screen .UserSearchUI ;
10
9
import screens .chat_screen .ChatController ;
11
10
import screens .chat_screen .ChatView ;
12
- import screens .profile_update_screen .UserModificationUI ;
13
11
import use_cases .appscreen .*;
14
12
import use_cases .chat_initiation_use_case .ChatInputBoundry ;
15
13
import use_cases .chat_initiation_use_case .ChatInteractor ;
@@ -29,8 +27,8 @@ public class AppScreen implements AppScreenPresenter {
29
27
30
28
/**
31
29
Create an AppScreen object
32
- @param chats This is a list o most recent chats at the end of the list)
33
- f chats given by the user ( the list will always come as sorted with the
30
+ @param chats This is a list of chats given by the user (the list will always come as sorted with the
31
+ most recent chats at the end of the list)
34
32
*/
35
33
public AppScreen (String currentUsername , ArrayList <Chat > chats ) {
36
34
this .currentUsername = currentUsername ;
@@ -50,24 +48,6 @@ public AppScreen(String currentUsername, ArrayList<Chat> chats) {
50
48
addPrivateChat .setPreferredSize (new Dimension (40 , 30 ));
51
49
addGroupChat .setPreferredSize (new Dimension (40 , 30 ));
52
50
53
- // menu panel containing the buttons for searching for users or accessing profile settings
54
- JPanel menuPanel = new JPanel ();
55
- menuPanel .setLayout (new GridLayout (1 ,2 ));
56
-
57
- JButton searchUsers = new JButton ("Search Users" );
58
- JButton profileSettings = new JButton ("Profile Settings" );
59
-
60
- searchUsers .setPreferredSize (new Dimension (40 , 30 ));
61
- profileSettings .setPreferredSize (new Dimension (30 , 30 ));
62
-
63
-
64
- // adding the action listeners for the Search Users button
65
- searchUsers .addActionListener (e -> new UserSearchUI ());
66
-
67
- // adding the action listeners for the Profile Settings button
68
- profileSettings .addActionListener (e -> new UserModificationUI ());
69
-
70
-
71
51
// adding the action listeners for the +private-chat and +group-chat buttons
72
52
addPrivateChat .addActionListener (e -> {
73
53
PrivateChatfactory privateChatfactory = new CommonPrivatechat ();
@@ -85,10 +65,7 @@ public AppScreen(String currentUsername, ArrayList<Chat> chats) {
85
65
86
66
topPanel .add (addPrivateChat );
87
67
topPanel .add (addGroupChat );
88
- menuPanel .add (searchUsers );
89
- menuPanel .add (profileSettings );
90
68
jFrame .add (topPanel , BorderLayout .NORTH );
91
- jFrame .add (menuPanel , BorderLayout .SOUTH );
92
69
93
70
this .chats = chats ;
94
71
openScreen ();
0 commit comments