Skip to content
Snippets Groups Projects
Commit a4d74623 authored by Pedroza Aguirre Isaac's avatar Pedroza Aguirre Isaac
Browse files

Pop-ups bug fixed and exitbutton updated

parent 494bb0d8
Branches
Tags
No related merge requests found
......@@ -2,32 +2,17 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="688d774d-cfc7-4b0d-b00c-5ca931aba600" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ApplicationMain$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ApplicationMain$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ApplicationMain.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ApplicationMain.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ChatScreen$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ChatScreen$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ChatScreen.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/ChatScreen.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea$Mode.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea$Mode.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/DrawingArea.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/PaintGUI$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/PaintGUI$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/PaintGUI.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/PaintGUI.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen$2.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/GUI/StartScreen.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/client/Client.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/client/Client.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/client/ClientUpdate$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/client/ClientUpdate$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/client/ClientUpdate.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/client/ClientUpdate.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/client/DrawingUpdate.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/client/DrawingUpdate.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/remote/IDrawingController.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/remote/IDrawingController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/remote/IDrawingUpdate.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/remote/IDrawingUpdate.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ChatController.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ChatController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ClientController$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ClientController$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ClientController.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/server/ClientController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/infinitymonkeys/server/DrawingController.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/infinitymonkeys/server/DrawingController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GUI/ApplicationMain.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GUI/ApplicationMain.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GUI/StartScreen.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/GUI/StartScreen.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GUI/ChatScreen.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GUI/ChatScreen.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GUI/StartScreen.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GUI/StartScreen.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/client/Client.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/client/Client.java" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -39,20 +24,6 @@
<option name="testRunner" value="GRADLE" />
<option name="delegatedBuild" value="true" />
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>RMI</find>
<find>Black</find>
<find>colorOptions</find>
<find>Send</find>
<find>message</find>
<find>userSelectComboBox</find>
<find>updateUserList</find>
<find>send</find>
<find>broadcastMessage</find>
<find>sent</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RECENT_BRANCH_BY_REPOSITORY">
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -15,7 +15,7 @@ public class ApplicationMain extends JPanel {
private Client client;
private ChatScreen chatScreen;
private PaintGUI paintGUI;
private JFrame frame;
JFrame frame;
public ChatScreen getChatScreen() { return chatScreen; }
......@@ -110,7 +110,31 @@ public class ApplicationMain extends JPanel {
@Override
public void windowClosing(WindowEvent arg0)
{
closeWindow();
}
});
frame.setSize(1200, 700);
frame.setLocationRelativeTo( null );
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public void exitApplication(){
System.out.println("I am in exit application");
frame.setVisible(false);
client.setVisibleStartScreen();
}
public void setVisible() {
frame.setVisible(true);
chatScreen.setUserName(client.getUserName());
}
public void closeWindow() {
try {
if (client.getUserName().equals(client.getClientController().getAdmin())) {
......@@ -155,28 +179,6 @@ public class ApplicationMain extends JPanel {
} catch (RemoteException e) {
e.printStackTrace();
}
}
});
frame.setSize(1200, 700);
frame.setLocationRelativeTo( null );
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public void exitApplication(){
System.out.println("I am in exit application");
frame.setVisible(false);
frame.dispose();
client.setVisibleStartScreen();
}
public void setVisible() {
frame.setVisible(true);
chatScreen.setUserName(client.getUserName());
}
}
......@@ -124,21 +124,11 @@ public class ChatScreen {
}
else if (e.getSource() == exitThisRoomButton)
{
IClientController clientController = client.getClientController();
try
{
System.out.println("Exit room button pressed");
clientController.quit(client.getUserName());
exitChatScreen();
}
catch (RemoteException ex)
{
ex.printStackTrace();
}
System.out.println("Exit room button pressed by: " + client.getUserName());
client.getApplicationMain().closeWindow();
}
else if (e.getSource() == kickOutButton)
{
IClientController clientController = client.getClientController();
String toUser = kickUserComboBox.getSelectedItem().toString();
......
......@@ -111,9 +111,8 @@ public class StartScreen {
//frame.getContentPane().add(new JPanelWithBackground("sample.jpeg"));
frame.setVisible(true);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
frame.addComponentListener(new ComponentAdapter() {
public void componentShown(ComponentEvent e) {
if (isAppTerminated()){
showKickAllMessage();
setAppTerminated(false);
......
......@@ -120,7 +120,6 @@ public class Client
startScreen.setVisible();
}
public void startApplication()
{
applicationMain.createAndShowGUI();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment